joyce8/EMBER2024-capa huggingface dataset:
Function at 0x417d90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4fc040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x417e54
cmp byte [esi + 0x3e], 0
je 0x417e54
mov eax, dword [esi]
push edi
push 0xffff
call dword [eax + 0xc]
mov ecx, 0xffff
cmp cx, ax
je 0x417e42
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_wchar_t__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x417e09
sub eax, 1
je 0x417e0d
sub eax, 2
jne 0x417e42
mov byte [esi + 0x3e], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e3214
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3e], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x417e2b
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x417e42
cmp byte [esi + 0x3e], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e3214
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e3214
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004e3214
mov esp, ebp
pop ebp
ret
Function at 0x41c5c0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
mov edx, 0x811c9dc5
push edi
mov edi, dword [ebp + 8]
mov ecx, 0
sub esi, edi
je 0x41c5f1
nop dword [eax]
movzx eax, byte [edi + ecx]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, esi
jb 0x41c5e0
pop edi
mov eax, edx
pop esi
pop ebp
ret 8

Function at 0x41d350
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e6763
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x4fc040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x14], edi
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [ebp - 4], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0
mov dword [edi + 0x3c], 0
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 2
mov dword [edi + 0x50], eax
mov eax, dword [ebp + 8]
mov dword [edi + 0x54], eax
mov eax, dword [ebp + 0x1c]
mov dword [edi + 0x5c], eax
mov eax, dword [ebp + 0x18]
mov dword [edi + 0x68], eax
mov dword [edi + 0x58], ecx
mov dword [edi + 0x60], 0
mov byte [edi + 0x64], 0
mov eax, dword [ecx + 8]
shr eax, 3
and al, 1
mov byte [edi + 0x6c], al
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x70], eax
mov esi, dword [ecx + 0x18]
mov ecx, dword [edi + 0x44]
mov edx, ecx
sar edx, 3
mov dword [ebp - 0x10], ecx
cmp esi, edx
jae 0x41d457
lea ecx, [esi*8]
jmp 0x41d487
jbe 0x41d48a
mov eax, dword [edi + 0x48]
sar eax, 3
cmp esi, eax
jbe 0x41d46f
push ecx
push esi
lea ecx, [edi + 0x40]
call fcn.0041f1c0
jmp 0x41d48a
sub esi, edx
je 0x41d487
shl esi, 3
push esi
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [ebp - 0x10]
add esp, 0xc
add ecx, esi
mov dword [edi + 0x44], ecx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
Function at 0x453ec0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx + 4]
test eax, eax
je 0x453eed
push esi
lea esi, [edx + 1]
nop dword [eax + eax]
mov ecx, dword [eax + 0x98]
mov edx, esi
xor edx, ecx
and edx, 3
xor edx, ecx
mov dword [eax + 0x98], edx
mov eax, dword [eax + 8]
test eax, eax
jne 0x453ed0
pop esi
ret
Function at 0x460a20
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov eax, ecx
mov ebx, edx
push edi
push 0
push 0x14
mov dword [ebp - 4], ebx
mov dword [ebp - 8], eax
mov dword [eax], 0
call fcn.00427700
mov esi, eax
add esp, 8
test esi, esi
jne 0x460a55
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [0x4fc184], 0
je 0x460aa1
mov eax, dword [0x4fc280]
test eax, eax
je 0x460a75
push 0xc8
call eax
add esp, 4
test eax, eax
jne 0x460aa1
mov eax, dword [ebp + 8]
lea edi, [esi + 8]
mov dword [edi], ebx
lea ebx, [esi + 4]
push ebx
push 0
push esi
push 0x42ac90
push 0
push 0
mov dword [esi + 0xc], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [esi], eax
test eax, eax
jne 0x460ab4
jmp 0x460aa7
lea edi, [esi + 8]
lea ebx, [esi + 4]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
cmp dword [edi], 0
jne 0x460acd
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push dword [ebp + 8]
mov dword [ebx], eax
call dword [ebp - 4]
add esp, 4
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 8]
pop edi
mov dword [eax], esi
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401010
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x12c
mov eax, dword [0x4160f0]
push edi
mov dword [esp + 0x12c], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
jb 0x401085
jne 0x401081
cmp ah, 1
jb 0x401085
cmp ah, 1
ja 0x40106e
xor eax, eax
mov ecx, 0x46
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
mov dword [esp + 0xc], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40106e
cmp word [esp + 0x11c], 2
jb 0x401085
xor eax, eax
mov ecx, dword [esp + 0x12c]
call fcn.00409ac4
pop edi
mov esp, ebp
pop ebp
ret
cmp al, 5
jmp 0x40103d
mov ecx, dword [esp + 0x12c]
mov eax, 1
call fcn.00409ac4
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x4013d0
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x18]
sub esp, 8
cmp ecx, 8
jb 0x4013e4
mov eax, dword [eax + 4]
jmp 0x4013e7
add eax, 4
push esi
push 0
push 0x80
push 3
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x401435
lea eax, [esp + 8]
push eax
push esi
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov dword [esp + 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 4]
cmp eax, 0xffffffff
jne 0x401440
or eax, 0xffffffff
or edx, 0xffffffff
pop esi
add esp, 8
ret
mov edx, dword [esp + 8]
pop esi
add esp, 8
ret

Function at 0x401450
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
mov eax, dword [esp + 8]
cmp dword [eax + 0x18], 8
jb 0x40145f
mov eax, dword [eax + 4]
jmp 0x401462
add eax, 4
push ebx
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x401487
xor eax, eax
pop ebx
ret
movzx eax, word [esp + 8]
push edi
push 0xa
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x4014aa
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop ebx
ret
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
jne 0x4014e0
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
xor eax, eax
pop ebx
ret
push 0
lea ecx, [esp + 0x18]
push ecx
push edi
push eax
push ebx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push esi
je 0x4014cd
call dword [sym.imp.KERNEL32.dll_FreeResource]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4014da
mov ecx, dword [esp + 0x14]
xor eax, eax
pop esi
cmp edi, ecx
pop edi
sete al
pop ebx
ret
Function at 0x401960
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x58
push ebx
xor eax, eax
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
xor ebx, ebx
mov dword [esp + 0x20], 0x44
mov ecx, 0x10
lea edi, [esp + 0x24]
push 0x41119c
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], eax
rep stosd dword es:[edi], eax
call fcn.00409a7d
mov esi, dword [esp + 0x70]
mov ecx, dword [esi + 0x14]
add esp, 4
push eax
push 0x41119c
push ecx
push ebx
mov ecx, esi
call fcn.004010d0
test eax, eax
je 0x4019cd
cmp dword [esi + 0x18], 8
jb 0x4019bf
mov esi, dword [esi + 4]
jmp 0x4019c2
add esi, 4
push esi
call fcn.0040a089
add esp, 4
mov ebx, eax
push 0x41119c
call fcn.00409a7d
mov esi, dword [esp + 0x74]
mov edx, dword [esi + 0x14]
add esp, 4
push eax
push 0x41119c
push edx
push 0
mov ecx, esi
call fcn.004010d0
test eax, eax
jne 0x4019f9
xor edi, edi
jmp 0x401a07
cmp dword [esi + 0x18], 8
jb 0x401a04
mov edi, dword [esi + 4]
jmp 0x401a07
lea edi, [esi + 4]
push 0x41119c
call fcn.00409a7d
mov esi, dword [esp + 0x6c]
add esp, 4
push eax
mov eax, dword [esi + 0x14]
push 0x41119c
push eax
push 0
mov ecx, esi
call fcn.004010d0
test eax, eax
jne 0x401a33
xor esi, esi
jmp 0x401a41
cmp dword [esi + 0x18], 8
jb 0x401a3e
mov esi, dword [esi + 4]
jmp 0x401a41
add esi, 4
mov eax, dword [esp + 0x74]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
push edi
push 0
push eax
push 0
push 0
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test ebx, ebx
mov esi, eax
je 0x401a70
push ebx
call fcn.0040a018
add esp, 4
test esi, esi
jne 0x401a7e
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x58
ret
mov ecx, dword [esp + 0x10]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0x58
ret

Function at 0x4023f0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x40f7e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [esp + 0x34]
push esi
push eax
lea ecx, [esp + 0xc]
xor esi, esi
push ecx
mov dword [esp + 0xc], esi
call fcn.00402280
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x3c]
push eax
push esi
call fcn.00402340
mov eax, dword [esp + 0x30]
add esp, 0x10
cmp eax, 8
jb 0x402446
mov edx, dword [esp + 0xc]
push edx
call fcn.00409ad2
add esp, 4
mov ecx, dword [esp + 0x24]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x402950
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x214
mov eax, dword [0x4160f0]
push ebx
mov dword [esp + 0x214], eax
push esi
push edi
xor ebx, ebx
xor eax, eax
mov word [esp + 0x10], bx
mov ecx, 0x81
lea edi, [esp + 0x12]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], 8
mov dword [esp + 0xc], ebx
jb 0x402993
mov eax, dword [eax + 4]
jmp 0x402996
add eax, 4
push 0x104
lea ecx, [esp + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, ebx
je 0x4029e0
cmp eax, 0x103
jae 0x4029e0
cmp word [esp + 0x216], bx
jne 0x4029e0
mov esi, dword [ebp + 8]
lea edx, [esp + 0x10]
push edx
mov ecx, esi
call fcn.00402460
mov eax, esi
mov ecx, dword [esp + 0x21c]
call fcn.00409ac4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
push 0x41119c
mov word [esi + 4], bx
call fcn.00409a7d
add esp, 4
push eax
push 0x41119c
mov ecx, esi
call fcn.00402010
mov ecx, dword [esp + 0x21c]
mov eax, esi
call fcn.00409ac4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4037b0
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x40f980
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
mov eax, dword [0x4160f0]
push ebx
push ebp
push esi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x4c]
push edi
push eax
lea ecx, [esp + 0x14]
push ecx
call fcn.00403510
add esp, 8
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
xor esi, esi
mov dword [esp + 0x48], esi
mov ebp, edi
test edi, edi
je 0x4038af
mov ecx, ebx
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jae 0x4038af
mov edx, dword [esp + 0x50]
push ebp
push edx
lea eax, [esp + 0x28]
push eax
call fcn.00402c30
add esp, 0xc
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
mov byte [esp + 0x48], 1
jae 0x403845
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403864
test al, 0x10
je 0x403864
lea ecx, [esp + 0x20]
push ecx
call fcn.004037b0
add esp, 4
jmp 0x40387a
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x403873
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x38], 8
mov byte [esp + 0x48], 0
jb 0x403893
mov edx, dword [esp + 0x24]
push edx
call fcn.00409ad2
add esp, 4
xor eax, eax
inc esi
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], eax
mov word [esp + 0x24], ax
add ebp, 0x1c
jmp 0x4037f7
mov eax, dword [esp + 0x50]
cmp dword [eax + 0x18], 8
jb 0x4038be
mov eax, dword [eax + 4]
jmp 0x4038c1
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test edi, edi
je 0x4038e6
mov eax, dword [esp + 0x50]
push eax
lea ecx, [esp + 0x14]
push ecx
push ebx
push edi
call fcn.00402180
push edi
call fcn.00409ad2
add esp, 0x14
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x30]
pop ebx
call fcn.00409ac4
add esp, 0x3c
ret

Function at 0x403910
Capabilities:
Terminate process

Disassembly:
push 0x41119c
call fcn.00409a7d
add esp, 4
push eax
mov eax, dword [0x4160ac]
push 0x41119c
push eax
push 0
mov ecx, 0x416098
call fcn.004010d0
test eax, eax
je 0x403946
push 0x416098
call fcn.004037b0
add esp, 4
mov eax, dword [esp + 4]
cmp dword [eax + 0x18], 8
jb 0x403955
mov eax, dword [eax + 4]
jmp 0x403958
add eax, 4
push 0x10
push 0x411248
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 1
call fcn.0040a3ea
int3
Function at 0x403af0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40f99b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x234
mov eax, dword [0x4160f0]
push esi
push edi
xor esi, esi
push esi
mov dword [esp + 0x238], eax
mov dword [esp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov word [esp + 0x28], si
mov ecx, 0x81
lea edi, [esp + 0x2a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x28]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, esi
je 0x403b96
cmp eax, 0x103
jae 0x403b96
cmp word [esp + 0x22e], si
jne 0x403b96
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.00402460
mov ecx, dword [esp + 0x23c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x234]
mov eax, esi
call fcn.00409ac4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.Couldnt_get_default_temp_directory
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], esi
mov word [esp + 0x14], si
call fcn.00409a7d
add esp, 4
push eax
push str.Couldnt_get_default_temp_directory
lea ecx, [esp + 0x14]
call fcn.00402010
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0x248], esi
call fcn.00403910
int3
Function at 0x40a327
Capabilities:
Terminate process

Disassembly:
push 8
push 0x4131f0
call fcn.0040adb0
push 8
call fcn.0040bd58
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x416a74], esi
jne 0x40a35b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x416a70], esi
mov al, byte [ebp + 0x10]
mov byte [0x416a6c], al
cmp dword [ebp + 0xc], edi
jne 0x40a3a5
cmp dword [0x417270], edi
je 0x40a395
mov eax, dword [0x41726c]
sub eax, 4
mov dword [0x41726c], eax
cmp eax, dword [0x417270]
jb 0x40a395
mov eax, dword [eax]
cmp eax, edi
je 0x40a376
call eax
jmp 0x40a376
push 0x416028
mov eax, 0x416024
call fcn.0040a2a5
pop ecx
push 0x416034
mov eax, 0x41602c
call fcn.0040a2a5
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40a3d6
cmp dword [ebp + 0x10], edi
jne 0x40a3e4
mov dword [0x416a74], esi
push dword [ebp + 8]
call fcn.0040a263
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40a3e3
push 8
call fcn.0040bca3
pop ecx
ret
call fcn.0040adeb
ret
Function at 0x40a565
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x413210
call fcn.0040adb0
mov edi, 0x94
mov eax, edi
call fcn.0040d830
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 [0x416a34], ecx
mov eax, dword [esi + 4]
mov dword [0x416a40], eax
mov edx, dword [esi + 8]
mov dword [0x416a44], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x416a38], esi
cmp ecx, 2
je 0x40a5c5
or esi, 0x8000
mov dword [0x416a38], esi
shl eax, 8
add eax, edx
mov dword [0x416a3c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40a600
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40a600
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40a618
cmp eax, 0x20b
je 0x40a605
mov dword [ebp - 0x1c], esi
jmp 0x40a62c
cmp dword [ecx + 0x84], 0xe
jbe 0x40a600
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40a626
cmp dword [ecx + 0x74], 0xe
jbe 0x40a600
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040bbb4
pop ecx
test eax, eax
jne 0x40a640
push 0x1c
call fcn.0040a541
pop ecx
call fcn.0040b98d
test eax, eax
jne 0x40a651
push 0x10
call fcn.0040a541
pop ecx
call fcn.0040cc1c
mov dword [ebp - 4], esi
call fcn.0040d62f
test eax, eax
jge 0x40a66a
push 0x1b
call fcn.0040a51c
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x417264], eax
call fcn.0040d50d
mov dword [0x416a78], eax
call fcn.0040d46b
test eax, eax
jge 0x40a690
push 8
call fcn.0040a51c
pop ecx
call fcn.0040d238
test eax, eax
jge 0x40a6a1
push 9
call fcn.0040a51c
pop ecx
push 1
call fcn.0040a2bd
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40a6b7
push eax
call fcn.0040a51c
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040d1db
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40a6d8
movzx eax, word [ebp - 0x40]
jmp 0x40a6db
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00408bc0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40a6f9
push edi
call fcn.0040a3ea
call fcn.0040a40c
jmp 0x40a72b
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040adeb
ret
Function at 0x40cec7
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4160f0]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x416280]
je 0x40cefc
inc eax
cmp eax, 0x13
jb 0x40ceed
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x416280]
jne 0x40d022
mov eax, dword [0x416a80]
cmp eax, 1
je 0x40cffa
cmp eax, edx
jne 0x40cf2c
cmp dword [0x416130], 1
je 0x40cffa
cmp ecx, 0xfc
je 0x40d022
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40cf62
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040c8d0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040a810
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40cf96
mov eax, edi
push eax
call fcn.0040a810
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x413264
push edi
call fcn.0040d970
add esp, 0x10
push edi
call fcn.0040a810
push dword [esi + 0x416284]
mov ebx, eax
call fcn.0040a810
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040d830
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040c8d0
push edi
push ebx
call fcn.0040c8e0
push 0x413260
push ebx
call fcn.0040c8e0
push dword [esi + 0x416284]
push ebx
call fcn.0040c8e0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040d86d
add esp, 0x2c
jmp 0x40d022
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x416284]
push dword [esi]
call fcn.0040a810
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00409ac4
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40d86d
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x416d08], ebx
push esi
push edi
jne 0x40d8ed
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40d928
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x416d08], eax
je 0x40d928
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x416d0c], eax
call esi
cmp dword [0x416a34], 2
mov dword [0x416d10], eax
jne 0x40d8ed
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x416d18], eax
je 0x40d8ed
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x416d14], eax
mov eax, dword [0x416d14]
test eax, eax
je 0x40d932
call eax
test eax, eax
je 0x40d919
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x416d18]
test eax, eax
je 0x40d919
test byte [ebp - 8], 1
jne 0x40d932
cmp dword [0x416a40], 4
jb 0x40d92c
or byte [ebp + 0x12], 0x20
jmp 0x40d951
xor eax, eax
jmp 0x40d961
or byte [ebp + 0x12], 4
jmp 0x40d951
mov eax, dword [0x416d0c]
test eax, eax
je 0x40d951
call eax
mov ebx, eax
test ebx, ebx
je 0x40d951
mov eax, dword [0x416d10]
test eax, eax
je 0x40d951
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x416d08]
pop edi
pop esi
pop ebx
leave
ret