joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401d40
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esp + 0x14]
push edi
mov edi, eax
imul edi, dword [esp + 0x10]
cmp ecx, edi
jae 0x401d6c
push str.ERROR_Invalid_parameter__cbBufSize___dwBytesToRead___n
push 1
call fcn.00401040
add esp, 8
pop edi
xor eax, eax
pop esi
ret 0x10
mul dword [esp + 0xc]
mov ecx, dword [esi + 0x38]
push ebx
xor ebx, ebx
push ebx
add eax, ecx
push ebx
adc edx, ebx
push edx
mov edx, dword [esi + 0x14]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
pop ebx
je 0x401db8
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401db8
cmp edi, dword [esp + 0x10]
jne 0x401db8
pop edi
mov eax, 1
pop esi
ret 0x10
mov eax, dword [esi + 8]
test eax, eax
je 0x401dd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadSectors
call fcn.00401120
add esp, 8
pop edi
xor eax, eax
pop esi
ret 0x10

Function at 0x401de0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esp + 0x14]
push edi
mov edi, eax
imul edi, dword [esp + 0x10]
cmp ecx, edi
jae 0x401e0c
push str.ERROR_Invalid_parameter__cbBufSize___dwBytesToWrite___n
push 1
call fcn.00401040
add esp, 8
pop edi
xor eax, eax
pop esi
ret 0x10
mul dword [esp + 0xc]
mov ecx, dword [esi + 0x38]
push ebx
xor ebx, ebx
push ebx
add eax, ecx
push ebx
adc edx, ebx
push edx
mov edx, dword [esi + 0x14]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
pop ebx
je 0x401e58
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401e58
cmp edi, dword [esp + 0x10]
jne 0x401e58
pop edi
mov eax, 1
pop esi
ret 0x10
mov eax, dword [esi + 8]
test eax, eax
je 0x401e73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteSectors
call fcn.00401120
add esp, 8
pop edi
xor eax, eax
pop esi
ret 0x10
Function at 0x4021f0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0xc]
push edi
xor edi, edi
cmp eax, edi
je 0x402247
mov eax, dword [esi + 0x14]
cmp eax, 0xffffffff
je 0x402247
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40223c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40e368
call fcn.00401120
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [esi + 0x10], 0xff
mov dword [esi + 0x14], 0xffffffff
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
je 0x40226a
lea ebx, [esi + 0x18]
push ebx
mov ecx, esi
mov dword [esi + 0x14], eax
mov dword [esi + 0xc], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x40], edi
call fcn.004017c0
test eax, eax
jne 0x402275
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor eax, eax
mov ecx, 0x47
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [esp + 0x14]
cmp eax, 5
ja 0x4022d6
jne 0x4022a8
mov eax, dword [esp + 0x18]
test eax, eax
ja 0x4022d6
mov eax, dword [esi + 0x28]
mul dword [esi + 0x24]
mov ecx, dword [ebx]
mov edi, dword [ebx + 4]
add ecx, 1
adc edi, 0
push edi
push ecx
push edx
push eax
call fcn.00406750
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x100
lea edx, [esp + 0x134]
push edx
mov ecx, esi
call fcn.00401950
mov eax, dword [esi + 0x2c]
mov ecx, dword [esp + 0x14c]
mov edx, dword [esp + 0x148]
push 0
push eax
push ecx
push edx
call fcn.00406790
pop edi
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edx
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4029c0
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x18
lea eax, [esp + 4]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4029f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40ee80
call fcn.00401120
add esp, 8
xor eax, eax
add esp, 0x18
ret
mov edx, dword [esp + 4]
push ebx
push ebp
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [esp + 0xc]
push ecx
xor ebx, ebx
push ebx
push ebx
push 2
push edx
mov dword [esp + 0x20], ebx
call edi
test eax, eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x402a3e
call ebp
cmp eax, 0x7a
je 0x402a3e
call ebp
push eax
push str.GetTokenInformation_1
call fcn.00401120
add esp, 8
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0xc]
push esi
push eax
call fcn.00406a90
mov edx, dword [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov esi, eax
mov eax, dword [esp + 0x1c]
push esi
push 2
push eax
call edi
mov ecx, dword [esp + 0x14]
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
jne 0x402a93
call ebp
push eax
push str.GetTokenInformation_2
call fcn.00401120
push esi
call fcn.0040683a
add esp, 0xc
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
lea edx, [esp + 0x18]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [esp + 0x48]
push eax
mov byte [esp + 0x4c], bl
mov byte [esp + 0x4d], bl
mov byte [esp + 0x4e], bl
mov byte [esp + 0x4f], bl
mov byte [esp + 0x50], bl
mov byte [esp + 0x51], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x402ad9
call ebp
push eax
push 0x40edf4
jmp 0x402a7b
cmp dword [esi], ebx
mov dword [esp + 0x1c], ebx
jbe 0x402b18
mov ebp, dword [sym.imp.ADVAPI32.dll_EqualSid]
lea edi, [esi + 8]
lea ebx, [ebx]
mov ecx, dword [edi - 4]
mov edx, dword [esp + 0x18]
push ecx
push edx
call ebp
test eax, eax
je 0x402b04
test byte [edi], 4
jne 0x402b10
mov eax, dword [esi]
inc ebx
add edi, 8
cmp ebx, eax
jb 0x402af0
jmp 0x402b18
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push esi
call fcn.0040683a
mov eax, dword [esp + 0x20]
add esp, 4
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x403050
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0xc80
mov eax, dword [esp + 0xc84]
push ebx
push ebp
xor ebx, ebx
xor ebp, ebp
test eax, eax
push esi
mov dword [esp + 0xc], 1
je 0x40328e
cmp word [eax], bp
je 0x40328e
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x18]
push edx
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea eax, [esp + 0x14]
push eax
call fcn.00406154
lea eax, [esp + eax*2 + 0x18]
add esp, 4
mov dword [esp + 0x10], eax
cmp word [eax - 2], 0x5c
je 0x4030c2
mov word [eax], 0x5c
mov eax, dword [esp + 0x10]
add eax, 2
mov dword [esp + 0x10], eax
mov word [eax], bp
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x220]
push edx
call fcn.004066a3
lea eax, [esp + 0x224]
push str.COMMAND.COM
push eax
call fcn.00406679
mov eax, dword [0x414320]
add esp, 0x10
test eax, eax
jne 0x403120
lea ecx, [esp + 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403120
push str.ERROR_No_COMMAND.COM_was_found_at_the_specified_location__n
push 1
call fcn.00401040
add esp, 8
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc80
ret
push edi
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x83c]
push eax
call fcn.004066a3
lea ecx, [esp + 0x840]
push str.IO.SYS
push ecx
call fcn.00406679
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x43c]
push eax
call fcn.004066a3
lea ecx, [esp + 0x440]
push str.MSDOS.SYS
push ecx
call fcn.00406679
mov esi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
add esp, 0x20
lea edx, [esp + 0xa40]
push edx
lea eax, [esp + 0x83c]
push eax
call esi
cmp eax, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
je 0x4031be
mov ecx, dword [esp + 0xa60]
mov edx, 0x32000
cmp edx, ecx
sbb ebx, ebx
neg ebx
cmp ecx, 0x19000
jbe 0x4031b7
cmp ecx, edx
jae 0x4031b7
push eax
mov ebp, 1
call edi
jmp 0x4031c6
push eax
xor ebp, ebp
call edi
jmp 0x4031c6
mov dword [esp + 0x10], 0
lea eax, [esp + 0xa40]
push eax
lea ecx, [esp + 0x42c]
push ecx
call esi
cmp eax, 0xffffffff
je 0x40323e
push eax
call edi
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x634]
push eax
call fcn.004066a3
lea ecx, [esp + 0x638]
push str.KERNEL.SYS
push ecx
call fcn.00406679
add esp, 0x10
test esi, esi
pop edi
jne 0x40324a
lea edx, [esp + 0x62c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40324a
push str.ERROR_No_DOS_system_file_s__was_found_at_the_specified_location__n
push 1
call fcn.00401040
add esp, 8
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc80
ret
test ebx, ebx
jne 0x4031e0
test ebp, ebp
jne 0x4031e0
xor esi, esi
jmp 0x4031e4
test ebp, ebp
je 0x40326a
mov eax, dword [esp + 0xc94]
pop esi
pop ebp
mov dword [eax], 3
mov eax, 1
pop ebx
add esp, 0xc80
ret
test ebx, ebx
je 0x40328a
mov ecx, dword [esp + 0xc94]
pop esi
pop ebp
mov dword [ecx], 2
mov eax, 1
pop ebx
add esp, 0xc80
ret
test esi, esi
je 0x4032aa
mov edx, dword [esp + 0xc94]
pop esi
pop ebp
mov dword [edx], 1
mov eax, 1
pop ebx
add esp, 0xc80
ret
mov eax, dword [esp + 0xc94]
pop esi
pop ebp
mov dword [eax], 0x80
mov eax, 1
pop ebx
add esp, 0xc80
ret
Function at 0x403a80
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows
Set file attributes
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ebx, 0x80
push esi
mov byte [esp + 0x24], 0x8a
mov byte [esp + 0x25], 0x56
mov byte [esp + 0x26], 0x40
mov byte [esp + 0x27], bl
mov byte [esp + 0x28], 0xfa
mov byte [esp + 0x29], bl
mov byte [esp + 0x2a], 0x75
mov byte [esp + 0x2b], 9
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push ebx
push esi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403c1a
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x40]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x403c13
push edi
call fcn.00406a90
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x18], esi
je 0x403c13
push 0
lea eax, [esp + 0x14]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403c0a
cmp edi, dword [esp + 0x10]
jne 0x403c0a
lea ecx, [edi - 7]
mov eax, 0x200
cmp ecx, eax
mov dword [esp + 0x14], ecx
jbe 0x403b8e
jmp 0x403b70
mov esi, dword [esp + 0x18]
jmp 0x403b70
add esi, eax
mov ecx, 2
lea edi, [esp + 0x20]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
mov ecx, dword [esp + 0x14]
je 0x403b8a
inc eax
cmp eax, ecx
jb 0x403b63
mov esi, dword [esp + 0x18]
cmp eax, ecx
jae 0x403bc9
xor ecx, ecx
push ecx
push ecx
lea edi, [eax + esi + 6]
push ecx
add eax, 6
push eax
push ebx
mov byte [edi], 0xeb
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x403c0a
push 0
lea eax, [esp + 0x14]
push eax
push 1
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403c0a
cmp dword [esp + 0x10], 1
jne 0x403c0a
push esi
call fcn.0040683a
add esp, 4
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.0040683a
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405290
Capabilities:
Get disk information

Disassembly:
sub esp, 0x14
mov eax, dword [0x4142e4]
push esi
xor esi, esi
push esi
push esi
push 0x147
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
imul eax, eax, 0x84
mov ecx, dword [0x40edec]
mov edx, dword [0x40edf0]
mov ax, word [eax + 0x4132ac]
push 0x104
push 0x412e48
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0x20], edx
lea edx, [esp + 0x14]
push edx
mov word [esp + 0x20], ax
lea eax, [esp + 0x1c]
push eax
push 0x104
push 0x412c40
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
mov word [0x412c40], si
mov word [0x412e48], si
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
pop esi
jne 0x405330
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_query_the_target_volume
call fcn.00401120
add esp, 8
mov edx, dword [0x4142ec]
push 0x412c40
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
call fcn.00404680
add esp, 0x14
ret
Function at 0x405d70
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x328
push ebx
push ebp
push esi
mov esi, dword [esp + 0x338]
push edi
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowRect]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
add eax, edx
cdq
sub eax, edx
sub ecx, ebp
sub edi, ebx
mov ebx, eax
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
push 0
push ecx
mov ecx, dword [esp + 0x18]
sar ebx, 1
sub ebx, eax
lea eax, [edx + ecx]
cdq
sub eax, edx
mov ecx, eax
mov eax, edi
cdq
push edi
sub eax, edx
sar ecx, 1
sar eax, 1
push ebx
sub ecx, eax
push ecx
push esi
call dword [sym.imp.USER32.dll_MoveWindow]
push 0
push esi
call dword [sym.imp.USER32.dll_GetSystemMenu]
push 0x80
lea edx, [esp + 0x34]
push edx
mov edi, eax
mov eax, dword [0x4129d0]
push 2
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
mov ebx, dword [sym.imp.USER32.dll_AppendMenuW]
push 0
push 0
push 0x800
push edi
call ebx
lea ecx, [esp + 0x30]
push ecx
push 0x10
push 0
push edi
call ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea edx, [esp + 0x134]
push edx
call fcn.004066a3
lea eax, [esp + 0x138]
push eax
call fcn.00406c44
lea ecx, [esp + 0x13c]
push 0x40f8c8
push ecx
call fcn.00406be6
add esp, 0x14
test eax, eax
je 0x405e79
mov dword [0x414320], 1
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x3eb
push esi
mov dword [0x4142e0], esi
call edi
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x14b
push eax
mov dword [0x4142e4], eax
call ebx
push 0x3e9
push esi
call edi
push 0
push 0
push 0x14b
push eax
mov dword [0x4142e8], eax
call ebx
push 0x3ea
push esi
call edi
push 0x3ed
push esi
mov dword [0x4142ec], eax
call edi
push 0x3ee
push esi
mov dword [0x4142f0], eax
call edi
push 0x3ef
push esi
mov dword [0x4142f4], eax
call edi
mov edx, dword [0x4142fc]
mov ebp, dword [sym.imp.USER32.dll_EnableWindow]
push 0
push edx
mov dword [0x4142f8], eax
call ebp
mov eax, dword [0x4142fc]
push 0
push 0
push 0xf1
push eax
call ebx
mov ecx, dword [0x414300]
push 1
push ecx
call ebp
mov edx, dword [0x414300]
push 0
push 1
push 0xf1
push edx
call ebx
push 0x3f0
push esi
call edi
push 0x3f1
push esi
mov dword [0x414304], eax
call edi
push 0x3f6
push esi
mov dword [0x414308], eax
call edi
push 0x3ec
push esi
mov dword [0x41430c], eax
call edi
push 0x3f3
push esi
mov dword [0x414310], eax
call edi
push 0
push 1
mov dword [0x414314], eax
push 0xf1
mov eax, dword [0x4142f0]
push eax
call ebx
mov ecx, dword [0x4142f0]
push 1
push ecx
call ebp
call fcn.004059a0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x328
ret
Function at 0x406d74
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40f8e8
call fcn.00409190
mov edi, 0x94
mov eax, edi
call fcn.00406910
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 [0x41438c], ecx
mov eax, dword [esi + 4]
mov dword [0x414398], eax
mov edx, dword [esi + 8]
mov dword [0x41439c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x414390], esi
cmp ecx, 2
je 0x406dd4
or esi, 0x8000
mov dword [0x414390], esi
shl eax, 8
add eax, edx
mov dword [0x414394], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x406e0f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406e0f
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x406e27
cmp eax, 0x20b
je 0x406e14
mov dword [ebp - 0x1c], esi
jmp 0x406e3b
cmp dword [ecx + 0x84], 0xe
jbe 0x406e0f
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x406e35
cmp dword [ecx + 0x74], 0xe
jbe 0x406e0f
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.004084b9
pop ecx
test eax, eax
jne 0x406e67
cmp dword [0x414330], 1
jne 0x406e54
call fcn.004099ad
push 0x1c
call fcn.00409835
push 0xff
call fcn.0040969a
pop ecx
pop ecx
call fcn.0040a156
mov dword [ebp - 4], esi
call fcn.00409fab
test eax, eax
jge 0x406e80
push 0x1b
call fcn.00406d4f
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x415908], eax
call fcn.00409e89
mov dword [0x414328], eax
call fcn.00409de7
test eax, eax
jge 0x406ea6
push 8
call fcn.00406d4f
pop ecx
call fcn.00409bb4
test eax, eax
jge 0x406eb7
push 9
call fcn.00406d4f
pop ecx
push 1
call fcn.004096ca
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x406ecd
push eax
call fcn.00406d4f
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00409b57
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x406eee
movzx eax, word [ebp - 0x40]
jmp 0x406ef1
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00402b40
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x406f0f
push edi
call fcn.004097f5
call fcn.00409817
jmp 0x406f41
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004091cb
ret
Function at 0x4090ab
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.00406910
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409146
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 [0x41438c]
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 0x409146
cmp eax, 1
je 0x409167
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 0x409146
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x409113
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x409142
xor eax, eax
inc eax
jmp 0x409186
cmp edi, eax
jae 0x40914a
xor eax, eax
jmp 0x409186
cmp eax, esi
jae 0x409151
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 [0x41438c]
jmp 0x40916a
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 0x409734
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4143cc], esi
push edi
jne 0x409754
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 [0x4143c8], esi
mov byte [0x4143c4], al
jne 0x4097ba
mov ecx, dword [0x4148c8]
test ecx, ecx
je 0x40979b
mov eax, dword [0x4148c4]
sub eax, 4
cmp eax, ecx
jmp 0x409794
mov eax, dword [eax]
test eax, eax
je 0x409786
call eax
mov eax, dword [0x4148c4]
sub eax, 4
cmp eax, dword [0x4148c8]
mov dword [0x4148c4], eax
jae 0x40977e
mov eax, 0x412024
mov esi, 0x41202c
cmp eax, esi
mov edi, eax
jae 0x4097ba
mov eax, dword [edi]
test eax, eax
je 0x4097b3
call eax
add edi, 4
cmp edi, esi
jb 0x4097ab
mov eax, 0x412030
mov esi, 0x412038
cmp eax, esi
mov edi, eax
jae 0x4097d9
mov eax, dword [edi]
test eax, eax
je 0x4097d2
call eax
add edi, 4
cmp edi, esi
jb 0x4097ca
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4097f3
push dword [ebp + 8]
mov dword [0x4143cc], 1
call fcn.0040969a
pop ebp
ret
Function at 0x409835
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x41232c]
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 + 0x4125f0]
je 0x40986c
inc eax
cmp eax, 0x13
jb 0x40985d
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4125f0]
jne 0x40998f
mov eax, dword [0x414330]
cmp eax, 1
je 0x40996a
cmp eax, edx
jne 0x40989c
cmp dword [0x412324], 1
je 0x40996a
cmp ecx, 0xfc
je 0x40998f
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 0x4098d2
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.0040bcb0
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.0040a580
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x409906
mov eax, edi
push eax
call fcn.0040a580
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x410290
push edi
call fcn.0040ac70
add esp, 0x10
push edi
call fcn.0040a580
push dword [esi + 0x4125f4]
mov ebx, eax
call fcn.0040a580
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00406910
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040bcb0
push edi
push ebx
call fcn.0040bcc0
push 0x410270
push ebx
call fcn.0040bcc0
push dword [esi + 0x4125f4]
push ebx
call fcn.0040bcc0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040bbb5
add esp, 0x2c
jmp 0x40998f
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x4125f4]
push dword [esi]
call fcn.0040a580
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.0040a704
add ebp, 0x90
leave
ret