joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4099c0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x28]
mov eax, dword [esi]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x14]
or edx, 0x20019
push edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
push 0
push eax
push ecx
mov dword [esp + 0x18], 0
mov dword [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409a99
mov ecx, dword [esi]
mov edx, dword [esp + 0x24]
push ebx
mov ebx, ecx
shr ecx, 2
push edi
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
test eax, eax
je 0x409a75
lea ecx, [esp + 0x10]
push ecx
push edx
lea edx, [esp + 0x14]
push edx
push 0
push eax
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x30]
push ecx
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x409a5c
pop edi
pop ebx
mov eax, 0xfffffffe
pop esi
add esp, 8
ret
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
pop edi
mov dword [edx], eax
pop ebx
mov dword [esi], ecx
xor eax, eax
pop esi
add esp, 8
ret
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], 0x1020001
pop ebx
mov dword [esi], 0
xor eax, eax
pop esi
add esp, 8
ret
or eax, 0xffffffff
pop esi
add esp, 8
ret

Function at 0x409ae0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x250
push esi
push edi
xor eax, eax
mov byte [esp + 8], 0
mov ecx, 0x43
lea edi, [esp + 9]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
stosb byte es:[edi], al
push 0x10e
lea eax, [esp + 0xc]
push eax
push ecx
xor esi, esi
call fcn.00409430
add esp, 0xc
lea edx, [esp + 0x118]
push edx
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x409b62
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x409b72
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x409b5d
mov eax, 0x400f
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x409b6d
mov eax, 0x4010
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov esi, 0x4021
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40a1a0
Capabilities:
Terminate thread

Disassembly:
sub esp, 0x14
mov edx, dword [esp + 0x1c]
push edi
mov edi, dword [esp + 0x2c]
test edi, edi
mov dword [esp + 4], 0
jg 0x40a1d3
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
add esp, 0x14
ret
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push esi
mov dword [esp + 0x10], edx
lea edx, [esp + 8]
push edx
push 0
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
push 0x40a170
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x3c]
push 0
push 0
mov dword [esp + 0x30], ecx
call fcn.0040d9f8
mov esi, eax
add esp, 0x18
test esi, esi
je 0x40a271
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
imul edi, edi, 0x3e8
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
test eax, eax
jne 0x40a24f
lea ecx, [esp + 0x30]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
pop esi
pop edi
add esp, 0x14
ret
push 0xffffffffffffff9c
push esi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push esi
mov dword [esp + 0x34], 0xffffff9c
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
pop esi
pop edi
add esp, 0x14
ret
pop esi
or eax, 0xffffffff
pop edi
add esp, 0x14
ret

Function at 0x40a280
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc4
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
push eax
xor ebx, ebx
mov dword [esp + 0x34], 0x9c
call esi
test eax, eax
jne 0x40a2d1
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x34], 0x94
call esi
test eax, eax
jne 0x40a2d1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x34]
cmp eax, 6
jae 0x40a2e6
cmp eax, 5
jne 0x40a320
cmp dword [esp + 0x38], 2
jne 0x40a320
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push str.GetNativeSystemInfo
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a313
lea ecx, [esp + 0xc]
push ecx
call eax
cmp word [esp + 0xc], 9
jne 0x40a320
mov ebx, 1
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d720
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
sub esp, 0x110
push ebp
push edi
mov edi, dword [esp + 0x11c]
xor ebp, ebp
test edi, edi
je 0x40d8a8
cmp byte [edi], 0
je 0x40d8a8
push ebp
push ebp
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jl 0x40d89d
push ebp
push ebp
push ebp
push 3
push ebp
push ebp
push ebp
push 0xffffffffffffffff
push ebp
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
jl 0x40d897
lea eax, [esp + 0x10]
push eax
push 0x41e704
push 1
push ebp
push 0x41e7d4
mov dword [esp + 0x24], ebp
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40d897
push str.ROOTCIMV2
lea ecx, [esp + 0xc]
mov dword [esp + 0x10], ebp
call fcn.0040d4a0
mov eax, dword [eax]
test eax, eax
je 0x40d7ab
mov ecx, dword [eax]
jmp 0x40d7ad
xor ecx, ecx
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
push esi
lea esi, [esp + 0x10]
push esi
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
push eax
call dword [edx + 0xc]
lea ecx, [esp + 0xc]
mov esi, eax
call fcn.0040d590
test esi, esi
pop esi
jl 0x40d88d
mov eax, dword [esp + 0xc]
push 0
push 0
push 3
push 3
push 0
push 0
push 0xa
push eax
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jl 0x40d883
mov edx, dword [esp + 0xc]
lea ecx, [esp + 8]
push ecx
push edi
push edx
mov dword [esp + 0x14], 0
call fcn.0040d5b0
mov ebp, eax
add esp, 0xc
cmp ebp, 1
je 0x40d872
push 0x2e
push edi
call fcn.0040e380
add esp, 8
test eax, eax
je 0x40d844
push 4
push str..exe
push eax
call fcn.0040f086
add esp, 0xc
test eax, eax
je 0x40d86d
push edi
lea eax, [esp + 0x18]
push str._s.exe
push eax
call fcn.0040dbb4
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x24]
push edx
push eax
call fcn.0040d5b0
add esp, 0x18
mov ebp, eax
cmp ebp, 1
jne 0x40d883
mov eax, dword [esp + 0x120]
test eax, eax
je 0x40d883
mov ecx, dword [esp + 8]
mov dword [eax], ecx
mov eax, dword [esp + 0xc]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
mov eax, ebp
pop ebp
add esp, 0x110
ret
pop edi
xor eax, eax
pop ebp
add esp, 0x110
ret

Function at 0x40d9f8
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x40da15
call fcn.0040ec89
mov dword [eax], 0x16
xor eax, eax
jmp 0x40da7f
push esi
push 0x8c
push 1
call fcn.00410004
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x40da6a
push esi
call fcn.0040f9a1
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x40da48
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x40d963
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x40da7e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.0040e24d
test ebx, ebx
pop ecx
je 0x40da7c
push ebx
call fcn.0040ec9b
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40f7a6
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41d5e8
call fcn.0040ffb8
mov edi, 0x94
mov eax, edi
call fcn.0040de90
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 [0x421cb8], ecx
mov eax, dword [esi + 4]
mov dword [0x421cc4], eax
mov edx, dword [esi + 8]
mov dword [0x421cc8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x421cbc], esi
cmp ecx, 2
je 0x40f806
or esi, 0x8000
mov dword [0x421cbc], esi
shl eax, 8
add eax, edx
mov dword [0x421cc0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40f841
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40f841
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40f859
cmp eax, 0x20b
je 0x40f846
mov dword [ebp - 0x1c], esi
jmp 0x40f86d
cmp dword [ecx + 0x84], 0xe
jbe 0x40f841
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40f867
cmp dword [ecx + 0x74], 0xe
jbe 0x40f841
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0041184e
pop ecx
test eax, eax
jne 0x40f881
push 0x1c
call fcn.0040f782
pop ecx
call fcn.0040fb9b
test eax, eax
jne 0x40f892
push 0x10
call fcn.0040f782
pop ecx
call fcn.00415cc1
mov dword [ebp - 4], esi
call fcn.00414115
test eax, eax
jge 0x40f8ab
push 0x1b
call fcn.0040f75d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x423534], eax
call fcn.00415b9f
mov dword [0x421c98], eax
call fcn.00415afd
test eax, eax
jge 0x40f8d1
push 8
call fcn.0040f75d
pop ecx
call fcn.004158ca
test eax, eax
jge 0x40f8e2
push 9
call fcn.0040f75d
pop ecx
push 1
call fcn.0040fce4
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40f8f8
push eax
call fcn.0040f75d
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041586d
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40f919
movzx eax, word [ebp - 0x40]
jmp 0x40f91c
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040b810
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40f93a
push edi
call fcn.0040fe11
call fcn.0040fe33
jmp 0x40f96c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040fff3
ret
Function at 0x40fd4e
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41d658
call fcn.0040ffb8
push 8
call fcn.004119f2
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x421cf8], esi
jne 0x40fd82
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x421cf4], esi
mov al, byte [ebp + 0x10]
mov byte [0x421cf0], al
cmp dword [ebp + 0xc], edi
jne 0x40fdcc
cmp dword [0x42352c], edi
je 0x40fdbc
mov eax, dword [0x423528]
sub eax, 4
mov dword [0x423528], eax
cmp eax, dword [0x42352c]
jb 0x40fdbc
mov eax, dword [eax]
cmp eax, edi
je 0x40fd9d
call eax
jmp 0x40fd9d
push 0x420034
mov eax, 0x42002c
call fcn.0040fccc
pop ecx
push 0x420040
mov eax, 0x420038
call fcn.0040fccc
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40fdfd
cmp dword [ebp + 0x10], edi
jne 0x40fe0b
mov dword [0x421cf8], esi
push dword [ebp + 8]
call fcn.0040fc8a
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40fe0a
push 8
call fcn.0041193d
pop ecx
ret
call fcn.0040fff3
ret
Function at 0x410b89
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x410d5f
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4223e0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x410d5f
test cl, 0x48
je 0x410bf4
cmp byte [eax + 5], 0xa
je 0x410bf4
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x410c46
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x410c2e
call fcn.0040ec89
mov dword [eax], 9
call fcn.0040ec92
mov dword [eax], esi
jmp 0x410c3e
cmp eax, 0x6d
je 0x410d5f
push eax
call fcn.0040ec9b
pop ecx
or eax, 0xffffffff
jmp 0x410d61
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x410d5a
test eax, eax
je 0x410c6d
cmp byte [ebx], 0xa
jne 0x410c6d
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x410c76
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x410d54
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x410d44
cmp al, 0xd
je 0x410ca8
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x410d36
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x410cc2
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x410cbd
add dword [ebp + 0x10], 2
jmp 0x410d16
mov dword [ebp + 0x10], eax
jmp 0x410d32
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x410cea
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x410d32
cmp dword [ebp - 0xc], 0
je 0x410d32
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x410d0b
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x410d16
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x410d35
cmp ebx, dword [ebp + 0xc]
jne 0x410d1b
cmp byte [ebp - 1], 0xa
jne 0x410d1b
mov byte [ebx], 0xa
jmp 0x410d35
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00416595
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x410d36
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x410c8c
jmp 0x410d54
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x410d54
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x410d61
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x412dbe
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.0040de90
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x412e59
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 [0x421cb8]
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 0x412e59
cmp eax, 1
je 0x412e7a
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 0x412e59
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x412e26
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x412e55
xor eax, eax
inc eax
jmp 0x412e99
cmp edi, eax
jae 0x412e5d
xor eax, eax
jmp 0x412e99
cmp eax, esi
jae 0x412e64
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 [0x421cb8]
jmp 0x412e7d
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 0x413eae
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x420f30]
xor ecx, ecx
xor eax, ebp
cmp dword [ebp + 0x3b4], ecx
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ecx
jne 0x413eea
xor eax, eax
jmp 0x414054
mov eax, dword [ebp + 0x3ac]
push ebx
mov ebx, dword [ebp + 0x3ac]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4223e0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x413f28
push 2
push ecx
push ecx
push dword [ebp + 0x3ac]
call fcn.00416595
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x413fc2
cmp dword [ebp + 0x3b4], ecx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
jbe 0x414025
jmp 0x413f4c
xor ecx, ecx
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x413f87
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x413f78
inc dword [ebp - 0x78]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x6c]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x6c]
cmp dword [ebp - 0x6c], 0x400
jl 0x413f58
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x413fe6
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x413fef
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x7c]
cmp eax, dword [ebp + 0x3b4]
jb 0x413f4a
jmp 0x413fef
push ecx
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x413fe6
mov eax, dword [ebp - 0x80]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x74], eax
jmp 0x413fef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x41404f
cmp dword [ebp - 0x68], eax
je 0x414022
push 5
pop esi
cmp dword [ebp - 0x68], esi
jne 0x414017
call fcn.0040ec89
mov dword [eax], 9
call fcn.0040ec92
mov dword [eax], esi
jmp 0x41404a
push dword [ebp - 0x68]
call fcn.0040ec9b
pop ecx
jmp 0x41404a
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x414037
cmp byte [edi], 0x1a
jne 0x414037
xor eax, eax
jmp 0x414052
call fcn.0040ec89
mov dword [eax], 0x1c
call fcn.0040ec92
and dword [eax], 0
or eax, 0xffffffff
jmp 0x414052
sub eax, dword [ebp - 0x78]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.00414818
add ebp, 0x3a4
leave
ret
Function at 0x4144b3
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 0x4144e1
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 0x4144e8
cmp ebx, dword [eax + 4]
jae 0x4144e8
xor eax, eax
jmp 0x4146d8
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4144f9
xor eax, eax
inc eax
jmp 0x4146d7
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x41450f
cmp ecx, edx
jae 0x414654
cmp dword [eax + 4], 0
je 0x414518
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x414500
cmp dword [ebp + 8], 0
je 0x41453a
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x414654
cmp eax, esi
jae 0x414654
mov eax, dword [0x421f20]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41455f
cmp dword [esi*4 + 0x421f28], edi
je 0x414658
inc esi
cmp esi, eax
jl 0x41454d
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4146d4
cmp dword [ebp - 8], 0x1000000
jne 0x4146d4
test byte [ebp - 0xc], 0xcc
je 0x4145dd
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4146d4
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4146d4
cmp word [eax + 0x18], 0x10b
jne 0x4146d4
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4146d4
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4145dd
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4145dd
test byte [ecx + 0x27], 0x80
jne 0x414654
push 1
push 0x421f68
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4144f1
mov ecx, dword [0x421f20]
test ecx, ecx
mov edx, ecx
jle 0x414611
lea eax, [ecx*4 + 0x421f24]
cmp dword [eax], edi
je 0x414611
dec edx
sub eax, 4
test edx, edx
jg 0x414605
test edx, edx
jne 0x414642
push 0xf
pop ebx
cmp ecx, ebx
jg 0x41461e
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x414636
lea eax, [edx*4 + 0x421f28]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x414624
cmp ecx, 0x10
jge 0x414642
inc ecx
mov dword [0x421f20], ecx
push 0
push 0x421f68
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4144f1
xor eax, eax
jmp 0x4146d7
test esi, esi
jle 0x4144f1
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x421f68
call ebx
test eax, eax
jne 0x4144f1
cmp dword [esi*4 + 0x421f28], edi
je 0x4146ae
mov eax, dword [0x421f20]
lea esi, [eax - 1]
test esi, esi
jl 0x41469c
cmp dword [esi*4 + 0x421f28], edi
je 0x414698
dec esi
jns 0x41468c
test esi, esi
jge 0x4146ac
cmp eax, 0x10
jge 0x4146a7
inc eax
mov dword [0x421f20], eax
lea esi, [eax - 1]
jmp 0x4146ae
je 0x4146c6
xor ecx, ecx
test esi, esi
jl 0x4146c6
lea eax, [ecx*4 + 0x421f28]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4146b4
push 0
push 0x421f68
call ebx
jmp 0x4144f1
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4156bc
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x420f30]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x420f50]
je 0x4156f3
inc eax
cmp eax, 0x13
jb 0x4156e4
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x420f50]
jne 0x415816
mov eax, dword [0x421ca0]
cmp eax, 1
je 0x4157f1
cmp eax, edx
jne 0x415723
cmp dword [0x420800], 1
je 0x4157f1
cmp ecx, 0xfc
je 0x415816
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x415759
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00412570
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00412670
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41578d
mov eax, edi
push eax
call fcn.00412670
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x41de20
push edi
call fcn.0040da90
add esp, 0x10
push edi
call fcn.00412670
push dword [esi + 0x420f54]
mov ebx, eax
call fcn.00412670
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040de90
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00412570
push edi
push ebx
call fcn.00412580
push 0x41de00
push ebx
call fcn.00412580
push dword [esi + 0x420f54]
push ebx
call fcn.00412580
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00417dbb
add esp, 0x2c
jmp 0x415816
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x420f54]
push dword [esi]
call fcn.00412670
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]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.00414818
add ebp, 0x90
leave
ret