joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4660d0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4660fd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4660fd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x407f80
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x6000]
push edi
or ebp, 0xffffffff
jmp 0x407fa2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407fa9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407f98
mov eax, 1
add ebx, ebx
jne 0x407fbb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x407fb0
jne 0x407fcc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407fb0
xor ecx, ecx
sub eax, 3
jb 0x407fe0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x408052
mov ebp, eax
add ebx, ebx
jne 0x407feb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x407ff8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x40801c
inc ecx
add ebx, ebx
jne 0x408008
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x407ffd
jne 0x408019
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407ffd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x40803c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x40802d
jmp 0x407f9e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x40803c
add edi, ecx
jmp 0x407f9e
pop esi
mov edi, esi
mov ecx, 0x8f
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40805a
cmp byte [edi], 0
jne 0x40805a
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 0x40805f
lea edi, [esi + 0x5000]
mov eax, dword [edi]
or eax, eax
je 0x4080d7
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x8d64]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x8ddc]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40808c
mov ecx, edi
jns 0x4080bb
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 + 0x8de4]
or eax, eax
je 0x4080d1
mov dword [ebx], eax
add ebx, 4
jmp 0x4080a9
call dword [esi + 0x8de0]
mov ebp, dword [esi + 0x8de8]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x217]
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 0x40810b
sub esp, 0xffffff80
jmp 0x402130
Function at 0x431005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..text
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x431072
nop
nop
mov ebx, 0x40915c
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x5d8a59a7
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x431060
nop
nop
nop
mov eax, section..reloc
nop
cmp eax, 0
nop
nop
nop
nop
je 0x4310d2
nop
nop
nop
mov ebx, 0x42f3f8
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
mov esi, 0x5aca4661
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x4310c0
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x401130
Capabilities:
Create service
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x870
push esi
push 0xf003f
push 0
push 0
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x401172
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFilterService___:_OpenSCManager____error__d_n
call fcn.00407d25
add esp, 8
xor eax, eax
pop esi
add esp, 0x870
ret
push edi
xor eax, eax
mov ecx, 0x19
lea edi, [esp + 0x14]
push str.tcpip
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push 0x4142a8
push eax
call fcn.00407ccd
add esp, 0xc
push 0
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
push str.PNP_TDI
push str.system32driversIpFilter.sys
push 1
push 1
push 1
push 0xf01ff
push str.IpFilter
push str.IpFilter
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jne 0x401211
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x4011f1
push str.CreateFilterService___:_service_already_exist
call fcn.00407d25
add esp, 4
jmp 0x401214
push eax
push str.CreateFilterService___:_CreateService____error__d_n
call fcn.00407d25
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
xor eax, eax
pop esi
add esp, 0x870
ret
push eax
call edi
push esi
call edi
push str.IpFilter
push str.SYSTEMCurrentControlSetServices
lea eax, [esp + 0x80]
push str._s_s
push eax
call fcn.00407ccd
add esp, 0x10
lea ecx, [esp + 8]
push ecx
push 0x20006
push 0
lea edx, [esp + 0x84]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401272
push eax
push str.CreateFilterService___:_RegOpenKeyEx____error__d_n
call fcn.00407d25
add esp, 8
pop edi
xor eax, eax
pop esi
add esp, 0x870
ret
mov ecx, dword [esp + 8]
push 4
lea eax, [esp + 0x10]
push eax
push 4
push 0
push 0x4141ac
push ecx
mov dword [esp + 0x24], 0x32
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 8]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4012bf
push esi
push str.CreateFilterService___:_RegSetValueEx____error__d_n
call fcn.00407d25
add esp, 8
pop edi
xor eax, eax
pop esi
add esp, 0x870
ret
pop edi
mov eax, 1
pop esi
add esp, 0x870
ret
Function at 0x4012d0
Capabilities:
Delete service

Disassembly:
push ebp
push esi
push 0xf003f
xor ebp, ebp
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x401300
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.could_not_open_SCManager__error__d_n
call fcn.00407d25
add esp, 8
pop esi
xor eax, eax
pop ebp
ret
push ebx
push edi
push 0x10020
push str.IpFilter
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x401349
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp edi, 0x424
je 0x401393
call ebx
push eax
push str.could_not_open_service__error__d_n
call fcn.00407d25
add esp, 8
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
ret
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
test ebx, ebx
jne 0x40135e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
test ebx, ebx
je 0x401385
push str.Service_uninstalled_successfully_n
call fcn.00407d25
add esp, 4
pop edi
pop ebx
pop esi
mov eax, 1
pop ebp
ret
push ebp
push str.Service_cuold_not_be_deleted__error__d_n
call fcn.00407d25
add esp, 8
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
ret

Function at 0x4050a0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x4137e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push esi
push 0x21
push str.SYSTEMCurrentControlSetServices
lea ecx, [esp + 0x10]
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], 0
mov byte [esp + 0x14], 0
call fcn.00403010
push 0x5c
push 1
lea ecx, [esp + 0x10]
mov dword [esp + 0x34], 0
call fcn.00402a00
mov esi, dword [esp + 0x34]
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405100
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x10]
call fcn.00403130
cmp dword [esp + 0x20], 0x10
mov eax, dword [esp + 0xc]
jae 0x405123
lea eax, [esp + 0xc]
lea ecx, [esp + 4]
push ecx
push 0x20006
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40515e
push eax
push esi
push str.SetTag___:_RegOpenKeyEx1__s___error__d_n
call fcn.00407d25
mov eax, dword [esp + 0x2c]
add esp, 0xc
cmp eax, 0x10
jb 0x405198
mov edx, dword [esp + 0xc]
push edx
jmp 0x405190
mov ecx, dword [esp + 4]
push 4
lea eax, [esp + 0x3c]
push eax
push 4
push 0
push 0x4141ac
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x20], 0x10
jb 0x405198
mov eax, dword [esp + 0xc]
push eax
call fcn.00407d8b
add esp, 4
mov ecx, dword [esp + 0x24]
pop esi
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x4052b0
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x1114
call fcn.00408590
push edi
mov edi, dword [esp + 0x111c]
push edi
push str.SYSTEMCurrentControlSetServices
lea eax, [esp + 0x120]
push str._s_s
push eax
call fcn.00407ccd
add esp, 0x10
lea ecx, [esp + 4]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x124]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40531e
push eax
lea eax, [esp + 0x11c]
push eax
push str.GetTag___:_GetServiceInfo__s___error__d_n
call fcn.00407d25
add esp, 0xc
pop edi
add esp, 0x1114
ret
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x920]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push str.Group
push ecx
mov dword [esp + 0x24], 0x200
call esi
test eax, eax
jne 0x4053d7
lea edx, [esp + 0x91c]
push str.PNP_TDI
push edx
call fcn.00407809
add esp, 8
test eax, eax
jne 0x4053d7
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x14]
push edx
mov byte [esp + eax + 0x924], 0
lea eax, [esp + 0x1c]
push eax
push 0
push 0x4141ac
push ecx
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 0
call esi
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
push eax
push edi
lea ecx, [esp + 0x20]
call fcn.004010c0
mov ecx, dword [esp + 0x1124]
push eax
call fcn.00405220
pop esi
pop edi
add esp, 0x1114
ret
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop edi
add esp, 0x1114
ret

Function at 0x4053f0
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x210
lea eax, [esp]
push eax
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServices
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x405444
push 0x4144f4
push eax
push str.EnumerateServices___:_RegOpenKeyEx__error
push 0x41a3f0
call fcn.00402bf0
add esp, 8
mov ecx, eax
call fcn.00402820
push eax
call fcn.00402bf0
add esp, 8
add esp, 0x210
ret
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
xor esi, esi
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
push esi
push esi
push esi
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x2c]
push eax
push esi
push ecx
mov dword [esp + 0x2c], 0x200
call edi
test eax, eax
jne 0x4054b9
push ebx
mov ebx, dword [esp + 0x220]
lea esp, [esp]
lea edx, [esp + 0x1c]
push ebx
push edx
call fcn.004052b0
add esp, 8
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x10]
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x30]
push edx
inc esi
push esi
push eax
mov dword [esp + 0x30], 0x200
call edi
test eax, eax
je 0x405480
pop ebx
cmp eax, 0x103
pop edi
pop esi
je 0x4054ea
push 0x4144f4
push eax
push str.EnumerateServices___:_RegEnumKeyEx__error
push 0x41a3f0
call fcn.00402bf0
add esp, 8
mov ecx, eax
call fcn.00402820
push eax
call fcn.00402bf0
add esp, 8
mov ecx, dword [esp]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x210
ret
Function at 0x405780
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0
push str.ConsoleWindowClass
call dword [sym.imp.USER32.dll_FindWindowA]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
lea eax, [esp + 8]
push eax
mov word [esp + 0xc], 0x2f
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call fcn.00401070
mov esi, eax
add esp, 8
test esi, esi
je 0x405827
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push str.uninstall
push esi
call edi
test eax, eax
jne 0x4057dd
call fcn.004012d0
pop edi
xor eax, eax
pop esi
pop ecx
ret
push str.correct
push esi
call edi
test eax, eax
je 0x40580d
push str.list
push esi
call edi
test eax, eax
jne 0x4057f8
push eax
jmp 0x40580f
push str.install
push esi
call edi
test eax, eax
jne 0x405827
call fcn.00401130
test eax, eax
je 0x405834
push 1
call fcn.00405500
push str.Well_done.
call fcn.00407d25
add esp, 8
pop edi
xor eax, eax
pop esi
pop ecx
ret
push str.use__install_or__uninstall_key
call fcn.00407d25
add esp, 4
pop edi
xor eax, eax
pop esi
pop ecx
ret
Function at 0x408616
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x4147e8
call fcn.00409704
mov edi, 0x94
mov eax, edi
call fcn.00408590
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 [0x41a62c], ecx
mov eax, dword [esi + 4]
mov dword [0x41a638], eax
mov edx, dword [esi + 8]
mov dword [0x41a63c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41a630], esi
cmp ecx, 2
je 0x408676
or esi, 0x8000
mov dword [0x41a630], esi
shl eax, 8
add eax, edx
mov dword [0x41a634], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x4086af
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4086af
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4086c7
cmp eax, 0x20b
je 0x4086b4
mov dword [ebp - 0x1c], edi
jmp 0x4086db
cmp dword [ecx + 0x84], 0xe
jbe 0x4086af
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x4086d5
cmp dword [ecx + 0x74], 0xe
jbe 0x4086af
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040db04
pop ecx
test eax, eax
jne 0x4086ef
push 0x1c
call fcn.004085f2
pop ecx
call fcn.0040bd37
test eax, eax
jne 0x408700
push 0x10
call fcn.004085f2
pop ecx
call fcn.0040da62
mov dword [ebp - 4], edi
call fcn.0040d864
test eax, eax
jge 0x408719
push 0x1b
call fcn.004085cd
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41bcf4], eax
call fcn.0040d742
mov dword [0x41a494], eax
call fcn.0040d6a0
test eax, eax
jge 0x40873f
push 8
call fcn.004085cd
pop ecx
call fcn.0040d46d
test eax, eax
jge 0x408750
push 9
call fcn.004085cd
pop ecx
push 1
call fcn.0040cfec
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x408766
push eax
call fcn.004085cd
pop ecx
mov eax, dword [0x41a64c]
mov dword [0x41a650], eax
push eax
push dword [0x41a644]
push dword [0x41a640]
call fcn.00405780
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x408795
push esi
call fcn.0040d119
call fcn.0040d13b
jmp 0x4087c7
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.0040973f
ret
Function at 0x40d056
Capabilities:
Terminate process

Disassembly:
push 8
push 0x4151d0
call fcn.00409704
push 8
call fcn.00408bca
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x41a66c], esi
jne 0x40d08a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x41a668], esi
mov al, byte [ebp + 0x10]
mov byte [0x41a664], al
cmp dword [ebp + 0xc], edi
jne 0x40d0d4
cmp dword [0x41aa88], edi
je 0x40d0c4
mov eax, dword [0x41aa84]
sub eax, 4
mov dword [0x41aa84], eax
cmp eax, dword [0x41aa88]
jb 0x40d0c4
mov eax, dword [eax]
cmp eax, edi
je 0x40d0a5
call eax
jmp 0x40d0a5
push 0x41904c
mov eax, 0x419044
call fcn.0040cfd4
pop ecx
push 0x419058
mov eax, 0x419050
call fcn.0040cfd4
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40d105
cmp dword [ebp + 0x10], edi
jne 0x40d113
mov dword [0x41a66c], esi
push dword [ebp + 8]
call fcn.0040cf92
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40d112
push 8
call fcn.00408b15
pop ecx
ret
call fcn.0040973f
ret

Function at 0x40d159
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4198a0]
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 + 0x419c78]
je 0x40d18e
inc eax
cmp eax, 0x13
jb 0x40d17f
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x419c78]
jne 0x40d2b4
mov eax, dword [0x41a49c]
cmp eax, 1
je 0x40d28c
cmp eax, edx
jne 0x40d1be
cmp dword [0x419434], 1
je 0x40d28c
cmp ecx, 0xfc
je 0x40d2b4
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 0x40d1f4
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040ca20
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00409d90
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40d228
mov eax, edi
push eax
call fcn.00409d90
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4155c8
push edi
call fcn.0040e970
add esp, 0x10
push edi
call fcn.00409d90
push dword [esi + 0x419c7c]
mov ebx, eax
call fcn.00409d90
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00408590
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040ca20
push edi
push ebx
call fcn.0040ca30
push 0x4155a8
push ebx
call fcn.0040ca30
push dword [esi + 0x419c7c]
push ebx
call fcn.0040ca30
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00411e41
add esp, 0x2c
jmp 0x40d2b4
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x419c7c]
push dword [esi]
call fcn.00409d90
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.00409bce
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40f410
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 0x40f43e
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 0x40f445
cmp ebx, dword [eax + 4]
jae 0x40f445
xor eax, eax
jmp 0x40f635
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40f456
xor eax, eax
inc eax
jmp 0x40f634
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40f46c
cmp ecx, edx
jae 0x40f5b1
cmp dword [eax + 4], 0
je 0x40f475
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40f45d
cmp dword [ebp + 8], 0
je 0x40f497
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40f5b1
cmp eax, esi
jae 0x40f5b1
mov eax, dword [0x41a808]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40f4bc
cmp dword [esi*4 + 0x41a810], edi
je 0x40f5b5
inc esi
cmp esi, eax
jl 0x40f4aa
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40f631
cmp dword [ebp - 8], 0x1000000
jne 0x40f631
test byte [ebp - 0xc], 0xcc
je 0x40f53a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40f631
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40f631
cmp word [eax + 0x18], 0x10b
jne 0x40f631
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40f631
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40f53a
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40f53a
test byte [ecx + 0x27], 0x80
jne 0x40f5b1
push 1
push 0x41a850
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40f44e
mov ecx, dword [0x41a808]
test ecx, ecx
mov edx, ecx
jle 0x40f56e
lea eax, [ecx*4 + 0x41a80c]
cmp dword [eax], edi
je 0x40f56e
dec edx
sub eax, 4
test edx, edx
jg 0x40f562
test edx, edx
jne 0x40f59f
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40f57b
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40f593
lea eax, [edx*4 + 0x41a810]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40f581
cmp ecx, 0x10
jge 0x40f59f
inc ecx
mov dword [0x41a808], ecx
push 0
push 0x41a850
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40f44e
xor eax, eax
jmp 0x40f634
test esi, esi
jle 0x40f44e
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41a850
call ebx
test eax, eax
jne 0x40f44e
cmp dword [esi*4 + 0x41a810], edi
je 0x40f60b
mov eax, dword [0x41a808]
lea esi, [eax - 1]
test esi, esi
jl 0x40f5f9
cmp dword [esi*4 + 0x41a810], edi
je 0x40f5f5
dec esi
jns 0x40f5e9
test esi, esi
jge 0x40f609
cmp eax, 0x10
jge 0x40f604
inc eax
mov dword [0x41a808], eax
lea esi, [eax - 1]
jmp 0x40f60b
je 0x40f623
xor ecx, ecx
test esi, esi
jl 0x40f623
lea eax, [ecx*4 + 0x41a810]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40f611
push 0
push 0x41a850
call ebx
jmp 0x40f44e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret