joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44ee50
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4a8e23
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0049c657
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.004a1cf0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.004a3372
test eax, eax
je 0x44ef6c
mov ecx, dword [esp + 0x3c]
call fcn.004a1d1d
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x44ef30
push edi
mov ecx, esi
call fcn.0049f387
mov ecx, esi
call fcn.0044f0d0
cmp dword [esp + 0x38], 1
jne 0x44ef65
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.0049f4c2
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x451990
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4519c3
push esi
call fcn.00454aa0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4519bc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x451a49
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x451a32
mov eax, dword [esi + 8]
test eax, eax
je 0x4519e7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x451a2e
cmp eax, 2
je 0x451a32
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4519da
cmp eax, 3
je 0x451a0d
cmp eax, 1
jne 0x4519da
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4519da
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4519da
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00451a70
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x451a58
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00451a70
add esp, 4
pop esi
ret
Function at 0x465ce0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x208
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call fcn.0046c160
mov ebp, dword [esp + 0x220]
mov eax, dword [esp + 0x21c]
push ebp
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov edi, eax
cmp edi, 0x20
ja 0x465dd9
lea ecx, [esp + 0x10]
push ecx
push str..htm
push closesocket
mov ecx, esi
call fcn.00465df0
test eax, eax
jne 0x465dd9
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
push str._shellopencommand
push edx
call ebx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
push eax
push ecx
push closesocket
mov ecx, esi
call fcn.00465df0
test eax, eax
jne 0x465dd9
lea edx, [esp + 0x10]
push 0x4dd768
push edx
call fcn.0048bbd0
mov esi, eax
add esp, 8
test esi, esi
jne 0x465daa
lea eax, [esp + 0x10]
push 0x4dd764
push eax
call fcn.0048bbd0
mov esi, eax
add esp, 8
test esi, esi
jne 0x465daa
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xf]
jmp 0x465dad
mov byte [esi], 0
push 0x4dcf2c
push esi
call ebx
mov edx, dword [esp + 0x21c]
push edx
push esi
call ebx
lea eax, [esp + 0x10]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8

Function at 0x465df0
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x465e52
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret 0xc
Function at 0x46c0a0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4a9cd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push edi
mov edi, ecx
mov eax, dword [edi + 0x118]
test eax, eax
jne 0x46c150
mov eax, dword [0x4e7f68]
push esi
mov dword [esp + 8], eax
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0
call fcn.0049b450
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.0049b49f
push str.winhlp32.exe
lea ecx, [esp + 0xc]
call fcn.0049b3fc
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x46c137
push 0x6a
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
test eax, eax
je 0x46c137
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [edi + 0x118], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call fcn.0049b06c
pop esi
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x46f250
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4aa160
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x46f3f7
mov ecx, dword [0x4e7f68]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ecx
mov ecx, dword [eax - 8]
mov bl, 1
test ecx, ecx
mov byte [esp + 0x28], bl
jle 0x46f34c
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push edi
push ecx
mov ecx, esi
call fcn.0046df70
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 2
call fcn.0049b159
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], bl
call fcn.0049b06c
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x4dcf2c
call fcn.0049b0da
lea edx, [esp + 0x14]
push 0x3d
push edx
lea eax, [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.0046e330
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 3
call fcn.0049b159
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
call fcn.0049b06c
lea ecx, [esp + 0xc]
call fcn.0049b534
mov ecx, dword [esp + 0xc]
push 0x4dd96c
push ecx
call fcn.0048ab94
add esp, 8
test eax, eax
je 0x46f374
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx - 8]
cmp ecx, eax
jl 0x46f2ad
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.0049b06c
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.0049b06c
jmp 0x46f3fb
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.0046eff0
test eax, eax
push 0
je 0x46f3df
lea ecx, [esp + 0x34]
push 0x64
push ecx
mov ecx, esi
call fcn.0046d690
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x46f3c5
cmp eax, 0x64
jg 0x46f3b3
mov edx, dword [esp + 0x38]
push eax
push 0x64
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x46f350
push 0x64
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x46f350
cmp eax, 0x64
jge 0x46f34c
mov ecx, dword [esp + 0x34]
push 0x64
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x46f350
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push eax
mov ecx, esi
call fcn.0046d690
mov esi, eax
jmp 0x46f350
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x46f405
mov eax, esi
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10
Function at 0x47a960
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x18]
imul eax, edi
add eax, edx
cmp edx, eax
mov dword [ebp - 0x14], eax
jae 0x47aa81
mov eax, dword [ebp + 0x10]
lea eax, [edx + eax*4]
push ebx
push esi
mov dword [ebp + 0x14], eax
mov esi, 0xffc03fc0
mov eax, 0xff00ff
cmp edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
jae 0x47aa65
mov ebx, dword [ebp + 0x14]
sub ebx, edx
dec ebx
shr ebx, 3
lea ecx, [edx + 4]
inc ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ebx
mov edx, dword [ecx + edi]
mov edi, dword [edi + ecx - 4]
mov dword [ebp - 8], edi
shr edi, 2
and edi, esi
mov dword [ebp + 0x10], edx
mov edx, dword [ecx]
mov ecx, dword [ecx - 4]
mov ebx, ecx
shr ebx, 2
and ebx, esi
add ebx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ebx, edi
mov edi, edx
shr edi, 2
and edi, esi
lea ebx, [ebx + edi - 0x7fff80]
mov edi, dword [ebp - 8]
and edi, eax
mov esi, ecx
and esi, eax
add esi, edi
mov edi, dword [ebp + 0x10]
and edi, eax
add esi, edi
mov edi, edx
and edi, eax
lea esi, [esi + edi + 0x20002]
mov edi, dword [ebp - 8]
shr ecx, 2
shr esi, 2
xor ebx, esi
shr edi, 2
mov esi, 0x3fc03fc0
and ecx, esi
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x18]
shr edx, 2
and edx, esi
lea ecx, [ecx + edx + 0x800080]
and ebx, eax
xor ebx, ecx
mov ecx, dword [ebp - 4]
add dword [ebp - 4], 4
mov dword [ecx], ebx
mov ecx, dword [ebp - 0xc]
add ecx, 8
dec dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
mov esi, 0xffc03fc0
jne 0x47a9b7
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
add dword [ebp + 8], ecx
lea ecx, [edi + edi]
add dword [ebp + 0x14], ecx
add edx, ecx
cmp edx, dword [ebp - 0x14]
mov dword [ebp + 0xc], edx
jb 0x47a995
pop esi
pop ebx
xor eax, eax
pop edi
leave
ret 0x18

Function at 0x47b4c9
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftDirect3D
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x47b520
push esi
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x47b520
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x47b520
xor eax, eax
inc eax
jmp 0x47b522
xor eax, eax
leave
ret 0x10
Function at 0x47b54b
Capabilities:
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push edi
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftDirect3D
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edi, edi
test eax, eax
jne 0x47b5b9
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push 0x4bb7f4
push dword [ebp - 4]
mov dword [ebp - 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x47b5b0
cmp dword [ebp - 0xc], 4
jne 0x47b5b0
cmp dword [ebp - 0x10], edi
je 0x47b5b0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x4dfa58], edi
xor eax, eax
jmp 0x47b5f8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x4dfa58], edi
jge 0x47b5f3
lea eax, [ebp - 0x34]
push eax
mov dword [0x4dfa58], edi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [ebp - 0x34], di
jne 0x47b5f3
cmp word [ebp - 0x14], 5
jb 0x47b5f3
call fcn.0047b526
test eax, eax
je 0x47b5f3
emms
mov dword [0x4dfa58], 1
mov eax, dword [0x4dfa58]
pop edi
leave
ret

Function at 0x49d44d
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x49d485
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0049b4c7
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0049b49f
jmp 0x49d491
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x49eb44
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x49eb86
call fcn.004a48c1
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x49eb86
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x49eb7d
xor eax, eax
jmp 0x49eb8e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0049eb94
pop edi
pop esi
pop ebx
ret 4

Function at 0x4a4df1
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4a4e1f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4a4e3d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004a4d57
jmp 0x4a4e3d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4a4e3d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004a4d57
test edi, edi
mov eax, edi
jne 0x4a4e27
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x40138b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
cmp dword [ebp + 8], ebx
mov byte [ebp - 0x400], bl
mov ecx, 0xff
lea edi, [ebp - 0x3ff]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x4013dd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40a8ac
call fcn.004029d0
pop ecx
push eax
lea eax, [ebp - 0x400]
push eax
call fcn.004029f6
add esp, 0x10
jmp 0x4013ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40a878
call fcn.004029d0
pop ecx
push eax
lea eax, [ebp - 0x400]
push eax
call fcn.004029f6
add esp, 0xc
push ebx
push 0x40a86c
call fcn.004029d0
pop ecx
push eax
lea eax, [ebp - 0x400]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [0x40fdfc], ebx
je 0x401427
call fcn.0040289e
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
inc edi
cmp dword [0x40fe00], ebx
je 0x401456
mov eax, dword [0x40fe04]
cmp eax, ebx
mov dword [0x40fdf8], edi
je 0x401456
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push dword [0x40fe04]
call esi
mov eax, dword [0x40fe0c]
cmp eax, ebx
je 0x401462
push eax
call esi
mov eax, dword [0x40fd40]
cmp eax, ebx
je 0x401477
push 0x4641494c
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [0x40fd40]
call esi
push dword [0x40fd44]
call esi
push edi
call fcn.00403007
int3
Function at 0x40296e
Capabilities:
Encode data using xor
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
cmp ecx, dword [ebp + 0x10]
push esi
lea esi, [eax + 4]
jge 0x4029b4
test ecx, ecx
jl 0x4029b4
mov eax, dword [ebp + 0xc]
mov dl, byte [ecx + esi - 1]
push edi
lea edi, [ecx + eax]
add ecx, 0xfffffffe
mov byte [edi - 1], dl
js 0x4029ae
push ebx
mov ebx, esi
lea edx, [ecx + eax]
sub ebx, eax
lea esi, [ecx + 1]
mov cl, byte [ebx + edx]
xor cl, byte [edx + 1]
mov byte [edx], cl
dec edx
dec esi
jne 0x4029a1
pop ebx
mov byte [edi], 0
pop edi
jmp 0x4029cd
cmp dword [ebp + 0x10], 0
mov esi, dword [ebp + 0xc]
jle 0x4029c0
mov byte [esi], 0
push 0x40ab68
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, esi
pop esi
pop ebp
ret

Function at 0x402f44
Capabilities:
Terminate process

Disassembly:
push 8
push 0x40ab88
call fcn.004040bc
push 8
call fcn.00403f0e
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x410e5c], esi
jne 0x402f78
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x410e58], esi
mov al, byte [ebp + 0x10]
mov byte [0x410e54], al
cmp dword [ebp + 0xc], edi
jne 0x402fc2
cmp dword [0x41266c], edi
je 0x402fb2
mov eax, dword [0x412668]
sub eax, 4
mov dword [0x412668], eax
cmp eax, dword [0x41266c]
jb 0x402fb2
mov eax, dword [eax]
cmp eax, edi
je 0x402f93
call eax
jmp 0x402f93
push 0x40d028
mov eax, 0x40d020
call fcn.00402ec2
pop ecx
push 0x40d030
mov eax, 0x40d02c
call fcn.00402ec2
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x402ff3
cmp dword [ebp + 0x10], edi
jne 0x403001
mov dword [0x410e5c], esi
push dword [ebp + 8]
call fcn.00402e80
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x403000
push 8
call fcn.00403e59
pop ecx
ret
call fcn.004040f7
ret
Function at 0x404211
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x40f6f8]
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 + 0x40f308]
je 0x404248
inc eax
cmp eax, 0x13
jb 0x404239
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40f308]
jne 0x40436b
mov eax, dword [0x410e68]
cmp eax, 1
je 0x404346
cmp eax, edx
jne 0x404278
cmp dword [0x40f1d4], 1
je 0x404346
cmp ecx, 0xfc
je 0x40436b
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 0x4042ae
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00403360
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00402d90
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4042e2
mov eax, edi
push eax
call fcn.00402d90
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x40b048
push edi
call fcn.00406660
add esp, 0x10
push edi
call fcn.00402d90
push dword [esi + 0x40f30c]
mov ebx, eax
call fcn.00402d90
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00403050
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00403360
push edi
push ebx
call fcn.00403370
push 0x40b028
push ebx
call fcn.00403370
push dword [esi + 0x40f30c]
push ebx
call fcn.00403370
push 0x12010
push str.dirt2o.exe
push ebx
call fcn.00406567
add esp, 0x2c
jmp 0x40436b
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x40f30c]
push dword [esi]
call fcn.00402d90
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.00405e5a
add ebp, 0x90
leave
ret
Function at 0x405842
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x40f6f8]
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 0x40587e
xor eax, eax
jmp 0x4059e8
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 + 0x412560]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4058bc
push 2
push ecx
push ecx
push dword [ebp + 0x3ac]
call fcn.00407dca
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x405956
cmp dword [ebp + 0x3b4], ecx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
jbe 0x4059b9
jmp 0x4058e0
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 0x40591b
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40590c
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 0x4058ec
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 0x40597a
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x405983
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x7c]
cmp eax, dword [ebp + 0x3b4]
jb 0x4058de
jmp 0x405983
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 0x40597a
mov eax, dword [ebp - 0x80]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x74], eax
jmp 0x405983
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x4059e3
cmp dword [ebp - 0x68], eax
je 0x4059b6
push 5
pop esi
cmp dword [ebp - 0x68], esi
jne 0x4059ab
call fcn.00405fa0
mov dword [eax], 9
call fcn.00405fa9
mov dword [eax], esi
jmp 0x4059de
push dword [ebp - 0x68]
call fcn.00405fb2
pop ecx
jmp 0x4059de
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4059cb
cmp byte [edi], 0x1a
jne 0x4059cb
xor eax, eax
jmp 0x4059e6
call fcn.00405fa0
mov dword [eax], 0x1c
call fcn.00405fa9
and dword [eax], 0
or eax, 0xffffffff
jmp 0x4059e6
sub eax, dword [ebp - 0x78]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.00405e5a
add ebp, 0x3a4
leave
ret