joyce8/EMBER2024-capa huggingface dataset:
Function at 0x473310
Capabilities:
Create thread

Disassembly:
sub esp, 8
push ebp
mov ebp, ecx
mov eax, dword [ebp + 0x14c]
test eax, eax
je 0x4733d6
mov eax, dword [0x5fed40]
mov edx, dword [ebp + 0x14c]
push ebx
lea ebx, [ebp + 0x144]
push esi
mov esi, eax
add eax, edx
push 0xffffffffffffffff
push eax
mov ecx, 0x5fed38
call fcn.00478c30
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 4]
lea eax, [esi + esi*8]
mov esi, dword [0x5fed3c]
shl eax, 5
add eax, esi
mov esi, ecx
dec ecx
test esi, esi
je 0x47338b
inc ecx
push edi
mov dword [esp + 0x10], ecx
mov ecx, 0x48
mov esi, edx
mov edi, eax
add eax, 0x120
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x10]
add edx, 0x120
dec ecx
mov dword [esp + 0x10], ecx
jne 0x473369
pop edi
lea esi, [ebp + 0x158]
mov ecx, 0x5fed20
push esi
call fcn.0056682f
push 0xffffffffffffffff
push 0
mov ecx, ebx
call fcn.00478c30
push 0xffffffffffffffff
push 0
mov ecx, esi
call fcn.005666e6
mov edx, dword [ebp]
lea eax, [esp + 0x10]
push eax
push 0
mov ecx, ebp
call dword [edx + 0x74]
mov eax, dword [eax + 0x1c]
push eax
push 0x4733e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop esi
pop ebx
pop ebp
add esp, 8
ret

Function at 0x474c30
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x586ee5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x110
lea eax, [esp + 0xc]
mov dword [esp + 8], 0
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 4]
call fcn.0056877a
mov edx, dword [esp]
mov dword [esp + 0x118], 1
cmp dword [edx - 8], 1
jle 0x474cc1
push ebx
lea eax, [esp + 8]
push 1
push eax
lea ecx, [esp + 0xc]
call fcn.00563a18
mov eax, dword [eax]
push 0x5ea038
push eax
call fcn.005503ed
add esp, 8
lea ecx, [esp + 8]
test eax, eax
setne bl
call fcn.0056870c
test bl, bl
pop ebx
je 0x474cc1
push 0x5ec9bc
jmp 0x474cc6
push 0x5ec9a8
lea ecx, [esp + 4]
call fcn.00568ae8
push esi
mov esi, dword [esp + 0x124]
lea ecx, [esp + 4]
push ecx
mov ecx, esi
call fcn.00568481
mov dword [esp + 0xc], 1
lea ecx, [esp + 4]
mov byte [esp + 0x11c], 0
call fcn.0056870c
mov ecx, dword [esp + 0x114]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x11c
ret 4
Function at 0x481d60
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x588381
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x218
mov al, byte [0x5fe7d8]
push esi
mov esi, ecx
push edi
mov byte [esp + 0x11c], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.00578d59
mov eax, dword [eax + 8]
lea ecx, [esp + 0x11c]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x481eed
lea edx, [esp + 0x11c]
lea ecx, [esp + 0xc]
push edx
call fcn.0056877a
push 0x5c
lea ecx, [esp + 0x10]
mov dword [esp + 0x22c], 0
call fcn.00563b0c
mov ecx, dword [0x5f9f88]
mov dword [esp + 8], ecx
mov edx, dword [esp + 0xc]
mov byte [esp + 0x228], 1
mov ecx, dword [edx - 8]
sub ecx, eax
lea eax, [esp + 0x10]
dec ecx
push ecx
push eax
lea ecx, [esp + 0x14]
call fcn.00563a18
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x22c], 2
call fcn.00568845
lea ecx, [esp + 0x10]
mov byte [esp + 0x228], 1
call fcn.0056870c
push 0x5fe7d8
push 0x5ef7ac
lea ecx, [esp + 0x10]
call fcn.005637fc
push 0x5fe7d8
push 0x5ef7a4
lea ecx, [esp + 0x10]
call fcn.005637fc
mov cl, byte [0x5fe7d8]
xor eax, eax
mov byte [esp + 0x18], cl
mov ecx, 0x40
lea edi, [esp + 0x19]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x230]
push edx
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov eax, dword [esp + 8]
lea ecx, [esp + 0x18]
push eax
push 0x5ef79c
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + eax + 0x20]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [esp + 0x11c]
push eax
push ecx
mov ecx, esi
call fcn.00481f10
test eax, eax
je 0x481ec8
lea edx, [esp + 0x18]
mov ecx, esi
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00481fe0
lea ecx, [esp + 8]
mov byte [esp + 0x228], 0
call fcn.0056870c
lea ecx, [esp + 0xc]
mov dword [esp + 0x228], 0xffffffff
call fcn.0056870c
mov ecx, dword [esp + 0x220]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x224
ret 4
Function at 0x508060
Capabilities:
Set registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5931c8
push eax
mov dword fs:[0], esp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x508143
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x5080f1
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x18]
push eax
push ecx
mov ecx, esi
call fcn.00508770
mov eax, dword [eax]
add esi, 0x14
push 0
push 0
push eax
mov ecx, esi
mov dword [esp + 0x1c], 0
call fcn.004a22d0
lea ecx, [esp + 0x18]
mov dword [esp + 0x10], 0xffffffff
call fcn.0056870c
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0xc]
push 0
push edx
push eax
mov ecx, esi
call fcn.004a1700
and eax, 0xff
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 0xc
add esi, 0x14
push 0
push 0
push 0x5f3678
mov ecx, esi
call fcn.004a22d0
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0xc]
push ecx
push 0x5f3674
push edx
mov ecx, esi
call fcn.004a1160
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0xc]
push 0
push eax
push ecx
mov ecx, esi
call fcn.004a1700
and eax, 0xff
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 0xc
mov edx, dword [esp + 0x1c]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
mov edx, dword [esp + 0x20]
push 1
push eax
mov eax, dword [esi + 0x50]
push edx
mov ecx, dword [esi + eax*4 + 0x50]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
pop edi
neg eax
sbb eax, eax
mov dword fs:[0], ecx
inc eax
pop esi
add esp, 0xc
ret 0xc
Function at 0x5082c0
Capabilities:
Set registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x593208
push eax
mov dword fs:[0], esp
push esi
mov esi, ecx
mov eax, dword [esi + 4]
test eax, eax
je 0x50839e
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x50834e
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x14]
push eax
push ecx
mov ecx, esi
call fcn.00508770
mov eax, dword [eax]
add esi, 0x14
push 0
push 0
push eax
mov ecx, esi
mov dword [esp + 0x18], 0
call fcn.004a22d0
lea ecx, [esp + 0x14]
mov dword [esp + 0xc], 0xffffffff
call fcn.0056870c
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push edx
push eax
mov ecx, esi
call fcn.004a2e60
and eax, 0xff
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
pop esi
add esp, 0xc
ret 0x10
add esi, 0x14
push 0
push 0
push 0x5f3678
mov ecx, esi
call fcn.004a22d0
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0xc]
push ecx
push 0x5f3674
push edx
mov ecx, esi
call fcn.004a1160
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov ecx, esi
call fcn.004a2e60
and eax, 0xff
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
pop esi
add esp, 0xc
ret 0x10
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esi + 0x50]
push eax
push 3
push 0
mov eax, dword [esi + edx*4 + 0x50]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 4]
pop esi
neg eax
sbb eax, eax
mov dword fs:[0], ecx
inc eax
add esp, 0xc
ret 0x10

Function at 0x508440
Capabilities:
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x593230
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [ecx + 4]
test eax, eax
je 0x508515
mov eax, dword [ecx + 8]
test eax, eax
je 0x508502
push esi
lea esi, [ecx + 0x14]
push edi
push 0x5f3678
mov ecx, esi
call fcn.0049efd0
and eax, 0xff
mov edi, eax
je 0x5084ed
mov eax, dword [0x5f9f88]
mov dword [esp + 0x1c], eax
lea ecx, [esp + 8]
push 0x5f3674
push ecx
mov ecx, esi
mov dword [esp + 0x1c], 0
call fcn.0044fea0
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x18], 1
call fcn.00568845
lea ecx, [esp + 8]
mov byte [esp + 0x14], 0
call fcn.0056870c
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
call fcn.0043a0b0
add esp, 0xc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], 0xffffffff
call fcn.0056870c
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret 0xc
xor eax, eax
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret 0xc
mov eax, dword [esp + 0x18]
push 0
push 0
push 0
lea edx, [esp + 0x28]
push 0
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [ecx + 0x50]
push edx
mov ecx, dword [ecx + eax*4 + 0x50]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ecx, dword [esp + 4]
neg eax
sbb eax, eax
mov dword fs:[0], ecx
inc eax
add esp, 0x10
ret 0xc
Function at 0x508550
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x593250
push eax
mov dword fs:[0], esp
mov eax, dword [ecx + 4]
push esi
push edi
test eax, eax
je 0x508626
mov eax, dword [ecx + 8]
test eax, eax
je 0x508611
lea esi, [ecx + 0x14]
push 0x5f3678
mov ecx, esi
call fcn.0049efd0
and eax, 0xff
mov edi, eax
je 0x5085fc
mov eax, dword [0x5f9f88]
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x18]
push 0x5f3674
push ecx
mov ecx, esi
mov dword [esp + 0x18], 0
call fcn.0044fea0
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x14], 1
call fcn.00568845
lea ecx, [esp + 0x18]
mov byte [esp + 0x10], 0
call fcn.0056870c
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push edx
push eax
push ecx
call fcn.0043a0b0
add esp, 0xc
lea ecx, [esp + 0x24]
mov dword [esp + 0x10], 0xffffffff
call fcn.0056870c
mov eax, edi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 0x10
xor eax, eax
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 0x10
mov edx, dword [esp + 0x24]
push 0
push 0
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x2c]
push 0
push eax
mov eax, dword [esp + 0x2c]
push edx
mov edx, dword [ecx + 0x50]
push eax
mov eax, dword [ecx + edx*4 + 0x50]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov ecx, dword [esp + 8]
pop edi
neg eax
sbb eax, eax
mov dword fs:[0], ecx
inc eax
pop esi
add esp, 0xc
ret 0x10
Function at 0x50a5f0
Capabilities:
Link many functions at runtime

Disassembly:
push ebx
mov ebx, ecx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov eax, dword [ebx + 0x74]
push esi
push edi
xor edi, edi
mov dword [eax + 0x52dc], edi
mov ecx, dword [ebx + 0x74]
push 0x5f38ac
mov dword [ecx + 0x52f4], edi
call ebp
mov esi, eax
cmp esi, edi
jne 0x50a632
push edi
push 0x5f38a0
call fcn.0043aa00
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x5f3888
push esi
call edi
push 0x5f3878
push esi
mov dword [0x5ff210], eax
call edi
push 0x5f3864
push esi
mov dword [0x5ff20c], eax
call edi
push 0x5f3850
push esi
mov dword [0x5ff208], eax
call edi
push 0x5e9358
push esi
mov dword [0x5ff204], eax
call edi
push 0x5f3840
push esi
mov dword [0x5ff200], eax
call edi
push 0x5e9374
push esi
mov dword [0x5ff1fc], eax
call edi
push 0x5e9368
push esi
mov dword [0x5ff1f8], eax
call edi
push 0x5e9384
push esi
mov dword [0x5ff1f4], eax
call edi
push 0x5e9394
push esi
mov dword [0x5ff1f0], eax
call edi
push 0x5f3830
push esi
mov dword [0x5ff1ec], eax
call edi
push 0x5f3820
push esi
mov dword [0x5ff1e8], eax
call edi
push 0x5f3810
push esi
mov dword [0x5ff1e0], eax
call edi
push 0x5f3800
push esi
mov dword [0x5ff1dc], eax
call edi
push 0x5f37e8
push esi
mov dword [0x5ff1d8], eax
call edi
push 0x5f37d4
push esi
mov dword [0x5ff1d4], eax
call edi
push 0x5f37c8
mov dword [0x5ff1e4], eax
call ebp
mov esi, eax
xor ebp, ebp
cmp esi, ebp
je 0x50a731
push 0x5f37b4
push esi
call edi
push 0x5f37a0
push esi
mov dword [0x5ff1d0], eax
call edi
mov dword [0x5ff1cc], eax
cmp dword [0x5ff1d0], ebp
jne 0x50a74f
mov eax, dword [ebx + 0x74]
cmp dword [eax + 0x5310], 2
jne 0x50a74f
mov dword [eax + 0x5310], 3
mov eax, dword [0x5ff210]
push ebp
cmp eax, ebp
jne 0x50a76d
push 0x5f378c
call fcn.0043aa00
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, ebx
call fcn.0050a170
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
mov eax, dword [ebx + 0x74]
mov ecx, dword [eax + 0x52f4]
cmp ecx, ebp
je 0x50a791
cmp dword [eax + 0x52f8], ebp
je 0x50a7a1
cmp dword [eax + 0x52dc], ebp
je 0x50a7f7
cmp dword [eax + 0x52e0], ebp
jne 0x50a7f7
inc esi
cmp esi, 3
jg 0x50a80f
cmp ecx, ebp
je 0x50a7bc
push ebp
push ecx
call dword [0x5ff1e4]
mov edx, dword [ebx + 0x74]
mov dword [edx + 0x52f4], ebp
mov eax, dword [ebx + 0x74]
mov eax, dword [eax + 0x52dc]
cmp eax, ebp
je 0x50a7da
push ebp
push eax
call dword [0x5ff1e4]
mov ecx, dword [ebx + 0x74]
mov dword [ecx + 0x52dc], ebp
push 0x3e8
call edi
xor edx, edx
cmp esi, 3
setne dl
dec edx
mov ecx, ebx
and edx, 2
push edx
call fcn.0050a170
jmp 0x50a77c
cmp esi, 3
jg 0x50a80f
mov eax, dword [ebx + 0x74]
cmp dword [eax + 0x52f8], ebp
jne 0x50a830
cmp dword [eax + 0x52e0], ebp
jne 0x50a830
push 1
push 0x5e7590
push 0x5f376c
mov ecx, ebx
call fcn.0056a944
cmp eax, 1
jne 0x50a830
push 3
mov ecx, ebx
call fcn.0050a170
mov ebx, dword [ebx + 0x74]
cmp dword [ebx + 0x52f8], ebp
jne 0x50a84a
cmp dword [ebx + 0x52e0], ebp
jne 0x50a84a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
Function at 0x401000
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
push edi
xor ebp, ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov esi, 1
mov dword [esp + 0x18], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 0x10], eax
je 0x401064
push eax
call fcn.00401f34
mov ecx, dword [esp + 0x14]
add esp, 4
mov ebx, eax
push ebx
push ecx
push ebp
push edi
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x401064
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push 0x40916c
push ebx
call sub.VERSION.dll_VerQueryValueA
mov edi, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push ecx
push edi
mov dword [esp + 0x18], 0
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 0x10], eax
je 0x4010b5
push eax
call fcn.00401f34
mov edx, dword [esp + 0x14]
add esp, 4
mov ebp, eax
push ebp
push edx
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x4010b5
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0x40916c
push ebp
call sub.VERSION.dll_VerQueryValueA
mov edi, dword [esp + 0x14]
test edi, edi
je 0x4010e3
mov edx, dword [esp + 0x18]
test edx, edx
je 0x4010e3
mov eax, dword [edi + 8]
mov ecx, dword [edx + 8]
cmp ecx, eax
jne 0x4010dd
mov eax, dword [edi + 0xc]
mov ecx, dword [edx + 0xc]
cmp ecx, eax
jne 0x4010dd
xor esi, esi
jmp 0x4010e3
sbb esi, esi
and esi, 2
dec esi
test ebx, ebx
je 0x4010f0
push ebx
call fcn.0040250d
add esp, 4
test ebp, ebp
je 0x4010fd
push ebp
call fcn.0040250d
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

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

Disassembly:
push ecx
push esi
push 0x409178
push 0x85
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x401198
push ebx
push ebp
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x401196
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40118e
mov eax, dword [esp + 0x18]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x40118e
push 0
lea ecx, [esp + 0x14]
push ecx
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret
Function at 0x402ceb
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4093b8
call fcn.004037ac
mov edi, 0x94
mov eax, edi
call fcn.004025b0
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 [0x40bbe0], ecx
mov eax, dword [esi + 4]
mov dword [0x40bbec], eax
mov edx, dword [esi + 8]
mov dword [0x40bbf0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40bbe4], esi
cmp ecx, 2
je 0x402d4b
or esi, 0x8000
mov dword [0x40bbe4], esi
shl eax, 8
add eax, edx
mov dword [0x40bbe8], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x402d86
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402d86
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x402d9e
cmp eax, 0x20b
je 0x402d8b
mov dword [ebp - 0x1c], esi
jmp 0x402db2
cmp dword [ecx + 0x84], 0xe
jbe 0x402d86
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x402dac
cmp dword [ecx + 0x74], 0xe
jbe 0x402d86
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040600c
pop ecx
test eax, eax
jne 0x402dde
cmp dword [0x40bab0], 1
jne 0x402dcb
call fcn.004057c1
push 0x1c
call fcn.00405649
push 0xff
call fcn.004054ae
pop ecx
pop ecx
call fcn.00405f6a
mov dword [ebp - 4], esi
call fcn.00405dbf
test eax, eax
jge 0x402df7
push 0x1b
call fcn.00402cc6
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40d174], eax
call fcn.00405c9d
mov dword [0x40baa8], eax
call fcn.00405bfb
test eax, eax
jge 0x402e1d
push 8
call fcn.00402cc6
pop ecx
call fcn.004059c8
test eax, eax
jge 0x402e2e
push 9
call fcn.00402cc6
pop ecx
push 1
call fcn.004054de
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x402e44
push eax
call fcn.00402cc6
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040596b
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x402e65
movzx eax, word [ebp - 0x40]
jmp 0x402e68
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401be0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x402e86
push edi
call fcn.00405609
call fcn.0040562b
jmp 0x402eb8
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004037e7
ret
Function at 0x4036c6
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.004025b0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403761
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 [0x40bbe0]
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 0x403761
cmp eax, 1
je 0x403782
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 0x403761
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40372e
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40375d
xor eax, eax
inc eax
jmp 0x4037a1
cmp edi, eax
jae 0x403765
xor eax, eax
jmp 0x4037a1
cmp eax, esi
jae 0x40376c
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 [0x40bbe0]
jmp 0x403785
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 0x405548
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40bc20], esi
push edi
jne 0x405568
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 [0x40bc1c], esi
mov byte [0x40bc18], al
jne 0x4055ce
mov ecx, dword [0x40d168]
test ecx, ecx
je 0x4055af
mov eax, dword [0x40d164]
sub eax, 4
cmp eax, ecx
jmp 0x4055a8
mov eax, dword [eax]
test eax, eax
je 0x40559a
call eax
mov eax, dword [0x40d164]
sub eax, 4
cmp eax, dword [0x40d168]
mov dword [0x40d164], eax
jae 0x405592
mov eax, 0x40b024
mov esi, 0x40b02c
cmp eax, esi
mov edi, eax
jae 0x4055ce
mov eax, dword [edi]
test eax, eax
je 0x4055c7
call eax
add edi, 4
cmp edi, esi
jb 0x4055bf
mov eax, 0x40b030
mov esi, 0x40b038
cmp eax, esi
mov edi, eax
jae 0x4055ed
mov eax, dword [edi]
test eax, eax
je 0x4055e6
call eax
add edi, 4
cmp edi, esi
jb 0x4055de
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x405607
push dword [ebp + 8]
mov dword [0x40bc20], 1
call fcn.004054ae
pop ebp
ret
Function at 0x405649
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x40b19c]
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 + 0x40b350]
je 0x405680
inc eax
cmp eax, 0x13
jb 0x405671
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40b350]
jne 0x4057a3
mov eax, dword [0x40bab0]
cmp eax, 1
je 0x40577e
cmp eax, edx
jne 0x4056b0
cmp dword [0x40b1c4], 1
je 0x40577e
cmp ecx, 0xfc
je 0x4057a3
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 0x4056e6
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00403540
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00402f70
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40571a
mov eax, edi
push eax
call fcn.00402f70
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x4099e4
push edi
call fcn.00406db0
add esp, 0x10
push edi
call fcn.00402f70
push dword [esi + 0x40b354]
mov ebx, eax
call fcn.00402f70
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004025b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00403540
push edi
push ebx
call fcn.00403550
push 0x4099e0
push ebx
call fcn.00403550
push dword [esi + 0x40b354]
push ebx
call fcn.00403550
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00407585
add esp, 0x2c
jmp 0x4057a3
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x40b354]
push dword [esi]
call fcn.00402f70
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.0040259b
add ebp, 0x90
leave
ret