joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4012a4
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
call sym.___main
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
add esp, 0xfffffff4
push 0x401230
call sym._puts
add esp, 0x10
nop
call sym._getchar
mov eax, eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x2e
jne 0x4012f0
jmp 0x401330
inc dword [ebp - 8]
cmp dword [ebp - 4], 0xa
jne 0x4012fc
inc dword [ebp - 0x10]
cmp dword [ebp - 4], 0xa
je 0x401310
cmp dword [ebp - 4], 0x20
je 0x401310
cmp dword [ebp - 4], 9
je 0x401310
jmp 0x40131c
mov dword [ebp - 0x14], 0
jmp 0x40132c
cmp dword [ebp - 0x14], 0
jne 0x40132c
mov dword [ebp - 0x14], 1
inc dword [ebp - 0xc]
jmp 0x4012dc
add esp, 0xfffffff8
push 0x401268
push 0x412028
call sym.___ls__7ostreamPCc
add esp, 0x10
add esp, 0xfffffff8
mov eax, dword [ebp - 8]
push eax
push 0x40127a
call sym._printf
add esp, 0x10
add esp, 0xfffffff8
push 0x40127f
push 0x412028
call sym.___ls__7ostreamPCc
add esp, 0x10
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
push eax
push 0x40127a
call sym._printf
add esp, 0x10
add esp, 0xfffffff8
push 0x40128c
push 0x412028
call sym.___ls__7ostreamPCc
add esp, 0x10
add esp, 0xfffffff8
mov eax, dword [ebp - 0x10]
push eax
push 0x40127a
call sym._printf
add esp, 0x10
add esp, 0xfffffff4
push 0x40129c
call sym._system
add esp, 0x10
xor eax, eax
jmp 0x4013c4
leave
ret

Function at 0x403170
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov edx, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
cmp eax, 1
jne 0x4031a8
add esp, 0xfffffff4
push dword [edx + 0x4c]
call sym._getc
cmp eax, 0xffffffff
jne 0x40319c
xor eax, eax
jmp 0x4031b4
mov byte [ebx], al
mov eax, 1
jmp 0x4031b4
push dword [edx + 0x4c]
push eax
push 1
push ebx
call sym._fread
mov ebx, dword [ebp - 0x18]
leave
ret

Function at 0x4031bc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push ebx
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
push dword [ebx + 0x4c]
push esi
push 1
push dword [ebp + 0xc]
call sym._fwrite
mov edx, dword [ebx + 0x40]
test edx, edx
jl 0x4031e4
add edx, esi
mov dword [ebx + 0x40], edx
lea esp, [ebp - 0x18]
pop ebx
pop esi
leave
ret

Function at 0x4032b4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov edx, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx]
shr eax, 1
xor al, 1
test al, 1
jne 0x4032dc
push dword [edx + 0x4c]
push ecx
push 1
push ebx
call sym._fwrite
jmp 0x4032e7
add esp, 0xfffffffc
push ecx
push ebx
push edx
call sym._xsputn__9streambufPCci
mov ebx, dword [ebp - 0x18]
leave
ret

Function at 0x405e60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
add esp, 0xfffffffc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax + 0x38]
call sym._read
leave
ret
Function at 0x40a73c
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x40a764
mov dword [0x413164], eax
add esp, 0xfffffff8
push sym._eh_context_free
push eax
call sym.___mingwthr_key_dtor
jmp 0x40a769
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x40a77c
mov dword [sym._eh_context_initialize], 0x40a85c
jmp 0x40a786
mov dword [sym._eh_context_initialize], 0x40a810
leave
ret

Function at 0x40a85c
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push ebx
mov ebx, dword [0x413164]
call sub.KERNEL32.dll_GetLastError
mov esi, eax
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_TlsGetValue
mov ebx, eax
push esi
call sub.KERNEL32.dll_SetLastError
add esp, 0xc
test ebx, ebx
jne 0x40a8bb
call sym._new_eh_context
mov ebx, eax
add esp, 0xfffffff8
push ebx
push dword [0x413164]
call sub.KERNEL32.dll_TlsSetValue
add esp, 8
test eax, eax
jne 0x40a8b0
call sub.KERNEL32.dll_GetLastError
jmp 0x40a8b2
xor eax, eax
test eax, eax
je 0x40a8bb
call sym.___terminate
mov eax, ebx
lea esp, [ebp - 0x18]
pop ebx
pop esi
leave
ret
Function at 0x40e4a0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x41c20c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x128], ecx
lea ecx, [ebp - 0x10]
call fcn.00409980
push 0x2001f
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx]
push edx
lea ecx, [ebp - 0x10]
call fcn.0040e450
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40e4fe
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x11c], eax
lea ecx, [ebp - 0x10]
call fcn.0040e2f0
mov eax, dword [ebp - 0x11c]
jmp 0x40e58f
mov dword [ebp - 4], 0x100
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0
push 0
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x118]
push eax
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x40e564
lea edx, [ebp - 0x118]
push edx
lea ecx, [ebp - 0x10]
call fcn.0040e4a0
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40e55b
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x120], eax
lea ecx, [ebp - 0x10]
call fcn.0040e2f0
mov eax, dword [ebp - 0x120]
jmp 0x40e58f
mov dword [ebp - 4], 0x100
jmp 0x40e505
lea ecx, [ebp - 0x10]
call fcn.0040e3a0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x128]
call fcn.0040e360
mov dword [ebp - 0x124], eax
lea ecx, [ebp - 0x10]
call fcn.0040e2f0
mov eax, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x18]
call fcn.00410ceb
mov esp, ebp
pop ebp
ret 4
Function at 0x40ec20
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esp, ebp
pop ebp
ret 0xc

Function at 0x40ec60
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 1
jne 0x40ec76
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 7
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esp, ebp
pop ebp
ret 8

Function at 0x410117
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x1c
push ebp
xor ebp, ebp
cmp dword [0x41c984], ebp
jne 0x4101e6
cmp dword [0x41c980], ebp
jne 0x4101e6
cmp dword [0x41c98c], ebp
push esi
je 0x4101d4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [0x41c9a8]
cmp esi, ebp
je 0x410160
mov edx, dword [0x41c9ac]
mov ecx, eax
sub ecx, edx
cmp ecx, esi
jb 0x4101d4
mov ecx, dword [0x41c1d4]
cmp ecx, 0xffffffff
je 0x410174
sub eax, ecx
cmp eax, 0xc8
jb 0x4101de
push edi
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push 3
mov esi, 0x113
push esi
push esi
push ebx
lea eax, [esp + 0x1c]
push eax
mov dword [0x41c984], 1
call edi
push 3
push esi
push esi
push ebx
lea eax, [esp + 0x1c]
push eax
call edi
push ebp
push ebp
push 0x8000
push ebx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, ebp
mov dword [0x41c980], eax
mov dword [0x41c984], ebp
pop edi
jne 0x4101c7
push ebp
call dword [sym.imp.USER32.dll_SetCursor]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x41c1d4], eax
jmp 0x4101de
mov dword [0x41c980], 1
mov eax, dword [0x41c980]
pop esi
jmp 0x4101e8
xor eax, eax
pop ebp
add esp, 0x1c
ret
Function at 0x410224
Capabilities:
Check for unmoving mouse cursor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp dword [0x41c97c], esi
push edi
mov edi, dword [sym.imp.USER32.dll_PostMessageA]
jne 0x41029d
cmp dword [0x41c980], esi
jne 0x41029d
mov ecx, dword [ebp + 0xc]
cmp ecx, 0x10
je 0x4103d2
cmp ecx, 0x8000
je 0x4103b2
cmp dword [0x41c984], esi
jne 0x41029d
mov eax, 0x104
cmp ecx, eax
ja 0x4102ed
je 0x41032a
cmp ecx, 0x18
je 0x4102df
cmp ecx, 0x1c
je 0x4102da
cmp ecx, 0x20
je 0x4102cb
cmp ecx, 0x48
je 0x410293
cmp ecx, 0x100
jmp 0x410297
cmp dword [ebp + 0x10], 3
je 0x41032a
mov eax, dword [ebp + 0xc]
cmp eax, dword [0x41c994]
jne 0x4103fa
cmp eax, esi
je 0x4103fa
push esi
push esi
push 0x10
push ebx
call edi
xor eax, eax
cmp dword [0x41c98c], esi
setne al
jmp 0x410408
push esi
call dword [sym.imp.USER32.dll_SetCursor]
xor eax, eax
inc eax
jmp 0x410408
cmp dword [ebp + 0x10], esi
jmp 0x410297
cmp dword [ebp + 0x10], esi
je 0x41029d
push esi
call dword [sym.imp.USER32.dll_SetCursor]
jmp 0x41029d
mov eax, ecx
sub eax, 0x200
je 0x41035c
dec eax
je 0x41032a
sub eax, 3
je 0x41032a
sub eax, 3
je 0x41032a
sub eax, 0x11
jne 0x41029d
cmp dword [ebp + 0x10], 6
jb 0x41032a
cmp dword [ebp + 0x10], 8
jbe 0x410320
cmp dword [ebp + 0x10], 0xa
je 0x410336
cmp dword [ebp + 0x10], 0x12
jne 0x41032a
test byte [ebp + 0x14], 1
jne 0x41029d
push esi
push esi
push 0x10
push ebx
call edi
jmp 0x41029d
lea eax, [ebp - 0x14]
push eax
call sub.KERNEL32.dll_GetSystemPowerStatus
test eax, eax
je 0x410348
mov al, byte [ebp - 0x14]
jmp 0x41034a
or al, 0xff
cmp al, byte [0x41c1d0]
mov byte [0x41c1d0], al
jne 0x41032a
jmp 0x41029d
lea eax, [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov ecx, dword [ebp - 8]
sub ecx, dword [0x41cc70]
je 0x410377
cmp ecx, esi
jge 0x410377
neg ecx
mov eax, dword [ebp - 4]
sub eax, dword [0x41cc74]
je 0x410388
cmp eax, esi
jge 0x410388
neg eax
add eax, ecx
cmp eax, dword [0x41c1cc]
jbe 0x41029d
push esi
push esi
push 0x10
push ebx
call edi
mov eax, dword [ebp - 8]
mov dword [0x41cc70], eax
mov eax, dword [ebp - 4]
mov dword [0x41cc74], eax
jmp 0x41029d
cmp dword [0x41c9a4], esi
je 0x41029d
mov eax, dword [0x41c98c]
cmp eax, esi
je 0x4102d2
push dword [ebp + 8]
call eax
jmp 0x410408
cmp dword [0x41c9a4], esi
je 0x41029d
call fcn.00410117
test eax, eax
jne 0x41029d
push 0x41cc70
call dword [sym.imp.USER32.dll_GetCursorPos]
xor eax, eax
jmp 0x410408
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push ebx
call dword [sym.imp.USER32.dll_DefWindowProcA]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x41040f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x41c9a4], esi
je 0x4104b4
cmp dword [0x41c988], esi
je 0x410431
call fcn.004101ed
lea eax, [ebp - 4]
push eax
push 1
push esi
push str.Control_PanelDesktop
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4104b4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push esi
push str.ScreenSaveUsePassword
push dword [ebp - 4]
mov dword [ebp - 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4104ab
cmp dword [ebp - 0xc], esi
je 0x4104ab
push str.PASSWORD.CPL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, esi
mov dword [0x41c988], eax
je 0x4104ab
push str.VerifyScreenSavePwd
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
mov dword [0x41c98c], eax
je 0x4104a6
push 1
call fcn.0040feb1
jmp 0x4104ab
call fcn.004101ed
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
leave
ret

Function at 0x410866
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov al, byte [esi]
cmp al, 0x22
jne 0x410899
push esi
call edi
mov esi, eax
mov al, byte [esi]
test al, al
je 0x410891
cmp al, 0x22
jne 0x410882
cmp byte [esi], 0x22
jne 0x4108b2
inc esi
jmp 0x4108b2
cmp al, 0x20
jbe 0x4108b2
push esi
call edi
mov esi, eax
cmp byte [esi], 0x20
ja 0x41089d
jmp 0x4108b2
cmp al, 0x20
ja 0x4108b8
push esi
call edi
mov esi, eax
mov al, byte [esi]
test al, al
jne 0x4108a9
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x18], 1
je 0x4108d2
movzx eax, word [ebp - 0x14]
jmp 0x4108d5
push 0xa
pop eax
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call fcn.004106b4
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x411856
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.004117a0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4118f1
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 [0x41ca2c]
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 0x4118f1
cmp eax, 1
je 0x411912
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 0x4118f1
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4118be
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4118ed
xor eax, eax
inc eax
jmp 0x411931
cmp edi, eax
jae 0x4118f5
xor eax, eax
jmp 0x411931
cmp eax, esi
jae 0x4118fc
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 [0x41ca2c]
jmp 0x411915
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 0x411e6b
Capabilities:
Accept command line arguments
Parse pe header

Disassembly:
push 0x60
push 0x418ef8
call fcn.00412048
mov edi, 0x94
mov eax, edi
call fcn.004117a0
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 [0x41ca2c], ecx
mov eax, dword [esi + 4]
mov dword [0x41ca38], eax
mov edx, dword [esi + 8]
mov dword [0x41ca3c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41ca30], esi
cmp ecx, 2
je 0x411ecb
or esi, 0x8000
mov dword [0x41ca30], esi
shl eax, 8
add eax, edx
mov dword [0x41ca34], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x411f06
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x411f06
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x411f1e
cmp eax, 0x20b
je 0x411f0b
mov dword [ebp - 0x1c], esi
jmp 0x411f32
cmp dword [ecx + 0x84], 0xe
jbe 0x411f06
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x411f2c
cmp dword [ecx + 0x74], 0xe
jbe 0x411f06
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.004133d4
pop ecx
test eax, eax
jne 0x411f5e
cmp dword [0x41c9f8], 1
jne 0x411f4b
call fcn.00414112
push 0x1c
call fcn.00413f9b
push 0xff
call fcn.00412ff6
pop ecx
pop ecx
call fcn.004148bb
mov dword [ebp - 4], esi
call fcn.00414710
test eax, eax
jge 0x411f77
push 0x1b
call fcn.00411e46
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41cff4], eax
call fcn.004145ee
mov dword [0x41c9f0], eax
call fcn.0041454c
test eax, eax
jge 0x411f9d
push 8
call fcn.00411e46
pop ecx
call fcn.00414319
test eax, eax
jge 0x411fae
push 9
call fcn.00411e46
pop ecx
push 1
call fcn.00413026
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x411fc4
push eax
call fcn.00411e46
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004142bc
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x411fe5
movzx eax, word [ebp - 0x40]
jmp 0x411fe8
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004108ef
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x412006
push edi
call fcn.00413151
call fcn.00413173
jmp 0x412038
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00412083
ret
Function at 0x413090
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x41ca6c], esi
push edi
jne 0x4130b0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x41ca68], esi
mov byte [0x41ca64], al
jne 0x413116
mov ecx, dword [0x41cfec]
test ecx, ecx
je 0x4130f7
mov eax, dword [0x41cfe8]
sub eax, 4
cmp eax, ecx
jmp 0x4130f0
mov eax, dword [eax]
test eax, eax
je 0x4130e2
call eax
mov eax, dword [0x41cfe8]
sub eax, 4
cmp eax, dword [0x41cfec]
mov dword [0x41cfe8], eax
jae 0x4130da
mov eax, 0x41c034
mov esi, 0x41c038
cmp eax, esi
mov edi, eax
jae 0x413116
mov eax, dword [edi]
test eax, eax
je 0x41310f
call eax
add edi, 4
cmp edi, esi
jb 0x413107
mov eax, 0x41c03c
mov esi, 0x41c044
cmp eax, esi
mov edi, eax
jae 0x413135
mov eax, dword [edi]
test eax, eax
je 0x41312e
call eax
add edi, 4
cmp edi, esi
jb 0x413126
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x41314f
push dword [ebp + 8]
mov dword [0x41ca6c], 1
call fcn.00412ff6
pop ebp
ret
Function at 0x413191
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 0x4131bf
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 0x4131c6
cmp ebx, dword [eax + 4]
jae 0x4131c6
xor eax, eax
jmp 0x4133b6
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4131d7
xor eax, eax
inc eax
jmp 0x4133b5
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4131ed
cmp ecx, edx
jae 0x413332
cmp dword [eax + 4], 0
je 0x4131f6
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4131de
cmp dword [ebp + 8], 0
je 0x413218
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x413332
cmp eax, esi
jae 0x413332
mov eax, dword [0x41ca70]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41323d
cmp dword [esi*4 + 0x41ca78], edi
je 0x413336
inc esi
cmp esi, eax
jl 0x41322b
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4133b2
cmp dword [ebp - 8], 0x1000000
jne 0x4133b2
test byte [ebp - 0xc], 0xcc
je 0x4132bb
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4133b2
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4133b2
cmp word [eax + 0x18], 0x10b
jne 0x4133b2
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4133b2
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4132bb
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4132bb
test byte [ecx + 0x27], 0x80
jne 0x413332
push 1
push 0x41cab8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4131cf
mov ecx, dword [0x41ca70]
test ecx, ecx
mov edx, ecx
jle 0x4132ef
lea eax, [ecx*4 + 0x41ca74]
cmp dword [eax], edi
je 0x4132ef
dec edx
sub eax, 4
test edx, edx
jg 0x4132e3
test edx, edx
jne 0x413320
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4132fc
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x413314
lea eax, [edx*4 + 0x41ca78]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x413302
cmp ecx, 0x10
jge 0x413320
inc ecx
mov dword [0x41ca70], ecx
push 0
push 0x41cab8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4131cf
xor eax, eax
jmp 0x4133b5
test esi, esi
jle 0x4131cf
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41cab8
call ebx
test eax, eax
jne 0x4131cf
cmp dword [esi*4 + 0x41ca78], edi
je 0x41338c
mov eax, dword [0x41ca70]
lea esi, [eax - 1]
test esi, esi
jl 0x41337a
cmp dword [esi*4 + 0x41ca78], edi
je 0x413376
dec esi
jns 0x41336a
test esi, esi
jge 0x41338a
cmp eax, 0x10
jge 0x413385
inc eax
mov dword [0x41ca70], eax
lea esi, [eax - 1]
jmp 0x41338c
je 0x4133a4
xor ecx, ecx
test esi, esi
jl 0x4133a4
lea eax, [ecx*4 + 0x41ca78]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x413392
push 0
push 0x41cab8
call ebx
jmp 0x4131cf
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x413f9b
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x41c20c]
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 + 0x41c278]
je 0x413fd0
inc eax
cmp eax, 0x13
jb 0x413fc1
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41c278]
jne 0x4140f6
mov eax, dword [0x41c9f8]
cmp eax, 1
je 0x4140ce
cmp eax, edx
jne 0x414000
cmp dword [0x41c244], 1
je 0x4140ce
cmp ecx, 0xfc
je 0x4140f6
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 0x414036
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00410dd0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00410ed0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41406a
mov eax, edi
push eax
call fcn.00410ed0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x418f3c
push edi
call fcn.00414ea0
add esp, 0x10
push edi
call fcn.00410ed0
push dword [esi + 0x41c27c]
mov ebx, eax
call fcn.00410ed0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004117a0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00410dd0
push edi
push ebx
call fcn.00410de0
push 0x418f38
push ebx
call fcn.00410de0
push dword [esi + 0x41c27c]
push ebx
call fcn.00410de0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00414d9f
add esp, 0x2c
jmp 0x4140f6
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x41c27c]
push dword [esi]
call fcn.00410ed0
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.00410ceb
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret