joyce8/EMBER2024-capa huggingface dataset:
Function at 0x20055664
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
test dl, dl
je 0x20055678
add esp, 0xfffffff0
call fcn.20008d7c
mov ebx, edx
mov esi, eax
mov dl, 1
mov eax, dword [0x2004f5e8]
call fcn.200740d0
mov dword [esi + 4], eax
mov dl, 1
mov eax, dword [0x20054634]
call fcn.20076e84
mov dword [esi + 8], eax
mov dl, 1
mov eax, dword [0x20054634]
call fcn.20076e84
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x24]
push eax
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x10], eax
mov eax, esi
test bl, bl
je 0x200556cd
call fcn.20008dd4
pop dword fs:[0]
add esp, 0xc
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x200b8fac
Capabilities:
Resume thread

Disassembly:
push ebx
mov ebx, eax
or dl, byte [ebx + 0xd]
je 0x200b8fef
cmp byte [ebx + 0x11], 0
jne 0x200b8fef
cmp byte [ebx + 0x24], 0
jne 0x200b8fef
mov byte [ebx + 0xf], 0
mov byte [ebx + 0xd], 0
mov eax, dword [ebx + 8]
push eax
call sub.kernel32.dll_ResumeThread
cmp eax, 1
je 0x200b9006
mov ecx, dword [0x200dbe74]
mov dl, 1
mov eax, dword [0x2008be24]
call fcn.20028c1c
call fcn.20009c4c
pop ebx
ret
mov ecx, dword [0x200dbe74]
mov dl, 1
mov eax, dword [0x2008be24]
call fcn.20028c1c
call fcn.20009c4c
pop ebx
ret

Function at 0x200b9974
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xf]
mov byte [ebp - 5], al
xor eax, eax
push ebp
push 0x200b99c2
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0xf], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
call sub.kernel32.dll_SuspendThread
test eax, eax
setge dl
mov eax, dword [ebp - 4]
call fcn.200b8e58
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x200b99db
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret

Function at 0x200b99e4
Capabilities:
Resume thread

Disassembly:
push ebx
push esi
mov ebx, eax
mov eax, dword [ebx + 8]
push eax
call sub.kernel32.dll_ResumeThread
mov esi, eax
test esi, esi
setge dl
mov eax, ebx
call fcn.200b8e58
dec esi
jne 0x200b9a06
mov byte [ebx + 0xf], 0
pop esi
pop ebx
ret

Function at 0x200d3000
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
mov dword [ebp - 8], 1
mov dword [ebp - 4], 0
push 8
lea ecx, [ebp - 8]
push ecx
push 3
push 0
call dword [0x117eea74]
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x200d3037
push 0x200d303c
call sub.kernel32.dll_OutputDebugStringA
pop ecx
pop ecx
pop ebp
ret
Function at 0x432002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
mov eax, section..text
nop
nop
nop
nop
push 4
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x432072
nop
nop
mov ebx, 0x40c7d0
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x3a222ae3
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x432060
nop
nop
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
je 0x4320d2
nop
nop
nop
mov ebx, 0x42f314
nop
nop
nop
nop
mov ecx, ebx
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x592d1985
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x4320c0
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x401000
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push esi
push edi
mov esi, ecx
push 0x100
call fcn.00401b70
add esp, 4
mov edi, eax
mov eax, dword [esi]
push 0x100
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0x10000080
push 3
push 0
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
mov edi, eax
push 0
push 0xf000
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 8]
push 0
push ecx
lea edx, [esp + 0x14]
push 0xc
push edx
push edi
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], edx
mov eax, esi
pop edi
pop esi
add esp, 0x10
ret

Function at 0x401250
Capabilities:
Hide graphical window

Disassembly:
push 0xffffffffffffffff
push 0x404d78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push esi
push edi
mov edi, dword [esp + 0x4c]
push edi
lea ecx, [esp + 0x10]
call fcn.00401600
mov ebx, dword [0x408710]
push 0x100
mov dword [esp + 0x48], 0
call fcn.00401b70
add esp, 4
mov esi, eax
mov eax, dword [ebx]
push 0x100
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [0x408710]
mov edx, dword [ecx + 0x10]
lea ecx, [esp + 0xc]
add edx, 0xf000
push edx
push esi
call fcn.00401640
test al, al
je 0x4012e9
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0x3eb
push edi
call esi
mov ebx, dword [sym.imp.USER32.dll_ShowWindow]
push eax
call ebx
push 0
push 0x3ea
push edi
call esi
push eax
call ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0x44], 0xffffffff
call fcn.00401630
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x3c
ret
Function at 0x401320
Capabilities:
Get graphical window text
Hide graphical window

Disassembly:
sub esp, 0x100
lea eax, [esp]
push ebx
push ebp
mov ebp, dword [sym.imp.USER32.dll_GetDlgItem]
push esi
push edi
mov edi, dword [esp + 0x114]
push 0xff
push eax
push 0x3ea
push edi
call ebp
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov esi, 0x406038
lea eax, [esp + 0x10]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x401381
test cl, cl
je 0x40137d
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x401381
add eax, 2
add esi, 2
test cl, cl
jne 0x401359
xor eax, eax
jmp 0x401386
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
push 0x3ee
push edi
jne 0x4013ca
call ebp
test eax, eax
je 0x401411
push 8
push 0x3ee
push edi
call ebp
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
push eax
call esi
push 0
push 0x3eb
push edi
call ebp
push eax
call esi
push 0
push 0x3ec
push edi
call ebp
push eax
call esi
push str.Back
jmp 0x401402
call ebp
test eax, eax
je 0x401411
push 0
push 0x3ee
push edi
call ebp
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
push eax
call esi
push 8
push 0x3eb
push edi
call ebp
push eax
call esi
push 8
push 0x3ec
push edi
call ebp
push eax
call esi
push 0x406038
push 0x3ea
push edi
call ebp
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x100
ret

Function at 0x401600
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 4]
push esi
mov esi, ecx
push 0x100
mov dword [esi], eax
call fcn.00401b70
add esp, 4
mov dword [esi + 8], eax
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, esi
pop esi
ret 4
Function at 0x401640
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov edi, str._rtf1_ansideff0deftab720_fonttbl_f0_fswiss_fprq2_fcharset238_Arial_colortbl_red0green0_blue0_deflang1031pardplain_f0_fs16par_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call fcn.00401b70
mov edx, eax
mov edi, str._rtf1_ansideff0deftab720_fonttbl_f0_fswiss_fprq2_fcharset238_Arial_colortbl_red0green0_blue0_deflang1031pardplain_f0_fs16par_
or ecx, 0xffffffff
xor eax, eax
add esp, 4
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebx + 0xc]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
push 2
push 0x449
push 0x3ec
push ecx
mov dword [eax], edx
mov dword [ebx + 0x10], ebp
mov dword [ebx + 0x14], 0x4019d0
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push str.PatchFX_v1.10_n_n_n
mov ecx, ebx
call fcn.00401a40
mov edi, dword [esp + 0x18]
push ebp
push 0x10000080
push 3
push ebp
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4016e7
push 0x30
push str.Error_opening_reading_file.
push edi
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [esp + 0x1c]
push ebp
push ebp
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x10]
push ebp
lea edi, [ebx + 4]
push eax
push 1
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [edi], 0
jbe 0x401722
push esi
mov ecx, ebx
call fcn.00401760
test al, al
je 0x40173f
xor ecx, ecx
inc ebp
mov cl, byte [edi]
cmp ebp, ecx
jl 0x40170d
push str._nEverything_went_OK__n
mov ecx, ebx
call fcn.00401a40
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str._nERROR:_patch_could_not_be_applied__n
mov ecx, ebx
call fcn.00401a40
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret 8
Function at 0x401760
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, ecx
push edi
lea eax, [esp + 0x14]
push 0
lea edi, [esi + 0x18]
push eax
push 4
push edi
push ebx
call ebp
mov ecx, dword [edi]
push ecx
call fcn.00401b70
mov ecx, dword [edi]
add esp, 4
lea edx, [esp + 0x14]
mov dword [esi + 0x1c], eax
push 0
push edx
push ecx
push eax
push ebx
mov dword [esi + 0x20], eax
call ebp
mov eax, dword [esi + 0x20]
mov dword [esi + 0x24], eax
mov dl, byte [eax]
inc eax
test dl, dl
mov dword [esi + 0x20], eax
je 0x4017b9
mov cl, byte [eax]
inc eax
test cl, cl
mov dword [esi + 0x20], eax
jne 0x4017af
push str.opening
mov ecx, esi
call fcn.00401a40
mov edx, dword [esi + 0x24]
mov ecx, esi
push edx
call fcn.00401a40
push 0x40623c
mov ecx, esi
call fcn.00401a40
mov eax, dword [esi + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x10000080
push 3
push 0
push 0
push 0xc0000000
push eax
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40187f
push str.failed._n
mov ecx, esi
call fcn.00401a40
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Locating_file_manually...
mov ecx, esi
mov dword [esp + 0x18], eax
call fcn.00401a40
mov ecx, dword [esi + 0x24]
mov edx, dword [esi]
push ecx
push edx
call fcn.00401510
add esp, 8
mov dword [esi + 0x24], eax
test eax, eax
jne 0x40184e
push str.failed__n
mov ecx, esi
call fcn.00401a40
xor al, al
pop edi
pop esi
pop ebp
pop ebx
ret 4
push 0
push 0x10000080
push 3
push 0
push 0
push 0xc0000000
push eax
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40187f
push str.OK._nERROR:_Access_denied._Maybe_the_file_is_write_protected._n
mov ecx, esi
call fcn.00401a40
xor al, al
pop edi
pop esi
pop ebp
pop ebx
ret 4
push str.OK__n
mov ecx, esi
call fcn.00401a40
mov eax, dword [esi + 0x20]
push str.performing_crc_check...
mov ecx, dword [eax]
add eax, 4
mov dword [esi + 0x28], ecx
mov ecx, esi
mov dword [esi + 0x20], eax
call fcn.00401a40
push ebx
mov ecx, esi
call fcn.00401950
cmp dword [esi + 0x28], eax
je 0x4018ce
push str.failed__n
mov ecx, esi
call fcn.00401a40
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
ret 4
push str.OK__n
mov ecx, esi
call fcn.00401a40
mov eax, dword [esi + 0x20]
xor ebp, ebp
mov edx, dword [eax]
add eax, 4
mov dword [esi + 0x20], eax
mov eax, edx
test eax, eax
mov dword [esi + 0x2c], edx
jbe 0x401934
mov edi, dword [esi + 0x20]
push 1
push 0
lea eax, [edi + 5]
mov dword [esi + 0x20], eax
mov ecx, dword [edi]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi + 0x20]
xor eax, eax
mov al, byte [edi + 4]
lea edx, [esp + 0x14]
push 0
push edx
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 0x2c]
xor edx, edx
mov dl, byte [edi + 4]
mov edi, dword [esi + 0x20]
add edi, edx
inc ebp
cmp ebp, eax
mov dword [esi + 0x20], edi
jb 0x4018f0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esi + 0x1c]
push esi
call fcn.00401fd0
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x401950
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
xor ebx, ebx
push 1
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebp
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.00401b70
add esp, 4
mov edi, eax
lea eax, [esp + 0x10]
push ebx
push eax
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 1
cmp esi, eax
jb 0x4019a7
xor ecx, ecx
mov cl, byte [eax + edi - 1]
imul ecx, eax
add ebx, ecx
inc eax
cmp eax, esi
jbe 0x401997
push edi
call fcn.00401fd0
mov edx, dword [esp + 0x1c]
add esp, 4
push 0
push 0
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret 4

Function at 0x401fe0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x403b78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x40874c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x408748], ecx
shl ecx, 8
add ecx, edx
mov dword [0x408744], ecx
shr eax, 0x10
mov dword [0x408740], eax
call fcn.00403b30
test eax, eax
jne 0x40204a
push 0x1c
call fcn.00402180
add esp, 4
mov dword [ebp - 4], 0
call fcn.00403930
call fcn.00403920
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x408b30], eax
call fcn.004034f0
mov dword [0x408718], eax
test eax, eax
je 0x40207d
mov eax, dword [0x408b30]
test eax, eax
jne 0x402087
push 0xffffffffffffffff
call fcn.00402e50
add esp, 4
call fcn.00403240
call fcn.00403150
call fcn.00402e20
mov esi, dword [0x408b30]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x402166
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4020ce
test al, al
je 0x4020ce
and eax, 0xff
push eax
call fcn.004030f0
add esp, 4
test eax, eax
je 0x4020a8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4020a8
cmp byte [esi], 0x22
jne 0x4020d7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4020e7
cmp al, 0x20
ja 0x4020e7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4020d7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x402108
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40210d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00402e50
jmp 0x40214b
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x4020d7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402166
Function at 0x402e90
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40877c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x402eaf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x408778], 1
mov byte [0x408774], bl
jne 0x402f09
mov ecx, dword [0x408b28]
test ecx, ecx
je 0x402ef7
mov esi, dword [0x408b24]
sub esi, 4
cmp esi, ecx
jb 0x402ef7
mov eax, dword [esi]
test eax, eax
je 0x402ef0
call eax
mov ecx, dword [0x408b28]
sub esi, 4
cmp esi, ecx
jae 0x402ee2
push 0x406018
push 0x406014
call fcn.00402f40
add esp, 8
push 0x406024
push 0x40601c
call fcn.00402f40
add esp, 8
test ebx, ebx
jne 0x402f30
push ebp
mov dword [0x40877c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x4034f0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x408890]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x403532
call edi
mov esi, eax
test esi, esi
je 0x40351c
mov eax, 1
jmp 0x40352d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40363f
mov eax, 2
mov dword [0x408890], eax
cmp eax, 1
jne 0x4035d2
test esi, esi
jne 0x40354b
call edi
mov esi, eax
test esi, esi
je 0x40363f
cmp word [esi], 0
mov eax, esi
je 0x403565
add eax, 2
cmp word [eax], 0
jne 0x403553
add eax, 2
cmp word [eax], 0
jne 0x403553
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x4035c4
push edi
call fcn.004021b0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4035c4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4035b6
push ebx
call fcn.00402dd0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40363f
test ebx, ebx
jne 0x4035e3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40363f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4035fb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4035eb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4035eb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004021b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40361d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x403c90
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x406448
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x403cb4
add eax, 8
inc ebp
cmp eax, 0x4064d8
jb 0x403ca5
cmp ecx, dword [ebp*8 + 0x406448]
jne 0x403e5b
mov eax, dword [0x408720]
cmp eax, 1
je 0x403e1d
test eax, eax
jne 0x403ce0
cmp dword [0x4062a0], 1
je 0x403e1d
cmp ecx, 0xfc
je 0x403e5b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403d1b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x403d64
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40623c
add ebx, ecx
push ebx
call fcn.00404a90
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40533c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40644c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00404a00
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x408a20]
test eax, eax
je 0x403e2e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x403e38
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40644c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret