joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001490
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], edx
xor esi, esi
mov eax, dword [edi + 0x3c]
mov eax, dword [eax + edi + 0x78]
add eax, edi
mov ebx, dword [eax + 0x1c]
mov ecx, dword [eax + 0x20]
add ebx, edi
mov dword [ebp - 0x10], ebx
add ecx, edi
mov ebx, dword [eax + 0x24]
add ebx, edi
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], ebx
mov ebx, dword [eax + 0x18]
test ebx, ebx
je 0x100014e4
mov eax, dword [ecx + esi*4]
add eax, edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x100014ed
mov ecx, dword [ebp - 4]
inc esi
mov edx, dword [ebp - 8]
cmp esi, ebx
jb 0x100014c8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
movzx eax, word [eax + esi*2]
mov eax, dword [ecx + eax*4]
add eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10001770
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x10009800]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, edx
mov edi, ecx
call fcn.10001490
mov ebx, eax
test edi, edi
je 0x10001830
test esi, esi
je 0x10001830
push 0x104
lea eax, [ebp - 0x110]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, esi
lea ecx, [ebp - 0x110]
call fcn.10001510
mov edi, eax
cmp edi, 0xffffffff
je 0x10001830
lea eax, [ebp - 0x110]
push 0x10007238
push eax
call dword [sym.imp.MSVCR120.dll_fopen]
push 0
mov esi, eax
push edi
push esi
call dword [sym.imp.MSVCR120.dll_fseek]
push esi
push 5
lea eax, [ebp - 0xc]
push 1
push eax
call dword [sym.imp.MSVCR120.dll_fread]
push esi
call dword [sym.imp.MSVCR120.dll_fclose]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x114]
add esp, 0x28
push eax
push 0x40
push 5
push ebx
call esi
mov eax, dword [ebp - 0xc]
mov dword [ebx], eax
mov al, byte [ebp - 8]
mov byte [ebx + 4], al
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x114]
push 5
push ebx
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100054e7
mov esp, ebp
pop ebp
ret

Function at 0x10004250
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
cmp eax, 1
jne 0x100042a2
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
push 0x400064
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
test eax, eax
jne 0x100042e0
push 0x400064
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push 0
push 0
push 0x10003bb0
call dword [sym.imp.MSVCR120.dll__beginthread]
add esp, 0xc
mov eax, 1
pop ebp
ret 0xc
test eax, eax
jne 0x100042e0
mov ecx, 0x10009ed4
call fcn.1000533c
mov ecx, 0x10009ea0
call fcn.1000533c
cmp byte [0x10009eb8], 3
jne 0x100042cd
mov ecx, 0x10009ebc
call fcn.1000533c
mov eax, dword [0x10009e64]
test eax, eax
je 0x100042e0
push eax
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, 1
pop ebp
ret 0xc

Function at 0x10004440
Capabilities:
Allocate or change rwx memory

Disassembly:
push esi
push 0x1000733a
mov esi, ecx
call dword [sym.imp.MSVCR120.dll_printf]
mov cl, byte [0x100098c7]
add esp, 4
cmp cl, 7
jne 0x10004473
push 0
push 0x40
push 2
push 0x100098c4
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov cl, byte [0x100098c7]
xor byte [esi], cl
mov eax, 3
movzx ecx, byte [0x100098c6]
xor byte [esi + 1], cl
movzx ecx, byte [0x100098c5]
xor byte [esi + 2], cl
movzx ecx, byte [0x100098c5]
xor byte [esi + 3], cl
inc eax
cmp eax, 5
je 0x100044a7
mov cl, byte [0x100098c4]
xor byte [eax + esi], cl
cmp eax, 7
jne 0x10004498
mov al, byte [0x100098c7]
add al, al
xor byte [esi + 5], al
pop esi
ret
Function at 0x1000524b
Capabilities:
Allocate or change rwx memory

Disassembly:
mov eax, dword [esp + 4]
push ebx
push ebp
push edi
mov edi, ecx
push 5
pop ebx
mov dword [edi + 0x10], eax
jmp 0x10005269
add eax, dword [edi + 0x10]
push eax
call fcn.10005391
add dword [edi + 8], eax
pop ecx
mov eax, dword [edi + 8]
cmp eax, ebx
jb 0x1000525c
add eax, 5
mov dword [edi + 4], eax
inc eax
push eax
call sub.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_
xor edx, edx
mov dword [edi + 0x14], eax
pop ecx
cmp dword [edi + 8], edx
jbe 0x1000529a
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, dword [edi + 8]
jb 0x10005288
push esi
push 0x40
push 0x1000
push dword [edi + 4]
push 0
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, dword [edi + 8]
mov dword [edi], eax
mov eax, dword [edi + 0x14]
mov byte [ecx + eax], 0xe9
mov eax, dword [edi + 0x10]
mov esi, dword [edi + 8]
add eax, ebx
push eax
mov eax, dword [edi]
add eax, esi
push eax
call fcn.10005385
mov ecx, dword [edi + 0x14]
mov dword [esi + ecx + 1], eax
push dword [edi + 4]
push dword [edi + 0x14]
push dword [edi]
call sub.MSVCR120.dll_memcpy
add esp, 0x14
lea ebp, [edi + 0xc]
push ebp
push 0x40
push dword [edi + 8]
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 0x10]
push dword [esp + 0x18]
mov byte [eax], 0xe9
mov esi, dword [edi + 0x10]
push esi
call fcn.10005385
pop ecx
mov dword [esi + 1], eax
pop ecx
pop esi
cmp dword [edi + 8], ebx
jbe 0x10005324
mov eax, dword [edi + 0x10]
mov byte [ebx + eax], 0x90
inc ebx
cmp ebx, dword [edi + 8]
jb 0x10005317
push ebp
push dword [ebp]
push dword [edi + 8]
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi]
pop edi
pop ebp
pop ebx
ret 0xc

Function at 0x1000533c
Capabilities:
Allocate or change rwx memory

Disassembly:
push esi
mov esi, ecx
lea eax, [esi + 0xc]
push eax
push 0x40
push dword [esi + 8]
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor edx, edx
cmp dword [esi + 8], edx
jbe 0x1000536a
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, dword [esi + 8]
jb 0x10005358
push sprintf_s
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [esi + 0x14]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
pop ecx
pop esi
ret
Function at 0x402743
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebx
push esi
push edi
mov edi, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbslen]
push 0x40e770
call edi
lea esi, [eax + 0x105]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x4027b0
push esi
push ebx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
jne 0x4027b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x4027a5
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40278a
mov esi, str.JavaLow
push ebx
push dword [esp + 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
inc eax
pop ecx
pop edi
pop esi
pop ebx
ret
cmp esi, 0x104
jbe 0x402787
push 0x40e77c
call edi
inc eax
add eax, esi
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 0xc
xor ebx, ebx
push esi
push ebx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x402787
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
jmp 0x4027af

Function at 0x4057a3
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x41a174]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x41af74], 0
je 0x4057c6
mov al, byte [0x41af75]
jmp 0x405819
push ebx
push 0x90
xor ebx, ebx
lea eax, [ebp - 0x94]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x98], 0x94
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x88], 2
jne 0x405809
cmp dword [ebp - 0x94], 6
jb 0x405809
mov bl, 1
mov byte [0x41af75], bl
mov al, bl
mov byte [0x41af74], 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040baa8
leave
ret

Function at 0x405b2e
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, esi
cmp dword [esi + 0x14], 0x10
jb 0x405b3d
mov eax, dword [esi]
cmp byte [eax], 0x2d
je 0x405b46
xor al, al
pop esi
ret
push str._Dsun.plugin2.jvm.args
push 0x16
push 0
mov ecx, esi
call fcn.0040433b
test eax, eax
jne 0x405b72
push str.Invalid_argument_1_n
call fcn.00401a09
pop ecx
call fcn.004019e9
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x405b7c
mov eax, dword [esi]
push dword [esp + 0xc]
push eax
call fcn.004067b1
pop ecx
pop ecx
test al, al
jne 0x405b99
push str.Invalid_argument_2_n
call fcn.00401a09
pop ecx
jmp 0x405b42
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x405ba3
mov eax, dword [esi]
push eax
call fcn.0040606c
pop ecx
test al, al
je 0x405bcf
cmp dword [esi + 0x14], 0x10
jb 0x405bb6
mov esi, dword [esi]
push esi
call fcn.0040600b
push eax
call fcn.00405825
pop ecx
pop ecx
test al, al
jne 0x405bcf
push str.Invalid_argument_3_n
jmp 0x405b5f
mov al, 1
pop esi
ret
Function at 0x403210
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x403229
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40323d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40325e
cmp esi, eax
jae 0x403237
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x403250
cmp esi, eax
jae 0x403237
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x40db4d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x40dba0
call fcn.0042d498
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x40dba0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x40db96
xor eax, eax
jmp 0x40dcb9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x40dbd0
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x40dbd0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x40dcb6
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x40dbfd
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.0040b9ce
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x40dcb6
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40dc46
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x40dc46
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x40dc40
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.0040b9ce
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x40dca6
and dword [ebp + 0xc], 0
jmp 0x40dca6
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x40dca6
push 0xc
call fcn.0042736d
mov esi, eax
test esi, esi
pop ecx
je 0x40dc88
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x40dc8a
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x40dca1
push dword [ebp - 8]
call fcn.00422e17
jmp 0x40dca6
call fcn.00422dee
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x40dc0b
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x415d94
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00415f90
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x415e2f
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x446494]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x415e2f
cmp eax, 1
je 0x415e50
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x415e2f
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x415dfc
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x415e2b
xor eax, eax
inc eax
jmp 0x415e6f
cmp edi, eax
jae 0x415e33
xor eax, eax
jmp 0x415e6f
cmp eax, esi
jae 0x415e3a
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x446494]
jmp 0x415e53
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x416893
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00418c8c
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4168b6
test byte [esp + 8], 2
je 0x4168b6
call fcn.00418c7a
mov dword [eax], 0xd
call fcn.00418c83
mov dword [eax], 5
jmp 0x41688f
xor eax, eax
ret

Function at 0x416eee
Capabilities:
Terminate process

Disassembly:
push 8
push 0x434bb0
call fcn.00418534
push 8
call fcn.00419d4f
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x4464d4], esi
jne 0x416f22
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4464d0], esi
mov al, byte [ebp + 0x10]
mov byte [0x4464cc], al
cmp dword [ebp + 0xc], edi
jne 0x416f6c
cmp dword [0x447d6c], edi
je 0x416f5c
mov eax, dword [0x447d68]
sub eax, 4
mov dword [0x447d68], eax
cmp eax, dword [0x447d6c]
jb 0x416f5c
mov eax, dword [eax]
cmp eax, edi
je 0x416f3d
call eax
jmp 0x416f3d
push 0x43c090
mov eax, 0x43c088
call fcn.00416e6c
pop ecx
push 0x43c09c
mov eax, 0x43c094
call fcn.00416e6c
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x416f9d
cmp dword [ebp + 0x10], edi
jne 0x416fab
mov dword [0x4464d4], esi
push dword [ebp + 8]
call fcn.00416e2a
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x416faa
push 8
call fcn.00419c9a
pop ecx
ret
call fcn.0041856f
ret
Function at 0x417082
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x434bc0
call fcn.00418534
mov edi, 0x94
mov eax, edi
call fcn.00415f90
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x446494], ecx
mov eax, dword [esi + 4]
mov dword [0x4464a0], eax
mov edx, dword [esi + 8]
mov dword [0x4464a4], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x446498], esi
cmp ecx, 2
je 0x4170e2
or esi, 0x8000
mov dword [0x446498], esi
shl eax, 8
add eax, edx
mov dword [0x44649c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x41711d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41711d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x417135
cmp eax, 0x20b
je 0x417122
mov dword [ebp - 0x1c], esi
jmp 0x417149
cmp dword [ecx + 0x84], 0xe
jbe 0x41711d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x417143
cmp dword [ecx + 0x74], 0xe
jbe 0x41711d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00419d9a
pop ecx
test eax, eax
jne 0x41715d
push 0x1c
call fcn.0041705e
pop ecx
call fcn.00419a50
test eax, eax
jne 0x41716e
push 0x10
call fcn.0041705e
pop ecx
call fcn.0041c638
mov dword [ebp - 4], esi
call fcn.0041ce28
test eax, eax
jge 0x417187
push 0x1b
call fcn.00417039
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x447d60], eax
call fcn.0041cd06
mov dword [0x4464d8], eax
call fcn.0041cc64
test eax, eax
jge 0x4171ad
push 8
call fcn.00417039
pop ecx
call fcn.0041ca31
test eax, eax
jge 0x4171be
push 9
call fcn.00417039
pop ecx
push 1
call fcn.00416e84
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4171d4
push eax
call fcn.00417039
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041c9d4
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4171f5
movzx eax, word [ebp - 0x40]
jmp 0x4171f8
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004229a4
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x417216
push edi
call fcn.00416fb1
call fcn.00416fd3
jmp 0x417248
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0041856f
ret
Function at 0x41a929
Capabilities:
Parse pe header

Disassembly:
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 0x41a957
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x41a95e
cmp ebx, dword [eax + 4]
jae 0x41a95e
xor eax, eax
jmp 0x41ab4e
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41a96f
xor eax, eax
inc eax
jmp 0x41ab4d
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x41a985
cmp ecx, edx
jae 0x41aaca
cmp dword [eax + 4], 0
je 0x41a98e
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x41a976
cmp dword [ebp + 8], 0
je 0x41a9b0
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41aaca
cmp eax, esi
jae 0x41aaca
mov eax, dword [0x446658]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41a9d5
cmp dword [esi*4 + 0x446660], edi
je 0x41aace
inc esi
cmp esi, eax
jl 0x41a9c3
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41ab4a
cmp dword [ebp - 8], 0x1000000
jne 0x41ab4a
test byte [ebp - 0xc], 0xcc
je 0x41aa53
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41ab4a
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41ab4a
cmp word [eax + 0x18], 0x10b
jne 0x41ab4a
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41ab4a
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41aa53
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41aa53
test byte [ecx + 0x27], 0x80
jne 0x41aaca
push 1
push 0x4466a0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41a967
mov ecx, dword [0x446658]
test ecx, ecx
mov edx, ecx
jle 0x41aa87
lea eax, [ecx*4 + 0x44665c]
cmp dword [eax], edi
je 0x41aa87
dec edx
sub eax, 4
test edx, edx
jg 0x41aa7b
test edx, edx
jne 0x41aab8
push 0xf
pop ebx
cmp ecx, ebx
jg 0x41aa94
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x41aaac
lea eax, [edx*4 + 0x446660]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x41aa9a
cmp ecx, 0x10
jge 0x41aab8
inc ecx
mov dword [0x446658], ecx
push 0
push 0x4466a0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41a967
xor eax, eax
jmp 0x41ab4d
test esi, esi
jle 0x41a967
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4466a0
call ebx
test eax, eax
jne 0x41a967
cmp dword [esi*4 + 0x446660], edi
je 0x41ab24
mov eax, dword [0x446658]
lea esi, [eax - 1]
test esi, esi
jl 0x41ab12
cmp dword [esi*4 + 0x446660], edi
je 0x41ab0e
dec esi
jns 0x41ab02
test esi, esi
jge 0x41ab22
cmp eax, 0x10
jge 0x41ab1d
inc eax
mov dword [0x446658], eax
lea esi, [eax - 1]
jmp 0x41ab24
je 0x41ab3c
xor ecx, ecx
test esi, esi
jl 0x41ab3c
lea eax, [ecx*4 + 0x446660]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x41ab2a
push 0
push 0x4466a0
call ebx
jmp 0x41a967
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41af43
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x43d120]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x41af74
xor eax, eax
jmp 0x41b0fd
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4469e0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x41afb0
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0041f66a
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x41b08b
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x41b0c9
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x41b014
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x41b005
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x41afe5
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41b054
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x41b05d
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x41afd6
jmp 0x41b05f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x41b0f8
cmp dword [ebp - 0x6c], edi
je 0x41b0c9
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x41b0be
call fcn.00418c7a
mov dword [eax], 9
call fcn.00418c83
mov dword [eax], esi
jmp 0x41b0f3
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41b0b3
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x41b05f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x41b05f
push dword [ebp - 0x6c]
call fcn.00418c8c
pop ecx
jmp 0x41b0f3
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x41b0e1
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x41b0e1
xor eax, eax
jmp 0x41b0fb
call fcn.00418c7a
mov dword [eax], 0x1c
call fcn.00418c83
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x41b0fb
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00415ffe
add ebp, 0x3a0
leave
ret