joyce8/EMBER2024-capa huggingface dataset:
Function at 0x492ec3
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x492efb
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00490f7a
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00490f52
jmp 0x492f07
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4945b4
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4945f6
call fcn.0049a128
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4945f6
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4945ed
xor eax, eax
jmp 0x4945fe
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00494604
pop edi
pop esi
pop ebx
ret 4

Function at 0x49a658
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x49a686
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x49a6a4
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0049a5be
jmp 0x49a6a4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x49a6a4
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0049a5be
test edi, edi
mov eax, edi
jne 0x49a68e
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401900
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x414918
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push esi
push edi
lea ecx, [esp + 0xc]
call fcn.00407130
mov dword [esp + 0x64], 0
mov dword [esp + 0x10], 0x12
mov dword [esp + 0x14], 0xc
mov dword [esp + 0x18], 0xf
mov dword [esp + 0x1c], 5
mov dword [esp + 0x20], 0xd
mov dword [esp + 0x24], 0x10
mov dword [esp + 0x28], 0x17
mov dword [esp + 0x2c], 0x18
mov dword [esp + 0x30], 0x1a
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], 0x1b
mov dword [esp + 0x3c], 2
mov dword [esp + 0x40], 0x1d
mov dword [esp + 0x44], 6
mov dword [esp + 0x48], 0x1c
mov dword [esp + 0x4c], 7
mov dword [esp + 0x50], 0x19
mov dword [esp + 0x54], 0x14
mov dword [esp + 0x58], 0x3e8
lea edi, [esp + 0x10]
mov ebx, 0x13
mov eax, dword [edi]
push 0
push 0x40
push 1
push eax
lea ecx, [esp + 0x1c]
call fcn.00407410
mov esi, eax
test esi, esi
je 0x4019f5
mov ecx, esi
call fcn.004053e0
push esi
call fcn.0040569e
add esp, 4
add edi, 4
dec ebx
jne 0x4019cd
push 0
push 0xa
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x28]
call fcn.00408900
lea ecx, [esp + 0xc]
mov dword [esp + 0x64], 0xffffffff
call fcn.00407160
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret
Function at 0x4020e0
Capabilities:
Acquire debug privileges
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x414976
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x514
push ebx
push esi
push edi
lea ecx, [esp + 0xc]
call fcn.004048b0
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], bl
mov dword [esp + 0x528], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x118]
stosb byte es:[edi], al
call fcn.004028e0
mov eax, dword [esp + 0x530]
mov byte [esp + 0x528], 1
cmp eax, 1
mov dword [esp + 0x10], ebx
jne 0x402157
push 1
call fcn.00401ef0
add esp, 4
jmp 0x40230a
push ebx
call fcn.00401ef0
add esp, 4
lea eax, [esp + 0x14]
push str.smpagt.exe
push 0x41d994
push str._s_s
push eax
call fcn.004094c9
add esp, 0x10
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x11c]
call fcn.00402a60
mov esi, eax
cmp esi, ebx
je 0x40229b
mov ecx, esi
call fcn.004053e0
push esi
call fcn.0040569e
add esp, 4
push ebp
push str.SeDebugPrivilege
call fcn.00405fe0
add esp, 4
lea ecx, [esp + 0x10]
push 1
push str.smpagt.exe
call fcn.004048d0
push 1
push str.CSMPRDC.exe
lea ecx, [esp + 0x18]
mov ebx, eax
call fcn.004048d0
push 1
push str.winlogon.exe
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.004048d0
push 1
push str.csrss.exe
lea ecx, [esp + 0x18]
mov edi, eax
call fcn.004048d0
test esi, esi
mov ebp, eax
je 0x402211
push 1
push esi
push str.AgtProtect.dll
call fcn.00406510
add esp, 0xc
test edi, edi
je 0x402225
push 1
push edi
push str.AgtProtect.dll
call fcn.00406510
add esp, 0xc
test ebp, ebp
je 0x402239
push 1
push ebp
push str.AgtProtect.dll
call fcn.00406510
add esp, 0xc
push 0x41dba4
call fcn.00402760
add esp, 4
test ebx, ebx
pop ebp
je 0x40230a
push ebx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x40227b
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.smpagt.exe
call fcn.00405a00
add esp, 4
test eax, eax
je 0x4022fc
push str.KillProcess_AGENT_failed
call fcn.00405420
add esp, 4
jmp 0x40230a
lea edx, [esp + 0x10]
lea ecx, [esp + 0x118]
push edx
push 0x419470
call fcn.00402fc0
mov esi, eax
cmp esi, ebx
jne 0x402197
mov eax, dword [esp + 0x10]
mov ecx, dword [0x41d990]
cmp eax, ecx
je 0x4021a7
lea ecx, [esp + 0x118]
mov byte [esp + 0x528], 0
call fcn.00402920
lea ecx, [esp + 0xc]
mov dword [esp + 0x528], 0xffffffff
call fcn.004048c0
mov eax, 1
jmp 0x402334
push ebx
push str.KillProcess_AGENT__d__success.
call fcn.00405420
add esp, 8
lea ecx, [esp + 0x118]
mov byte [esp + 0x528], 0
call fcn.00402920
lea ecx, [esp + 0xc]
mov dword [esp + 0x528], 0xffffffff
call fcn.004048c0
xor eax, eax
mov ecx, dword [esp + 0x520]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x520
ret
Function at 0x402350
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x104
lea eax, [esp]
push str.SMPAGTCTR.INI
push 0x41da9c
push str._s_s
push eax
call fcn.004094c9
mov edx, dword [esp + 0x11c]
mov eax, dword [esp + 0x118]
add esp, 0x10
lea ecx, [esp]
push ecx
push edx
push eax
push 0x41dba4
push str.Path
push str.Common
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
ja 0x4023bc
push str.SMP_Agent
push 0x41da9c
lea ecx, [esp + 8]
push str._s_s
push ecx
call fcn.004094c9
add esp, 0x10
mov eax, 1
add esp, 0x104
ret

Function at 0x4026d0
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4026f4
mov eax, 1
add esp, 0x14
ret
lea ecx, [esp + 8]
push ecx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp]
push 0
push 0
lea edx, [esp + 0xc]
push 0
push edx
push 0
push eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x402741
mov eax, 2
add esp, 0x14
ret
push 0
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
neg eax
sbb eax, eax
and al, 0xfd
add eax, 3
add esp, 0x14
ret

Function at 0x402860
Capabilities:
Delete registry key

Disassembly:
push esi
push str.SYSTEMCurrentControlSetControlSafeBootMinimal
push 0x80000002
xor esi, esi
call fcn.00412600
add esp, 8
test eax, eax
jne 0x402894
push eax
push str.SYSTEMCurrentControlSetControlSafeBootMinimal
push eax
push str.SYSTEMCurrentControlSetControlSafeBootBkMinimal
push 0x80000002
call fcn.00412480
add esp, 0x14
mov esi, eax
push str.SYSTEMCurrentControlSetControlSafeBootNetwork
push 0x80000002
call fcn.00412600
add esp, 8
test eax, eax
jne 0x4028c9
push eax
push str.SYSTEMCurrentControlSetControlSafeBootNetwork
push eax
push str.SYSTEMCurrentControlSetControlSafeBootBkNetwork
push 0x80000002
call fcn.00412480
add esp, 0x14
test eax, eax
je 0x4028c9
mov esi, eax
push str.SYSTEMCurrentControlSetControlSafeBootBk
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
mov eax, esi
pop esi
ret

Function at 0x403010
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea eax, [ebx + 1]
push eax
call fcn.00409bfb
mov edx, eax
add esp, 4
test edx, edx
jne 0x40303d
pop edi
pop esi
pop ebx
ret 8
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [edx], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
test ebx, ebx
rep movsb byte es:[edi], byte [esi]
jle 0x403076
mov cl, byte [eax + edx]
xor cl, 0x1a
mov byte [eax + edx], cl
inc eax
cmp eax, ebx
jl 0x403068
mov ecx, dword [esp + 0x14]
pop edi
pop esi
mov eax, edx
mov dword [ecx], ebx
pop ebx
ret 8
Function at 0x4038a0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
push esi
test eax, eax
push edi
je 0x4038dd
mov edi, dword [esp + 0x18]
shr edi, 2
je 0x4038fb
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
sub esi, edx
mov eax, dword [esi + edx]
add edx, 4
mov ecx, eax
ror ecx, 8
rol eax, 8
xor eax, ecx
and eax, 0xff00ff
xor eax, ecx
dec edi
mov dword [edx - 4], eax
jne 0x4038bd
pop edi
pop esi
ret
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
cmp esi, edi
je 0x4038fb
mov ecx, dword [esp + 0x18]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
ret

Function at 0x4043f0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], 0x44
test eax, eax
mov dword [esp + 0x40], 1
pop edi
jne 0x40441a
mov word [esp + 0x40], ax
xor eax, eax
mov dword [esp], eax
lea ecx, [esp]
mov dword [esp + 4], eax
lea edx, [esp + 0x10]
mov dword [esp + 8], eax
push ecx
push edx
push eax
push eax
push eax
push eax
push eax
mov dword [esp + 0x28], eax
push eax
mov eax, dword [esp + 0x78]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40445a
xor al, al
add esp, 0x54
ret 8
mov ecx, dword [esp]
push esi
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 8]
push eax
call esi
mov al, 1
pop esi
add esp, 0x54
ret 8
Function at 0x404770
Capabilities:
Enumerate process modules

Disassembly:
push esi
mov esi, ecx
push edi
lea edi, [esi + 4]
mov dword [esi + 8], 0xffffffff
mov dword [edi], 0
mov eax, dword [esi]
push eax
call fcn.0040569e
push 0x1000
call fcn.00409bfb
add esp, 8
mov dword [esi], eax
push edi
push 0x1000
push eax
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x4047b9
mov eax, dword [edi]
mov dword [esi + 8], 1
shr eax, 2
mov dword [edi], eax
cmp dword [edi], 0x400
jae 0x404784
mov eax, dword [esi]
test eax, eax
je 0x4047da
mov ecx, dword [esi + 8]
mov edx, dword [edi]
cmp ecx, edx
jae 0x4047da
mov eax, dword [eax + ecx*4]
inc ecx
mov dword [esi + 8], ecx
pop edi
pop esi
ret
pop edi
xor eax, eax
pop esi
ret

Function at 0x404820
Capabilities:
Enumerate process modules

Disassembly:
push esi
mov esi, ecx
push edi
mov eax, dword [esi]
lea edi, [esi + 8]
test eax, eax
mov dword [edi], 0
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 4], 0
je 0x40489f
mov eax, dword [esi + 4]
push eax
call fcn.0040569e
push 0x1000
call fcn.00409bfb
mov ecx, dword [esi]
add esp, 8
mov dword [esi + 4], eax
push edi
push 0x1000
push eax
push ecx
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x40487b
mov eax, dword [edi]
mov dword [esi + 0xc], 0
shr eax, 2
mov dword [edi], eax
cmp dword [edi], 0x400
jae 0x404841
cmp dword [esi], 0
je 0x40489f
mov ecx, dword [esi + 0xc]
mov eax, dword [edi]
cmp ecx, eax
jae 0x40489f
mov edx, dword [esi + 4]
inc ecx
pop edi
mov eax, dword [edx + ecx*4 - 4]
mov dword [esi + 0xc], ecx
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
Function at 0x404d10
Capabilities:
Delete service

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x414ba1
push eax
mov dword fs:[0], esp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x404d8c
push 0xffc
call fcn.00409bfb
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x10], esi
je 0x404e6b
push str.Error_while_OpenSCManager.
push 0x3a99
push esi
push str.Nov_11_2010
push str.E:CommonSourceCSServiceControlCSServiceControl.cpp
push 0x59
push eax
call fcn.00405340
add esp, 0x1c
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 4
mov eax, dword [esp + 0x18]
push 0xf01ff
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x404dfe
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xffc
call fcn.00409bfb
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x10], 1
je 0x404e6b
push str.Error_while_OpenService.
push 0x3a9b
push edi
push str.Nov_11_2010
push str.E:CommonSourceCSServiceControlCSServiceControl.cpp
push 0x65
push eax
call fcn.00405340
add esp, 0x1c
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 4
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jne 0x404e66
call edi
push esi
call edi
push 0xffc
call fcn.00409bfb
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x10], 2
je 0x404e6b
push str.Error_while_DeleteService.
push 0x3a9c
push 0
push str.Nov_11_2010
push str.E:CommonSourceCSServiceControlCSServiceControl.cpp
push 0x6f
push eax
call fcn.00405340
add esp, 0x1c
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 4
call edi
push esi
call edi
mov ecx, dword [esp + 8]
pop edi
xor eax, eax
mov dword fs:[0], ecx
pop esi
add esp, 0xc
ret 4
Function at 0x404e80
Capabilities:
Query service status
Stop service

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x404f31
mov eax, dword [esp + 0x30]
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x404f21
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0x10]
push ecx
push esi
call ebx
test eax, eax
je 0x404f21
cmp dword [esp + 0x14], 1
je 0x404f09
lea edx, [esp + 0x10]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x404f21
cmp dword [esp + 0x14], 3
jne 0x404f09
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call edi
lea eax, [esp + 0x10]
push eax
push esi
call ebx
test eax, eax
je 0x404f21
cmp dword [esp + 0x14], 3
je 0x404eef
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call edi
push esi
call edi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x1c
ret 4
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call edi
test esi, esi
je 0x404f31
push esi
call edi
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1c
ret 4

Function at 0x405420
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x2000
call fcn.0040a890
mov ecx, dword [esp + 0x2004]
lea eax, [esp + 0x2008]
push eax
lea edx, [esp + 4]
push ecx
push edx
call dword [sym.imp.USER32.dll_wvsprintfA]
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x2000
ret

Function at 0x405f50
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x1c
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x405f77
add esp, 0x1c
ret
lea ecx, [esp + 4]
push esi
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov esi, eax
test esi, esi
je 0x405fca
mov edx, dword [esp + 8]
mov eax, dword [esp + 0xc]
push 0
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xc]
push 0x10
push ecx
push 0
push edx
mov dword [esp + 0x28], 1
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov esi, eax
mov eax, dword [esp + 4]
test eax, eax
je 0x405fd9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
add esp, 0x1c
ret
Function at 0x4060c0
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
push edi
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
mov dword [esp + 4], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
pop edi
je 0x40618f
mov eax, dword [esp + 4]
cmp eax, 4
jne 0x406105
mov eax, 1
add esp, 0x94
ret
cmp eax, 5
jne 0x406140
mov eax, dword [esp + 8]
test eax, eax
jne 0x40611e
mov eax, 2
add esp, 0x94
ret
cmp eax, 1
jne 0x40612f
mov eax, 3
add esp, 0x94
ret
cmp eax, 2
jne 0x40618f
mov eax, 4
add esp, 0x94
ret
cmp eax, 6
jne 0x40617e
mov eax, dword [esp + 8]
test eax, eax
jne 0x406159
mov eax, 5
add esp, 0x94
ret
cmp eax, 1
jne 0x40616a
mov eax, 6
add esp, 0x94
ret
xor ecx, ecx
cmp eax, 2
setne cl
add ecx, 7
mov eax, ecx
add esp, 0x94
ret
cmp eax, 7
jb 0x40618f
mov eax, 8
add esp, 0x94
ret
xor eax, eax
add esp, 0x94
ret

Function at 0x4061a0
Capabilities:
Acquire debug privileges

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_OpenProcess]
push esi
push edi
push ebx
push 0
push 0x1f0fff
mov edi, 1
mov dword [eax], 0
call ebp
mov esi, eax
test esi, esi
jne 0x4061ef
test edi, edi
je 0x40620d
push str.SeDebugPrivilege
xor edi, edi
call fcn.00405fe0
add esp, 4
push ebx
push edi
push 0x1f0fff
call ebp
mov esi, eax
test esi, esi
je 0x4061cd
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x40621f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x406221
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x406230
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x5c
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
xor eax, eax
push esi
push edi
mov dword [esp + 0x1c], eax
xor edi, edi
mov dword [esp + 0x20], eax
cmp ebx, edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], eax
jne 0x40626d
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
lea ebx, [esp + 0x28]
mov esi, dword [esp + 0x70]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
je 0x406376
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp esi, eax
je 0x406376
lea edx, [esp + 0x10]
push edx
push 0xb
push esi
call fcn.004061a0
mov esi, eax
add esp, 0xc
cmp esi, edi
je 0x4062bb
push esi
push str.Ps_OpenProcessToken:__d
call fcn.00406460
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 1
push 2
push edi
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov edx, dword [esp + 0x10]
mov esi, eax
push edx
call ebp
cmp esi, edi
jne 0x406310
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, edi
jne 0x4062ed
or eax, 0xffffffff
push eax
push str.Ps_OpenProcessToken:__d
call fcn.00406460
add esp, 8
call esi
cmp eax, edi
jne 0x4063fb
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x5c
ret
mov edi, dword [esp + 0x7c]
test edi, edi
mov eax, edi
jne 0x40631e
lea eax, [esp + 0x18]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [esp + 0x98]
push ebx
push eax
mov eax, dword [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x94]
push edx
mov edx, dword [esp + 0x94]
push eax
mov eax, dword [esp + 0x90]
push ecx
mov ecx, dword [esp + 0x90]
push edx
mov edx, dword [esp + 0x34]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
call ebp
jmp 0x4063ce
mov edi, dword [esp + 0x7c]
test edi, edi
mov eax, edi
jne 0x406384
lea eax, [esp + 0x18]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x90]
push eax
mov eax, dword [esp + 0x90]
push ebx
push ecx
mov ecx, dword [esp + 0x94]
push edx
mov edx, dword [esp + 0x94]
push eax
mov eax, dword [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x90]
push edx
mov edx, dword [esp + 0x90]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
test esi, esi
jne 0x4063e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4063fb
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x5c
ret
test edi, edi
jne 0x4063f9
mov eax, dword [esp + 0x18]
push eax
call ebp
mov ecx, dword [esp + 0x1c]
push ecx
call ebp
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret

Function at 0x406460
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x2710
call fcn.0040a890
mov ecx, dword [esp + 0x2714]
lea eax, [esp + 0x2718]
push eax
push ecx
lea edx, [esp + 8]
push 0x270f
push edx
call fcn.0040a585
add esp, 0x10
lea eax, [esp]
mov byte [esp + 0x270f], 0
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x2710
ret
Function at 0x406590
Capabilities:
Enumerate process modules

Disassembly:
sub esp, 0x22c
push ebx
push ebp
mov ebp, dword [esp + 0x238]
push esi
push edi
xor edx, edx
mov ecx, 0x88
xor eax, eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], edx
rep stosd dword es:[edi], eax
cmp ebp, edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
mov edi, 1
jne 0x4065d2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x22c
ret
mov ebx, dword [esp + 0x244]
push ebx
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x406622
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x4065c5
call ebp
cmp eax, 5
jne 0x4065c5
push str.SE_DEBUG_NAME
xor edi, edi
call fcn.00405fe0
add esp, 4
test eax, eax
je 0x4065c5
push ebx
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x4065ee
mov ebp, dword [esp + 0x240]
push 0x5c
push ebp
call fcn.00409c20
add esp, 8
test eax, eax
je 0x406639
mov dword [esp + 0x14], 1
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x224
push eax
push esi
call sub.KERNEL32.dll_Module32First
mov eax, dword [esp + 0x14]
push ebp
test eax, eax
je 0x40666b
lea ecx, [esp + 0x13c]
push ecx
call fcn.00411590
add esp, 8
test eax, eax
je 0x40668d
jmp 0x40667c
lea edx, [esp + 0x3c]
push edx
call fcn.00411590
add esp, 8
test eax, eax
je 0x406697
lea eax, [esp + 0x18]
push eax
push esi
call sub.KERNEL32.dll_Module32Next
test eax, eax
je 0x40669f
jmp 0x40664c
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], ecx
jmp 0x40669f
mov edx, dword [esp + 0x34]
mov dword [esp + 0x10], edx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4066bf
mov eax, dword [esp + 0x248]
test eax, eax
je 0x4066bf
mov edx, dword [esp + 0x28]
mov dword [eax], edx
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x22c
ret