joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404aac
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push esi
push edi
push ebx
mov eax, dword [ebp + 0x10]
add eax, 0x100000
mov dword [ebp - 8], eax
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 4], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push dword [ebp - 8]
push dword [ebp - 4]
push esi
call sub.kernel32.dll_ExpandEnvironmentStringsA
mov esi, dword [ebp - 4]
or eax, eax
je 0x404b39
push dword [ebp + 8]
push esi
call sub.kernel32.dll_lstrcmpA
or eax, eax
je 0x404b2e
mov bl, 0
jmp 0x404b24
lodsb al, byte [esi]
cmp word [esi], 0x5b0a
jne 0x404b06
mov bl, 1
cmp al, 0x5c
jne 0x404b1a
or bl, bl
jne 0x404b1a
cmp byte [esi], 0x5c
je 0x404b1a
cmp byte [esi - 2], 0x5c
je 0x404b1a
stosb byte es:[edi], al
stosb byte es:[edi], al
cmp word [esi], 0xd5d
jne 0x404b24
mov bl, 0
cmp byte [esi], 0
jne 0x404afc
mov byte [edi], 0
jmp 0x404b39
push dword [ebp + 8]
push dword [ebp + 0xc]
call sub.kernel32.dll_lstrcpyA
push 0x4000
push dword [ebp - 8]
push dword [ebp - 4]
call sub.kernel32.dll_VirtualFree
push dword [ebp + 0xc]
call fcn.00405c60
pop ebx
pop edi
pop esi
leave
ret 0xc
Function at 0x40532c
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
push esi
push edi
push ebx
cmp byte [0x40b442], 1
jne 0x405358
push 5
push dword [0x40b3fe]
call sub.user32.dll_ShowWindow
push 0
push dword [0x40b402]
call sub.user32.dll_ShowWindow
push 0
push 0
push 0x184
push dword [0x40b3fe]
call sub.user32.dll_SendMessageA
push 0x400
push 0x41d0c1
push 0
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41d0c1
call fcn.004020dc
push 0x40b0ef
call fcn.004020dc
xor ebx, ebx
jmp 0x405510
cmp byte [esi], 3
jne 0x4053b3
push esi
call fcn.00403bff
jmp 0x4054e6
cmp byte [esi], 4
jne 0x4053c3
push esi
call fcn.00403ee0
jmp 0x4054e6
cmp byte [esi], 0x11
jne 0x4053d3
push esi
call fcn.00404e70
jmp 0x4054e6
cmp byte [esi], 5
jne 0x4053e3
push esi
call fcn.004048b3
jmp 0x4054e6
cmp byte [esi], 0x14
jne 0x4053f3
push esi
call fcn.004040c8
jmp 0x4054e6
cmp byte [esi], 0x16
jne 0x405403
push esi
call fcn.0040454e
jmp 0x4054e6
cmp byte [esi], 0x10
jne 0x4054ab
push 0x400
push 0x41d4c1
push 7
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41d4c1
call fcn.004020dc
push esi
call fcn.004014c0
push eax
cmp eax, 1
jne 0x40545c
push 0x400
push 0x41d8c1
push 0x1d
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41d8c1
call fcn.004020dc
jmp 0x40547d
push 0x400
push 0x41dcc1
push 0x1c
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41dcc1
call fcn.004020dc
push 0x400
push 0x41e0c1
push 0xc
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41e0c1
call fcn.004020dc
push 0x40b0ef
call fcn.004020dc
pop eax
jmp 0x4054e6
cmp byte [esi], 0x15
jne 0x4054e6
test dword [esi + 1], 4
je 0x4054c0
mov eax, 0
jmp 0x4054c5
mov eax, 1
cmp dword [ebp - 4], eax
jne 0x4054e6
test dword [esi + 1], 1
je 0x4054da
jmp 0x40558d
test dword [esi + 1], 2
je 0x4054e6
add ebx, dword [esi + 5]
mov dword [ebp - 4], eax
mov al, byte [esi]
cmp al, 3
je 0x4054ff
cmp al, 4
je 0x4054ff
cmp al, 5
je 0x4054ff
cmp al, 0x11
je 0x4054ff
cmp al, 0x14
jne 0x405510
push 0x4000
push dword [0x40b3c0]
push esi
call sub.kernel32.dll_VirtualFree
inc ebx
push ebx
call fcn.00401478
mov esi, eax
or esi, esi
je 0x405585
mov al, byte [esi]
cmp al, 1
jne 0x405536
push esi
push dword [0x40b3c0]
call fcn.00401000
mov dword [0x41e4c1], eax
jmp 0x405585
cmp al, 3
je 0x40554e
cmp al, 4
je 0x40554e
cmp al, 5
je 0x40554e
cmp al, 0x11
je 0x40554e
cmp al, 0x14
je 0x40554e
cmp al, 0x16
jne 0x405585
push 4
push 0x1000
push dword [0x40b3c0]
push 0
call sub.kernel32.dll_VirtualAlloc
mov edi, eax
push dword [0x40b3c0]
push esi
push edi
call sub.kernel32.dll_RtlMoveMemory
mov esi, edi
push dword [0x41e4c1]
push dword [0x40b3c0]
push esi
call fcn.00401ae0
or esi, esi
jne 0x4053a3
push 0x400
push 0x41e4c5
push 1
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41e4c5
call fcn.004020dc
push dword [0x40b447]
call fcn.004055e4
push 0x6c
push dword [0x40b3e6]
call sub.user32.dll_GetDlgItem
push 0
push eax
call sub.user32.dll_EnableWindow
push 1
push 0
push 0
push dword [0x40b3e6]
call sub.user32.dll_RedrawWindow
pop ebx
pop edi
pop esi
leave
ret
Function at 0x40561b
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
push edx
push esi
push edi
mov esi, dword [ebp + 8]
xor ecx, ecx
jmp 0x40565f
inc ecx
cmp ecx, dword [0x40bc55]
jne 0x40565f
push 0x400
push 0x41e8c5
push 0x16
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41e8c5
call fcn.004020dc
xor eax, eax
pop edi
pop esi
pop edx
pop ecx
pop ebx
leave
ret 0x10
cmp dword [ecx + esi], 0x4550
jne 0x40562a
add esi, ecx
mov eax, dword [ebp + 8]
add eax, dword [0x40bc55]
cmp dword [eax - 4], 0x32505564
jne 0x40569f
push 0x400
push 0x41ecc5
push 0x17
push dword [0x40b3e2]
call sub.user32.dll_LoadStringA
push 0x41ecc5
call fcn.004020dc
jmp 0x405654
push esi
movzx eax, word [esi + 6]
dec eax
imul eax, eax, 0x28
movzx ecx, word [esi + 0x14]
add esi, 0x18
add esi, ecx
mov edi, esi
or dword [edi + 0x24], 0x80000000
add edi, eax
pop esi
cmp dword [ebp + 0xc], 4
jne 0x4056c8
mov ecx, dword [esi + 0x34]
jmp 0x4056ca
xor ecx, ecx
mov dword [0x40599d], ecx
mov ebx, dword [esi + 0x28]
mov ecx, dword [esi + 0x34]
mov dword [0x405995], ebx
add dword [0x405995], ecx
mov eax, dword [edi + 0xc]
add eax, dword [edi + 0x10]
mov dword [esi + 0x28], eax
cmp dword [ebp + 0xc], 4
jne 0x4056fb
mov eax, dword [edi + 0xc]
mov ebx, dword [edi + 0x10]
add eax, ebx
jmp 0x4056fd
xor eax, eax
mov dword [0x4059a1], eax
mov eax, dword [ebp + 8]
add eax, dword [edi + 0x14]
add eax, dword [edi + 0x10]
mov ecx, 0x405786
mov ebx, 0x232
mov edx, eax
add edx, ebx
push edx
push ebx
push ecx
push eax
call sub.kernel32.dll_RtlMoveMemory
pop edx
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x16]
lea ecx, [eax + ecx]
mov ebx, dword [0x40b3c0]
sub ebx, eax
push ebx
push ecx
push edx
call sub.kernel32.dll_RtlMoveMemory
mov eax, dword [ebp + 0x10]
push 0x100
push eax
call fcn.00405df0
add dword [edi + 8], eax
add dword [edi + 0x10], eax
or dword [edi + 0x24], 0xe0000000
mov eax, dword [edi + 0xc]
add eax, dword [edi + 8]
mov ebx, dword [esi + 0x38]
push ebx
push eax
call fcn.00405df0
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 8]
add eax, dword [0x40bc61]
mov dword [eax - 4], 0x32505564
xor eax, eax
inc eax
pop edi
pop esi
pop edx
pop ecx
pop ebx
leave
ret 0x10

Function at 0x405ce4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 8]
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x405d0f
xor eax, eax
leave
ret 0xc
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call sub.kernel32.dll_WriteFile
push dword [ebp - 4]
call sub.kernel32.dll_FlushFileBuffers
push dword [ebp - 4]
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 8]
leave
ret 0xc
Function at 0x405e10
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 4], 1
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call sub.advapi32.dll_RegOpenKeyA
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push dword [ebp + 0x14]
push dword [ebp - 8]
call sub.advapi32.dll_RegQueryValueExA
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call sub.advapi32.dll_RegCreateKeyExA
or eax, eax
jne 0x405e92
mov eax, 4
mov dword [ebp - 4], eax
inc dword [ebp - 0xc]
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 0x14]
push dword [ebp - 8]
call sub.advapi32.dll_RegQueryValueExA
push eax
push dword [ebp - 8]
call sub.advapi32.dll_RegCloseKey
pop eax
leave
ret 0x10

Function at 0x405f10
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
pushal
cmp dword [ebp + 8], 0
jne 0x405f50
push 0
call sub.kernel32.dll_GetModuleHandleA
lea esi, [ebp - 0x200]
push 0x200
push esi
push eax
call sub.kernel32.dll_GetModuleFileNameA
push esi
call sub.kernel32.dll_lstrlenA
push esi
add esi, eax
jmp 0x405f45
dec esi
cmp byte [esi], 0x5c
jne 0x405f44
mov byte [esi], 0
pop esi
jmp 0x405f53
mov esi, dword [ebp + 8]
push esi
call sub.kernel32.dll_SetCurrentDirectoryA
popal
leave
ret 4

Function at 0x405fd0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbfc
pushal
mov byte [ebp - 1], 0
mov esi, dword [ebp + 8]
or esi, esi
je 0x40602a
push esi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x40602a
cmp byte [esi], 0
je 0x40602a
lea edi, [ebp - 0x401]
jmp 0x405fff
lodsb al, byte [esi]
stosb byte es:[edi], al
cmp byte [esi], 0x5c
je 0x406009
cmp byte [esi], 0
jne 0x405ffd
cmp al, 0x3a
je 0x405ffd
lodsb al, byte [esi]
stosb byte es:[edi], al
mov byte [edi], 0
push 0
lea eax, [ebp - 0x401]
push eax
call sub.kernel32.dll_CreateDirectoryA
cmp byte [esi - 1], 0
jne 0x405ffb
mov byte [ebp - 1], 1
popal
movzx eax, byte [ebp - 1]
leave
ret 4

Function at 0x406040
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
pushal
mov byte [ebp - 1], 0
mov esi, dword [ebp + 8]
or esi, esi
je 0x4060ae
push esi
call sub.kernel32.dll_lstrlenA
or eax, eax
je 0x4060ae
mov ebx, eax
push 0
call sub.user32.dll_OpenClipboard
cmp eax, 1
jne 0x4060ae
add ebx, 2
push ebx
push 0x2042
call sub.kernel32.dll_GlobalAlloc
or eax, eax
je 0x4060a9
mov ebx, eax
push ebx
call sub.kernel32.dll_GlobalLock
or eax, eax
je 0x4060a9
mov edi, eax
push esi
push edi
call sub.kernel32.dll_lstrcpyA
call sub.user32.dll_EmptyClipboard
cmp eax, 1
jne 0x4060a9
push edi
call sub.kernel32.dll_GlobalUnlock
push ebx
push 1
call sub.user32.dll_SetClipboardData
call sub.user32.dll_CloseClipboard
popal
movzx eax, byte [ebp - 1]
leave
ret 4
Function at 0x4093d8
Capabilities:
Hash data with md5

Disassembly:
push edi
xor eax, eax
mov dword [0x41f230], eax
xor eax, eax
mov dword [0x41f234], eax
mov edi, 0x41f1e0
mov ecx, 0x10
rep stosd dword es:[edi], eax
mov eax, 0x41f220
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
pop edi
ret
Function at 0x405ff1
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x42c2c4], 0
jne 0x40602f
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406005
mov dword [ecx*4 + 0x42c2c0], eax
inc ecx
cmp ecx, 0x100
jl 0x406000
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x40605c
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x42c2c0]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x40603d
not eax
pop ebp
ret 0xc

Function at 0x40100b
Capabilities:
Query or enumerate registry value

Disassembly:
call 0x40100b
push eax
call sub.KERNEL32.dll_ExitProcess
push ebp
mov ebp, esp
add esp, 0xfffffef0
jmp 0x40109c
lea eax, [ebp - 0x104]
push eax
call fcn.004011ec
push 0x401019
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
jne 0x401165
lea eax, [ebp - 0x10c]
push eax
push 0x20019
push 0
push 0x401038
push 0x80000001
call sub.ADVAPI32.dll_RegOpenKeyExA
cmp eax, 0
jne 0x4011a5
mov dword [ebp - 0x110], 0x103
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x104]
push eax
push 0
push 0
push 0x401052
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegQueryValueExA
push eax
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegCloseKey
pop eax
cmp eax, 0
jne 0x4011a5
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrlenA
lea ebx, [ebp - 0x104]
add ebx, eax
dec ebx
cmp byte [ebx], 0x5c
je 0x40114a
mov word [ebx], 0x5c
push 0x401023
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
je 0x4011a5
mov dword [ebp - 0x108], eax
push 0x40102d
push eax
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
je 0x40119a
push 0x3e8
call eax
test eax, eax
je 0x40119a
call 0x40118a
add dword [esp], 0x1e76
call eax
push 0
call sub.KERNEL32.dll_ExitProcess
push dword [ebp - 0x108]
call sub.KERNEL32.dll_FreeLibrary
push 0x10
push 0x401096
push 0x401057
push 0
call sub.USER32.dll_MessageBoxA
mov eax, 0xffffffff
leave
ret
Function at 0x4014f6
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push edi
xor edi, edi
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x401593
push ebx
call fcn.00406306
pop ecx
push edi
lea ecx, [ebp - 0x14]
push ecx
push ebx
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x401593
cmp dword [ebp + 0x10], edi
je 0x40156a
push dword [esi]
call fcn.00406306
pop ecx
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], eax
push esi
push eax
call fcn.004032c0
test eax, eax
jne 0x401593
jmp 0x401572
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov dword [esi], ebx
push edi
lea eax, [ebp - 0x18]
push eax
push dword [esi]
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x401593
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0x10], edi
je 0x4015a1
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], edi
je 0x4015af
push dword [ebp - 4]
call fcn.00405e47
pop ecx
cmp dword [ebp + 0x10], edi
je 0x4015c2
cmp dword [ebp - 8], edi
je 0x4015c2
push dword [ebp - 8]
call fcn.00405e47
pop ecx
mov eax, dword [ebp - 0xc]
pop edi
leave
ret
Function at 0x402db8
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0x10], 0
jne 0x402dcb
push 0x80004005
call fcn.00401cb1
push esi
mov esi, dword [ebp + 0x10]
push edi
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
lea ecx, [eax + eax]
add esi, ecx
add edi, ecx
cmp eax, 1
jne 0x402dd2
mov eax, dword [ebp + 8]
push edi
push dword [ebp + 0x10]
push 7
push 0
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x402eb4
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x4131a4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
lea edx, [ebp - 0x214]
push edx
push 0x2001f
mov eax, ecx
mov ecx, dword [ebp + 8]
xor esi, esi
push esi
mov dword [ebp - 0x220], eax
mov eax, dword [eax]
push ecx
push eax
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x210], esi
mov dword [ebp - 0x214], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, eax
cmp edi, esi
jne 0x402fd1
xor eax, eax
cmp dword [ebp - 0x210], esi
je 0x402f22
push dword [ebp - 0x210]
call ebx
cmp eax, esi
mov ecx, dword [ebp - 0x214]
mov edi, eax
mov dword [ebp - 0x210], ecx
jne 0x402fd1
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea eax, [ebp - 0x228]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x20c]
push eax
push esi
push ecx
jmp 0x402f95
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x210]
call fcn.00402eb4
cmp eax, esi
mov dword [ebp - 0x214], eax
jne 0x402ff4
lea eax, [ebp - 0x228]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x20c]
push eax
push esi
push dword [ebp - 0x210]
mov dword [ebp - 0x218], 0x100
call edi
test eax, eax
je 0x402f5a
cmp dword [ebp - 0x210], esi
je 0x402fbb
push dword [ebp - 0x210]
call ebx
mov dword [ebp - 0x210], esi
push dword [ebp - 0x21c]
mov eax, dword [ebp - 0x220]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov edi, eax
cmp dword [ebp - 0x210], esi
je 0x402fe1
push dword [ebp - 0x210]
call ebx
mov eax, edi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405f55
leave
ret 4
cmp dword [ebp - 0x210], esi
je 0x403004
push dword [ebp - 0x210]
call ebx
mov eax, dword [ebp - 0x214]
jmp 0x402fe3
Function at 0x405c3c
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4131a4]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00405bd1
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00406560
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x405c8b
cmp dword [ebp - 0x1c], 5
jb 0x405ca3
jmp 0x405c9f
cmp dword [ebp - 0x10], 1
jne 0x405ca3
cmp dword [ebp - 0x1c], 4
ja 0x405c9f
jne 0x405ca3
cmp dword [ebp - 0x18], 0
jbe 0x405ca3
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x40e700
call fcn.004019dc
test eax, eax
jge 0x405cc4
mov byte [0x414a44], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00405f55
add ebp, 0x78
leave
ret

Function at 0x405f55
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4131a4]
jne 0x405f5f
repz ret
jmp fcn.00407dbf
Function at 0x408b0b
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4134a8]
je 0x408b26
inc edi
cmp edi, 0x17
jb 0x408b17
cmp edi, 0x17
jae 0x408ca6
push ebp
push 3
call fcn.0040b1f9
cmp eax, 1
pop ecx
je 0x408c72
push 3
call fcn.0040b1f9
test eax, eax
pop ecx
jne 0x408b5a
cmp dword [0x4131a0], 1
je 0x408c72
cmp ebx, 0xfc
je 0x408ca5
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x414498
push ebp
call fcn.00409fbc
add esp, 0xc
test eax, eax
je 0x408b90
push esi
push esi
push esi
push esi
push esi
call fcn.00407c9f
add esp, 0x14
push 0x104
mov esi, 0x4144b1
push esi
push 0
mov byte [0x4145b5], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x408bd4
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00409fbc
add esp, 0xc
test eax, eax
je 0x408bd4
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00407c9f
add esp, 0x14
push esi
call fcn.0040a030
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x408c19
push esi
call fcn.0040a030
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4147ac
push 0x40ed44
sub ecx, eax
push ecx
push eax
call fcn.0040b146
add esp, 0x14
test eax, eax
je 0x408c19
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00407c9f
add esp, 0x14
jmp 0x408c1b
xor esi, esi
push 0x40ed40
push ebx
push ebp
call fcn.0040b0d5
add esp, 0xc
test eax, eax
je 0x408c3b
push esi
push esi
push esi
push esi
push esi
call fcn.00407c9f
add esp, 0x14
push dword [edi*8 + 0x4134ac]
push ebx
push ebp
call fcn.0040b0d5
add esp, 0xc
test eax, eax
je 0x408c5d
push esi
push esi
push esi
push esi
push esi
call fcn.00407c9f
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0040af18
add esp, 0xc
jmp 0x408ca5
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x408ca5
cmp ebp, 0xffffffff
je 0x408ca5
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4134ac]
push dword [esi]
call fcn.0040a030
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x40af18
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0040823a
xor ebx, ebx
cmp dword [0x414964], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x40afee
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40b0ce
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x40b0ce
push eax
call fcn.004081cc
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x414964], eax
call esi
push eax
call fcn.004081cc
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x414968], eax
call esi
push eax
call fcn.004081cc
mov dword [0x41496c], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00408898
test eax, eax
pop ecx
pop ecx
je 0x40afbc
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00407c9f
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x40afee
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004081cc
cmp eax, ebx
pop ecx
mov dword [0x414974], eax
je 0x40afee
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004081cc
pop ecx
mov dword [0x414970], eax
mov eax, dword [0x414970]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x40b073
cmp dword [0x414974], ecx
je 0x40b073
push eax
call fcn.00408243
push dword [0x414974]
mov esi, eax
call fcn.00408243
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x40b073
cmp edi, ebx
je 0x40b073
call esi
cmp eax, ebx
je 0x40b040
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40b040
test byte [ebp - 0x18], 1
jne 0x40b073
lea eax, [ebp - 0x10]
push eax
call fcn.004088cf
test eax, eax
pop ecx
je 0x40b05b
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00407c9f
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x40b06a
or dword [ebp + 0x10], 0x200000
jmp 0x40b0ae
or dword [ebp + 0x10], 0x40000
jmp 0x40b0ae
mov eax, dword [0x414968]
cmp eax, dword [ebp - 8]
je 0x40b0ae
push eax
call fcn.00408243
cmp eax, ebx
pop ecx
je 0x40b0ae
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40b0ae
mov eax, dword [0x41496c]
cmp eax, dword [ebp - 8]
je 0x40b0ae
push eax
call fcn.00408243
cmp eax, ebx
pop ecx
je 0x40b0ae
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x414964]
call fcn.00408243
cmp eax, ebx
pop ecx
je 0x40b0ce
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40b0d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret