Function at 0x4063ca
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
test ebx, ebx
je 0x407545
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x407545
push ebx
call fcn.004064f4
cmp eax, 1
je 0x4074e5
push edi
call fcn.00401843
push 0x100
mov esi, eax
push 0
push 0x411360
mov dword [ebp - 8], esi
call sub.msvcrt.dll_memset
xor ecx, ecx
add esp, 0xc
mov eax, ecx
mov dword [ebp + 8], eax
test esi, esi
je 0x4064df
sub esi, eax
mov dword [ebp - 4], ecx
cmp esi, 0xff
ja 0x409deb
lea eax, [edi + eax*2]
mov dword [ebp + 0xc], eax
push ecx
push ecx
push ecx
push ecx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 4], eax
test eax, eax
je 0x40753a
cmp eax, 0xff
ja 0x409df5
cmp eax, esi
jb 0x409e17
push 0x100
push 0
push 0x411360
call sub.msvcrt.dll_memset
add esp, 0xc
xor eax, eax
push eax
push eax
push 0xff
push 0x411360
push esi
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 4], eax
test eax, eax
je 0x40753a
add dword [ebp + 8], esi
push 0x411360
push 0x4064ec
push ebx
call dword [sym.imp.msvcrt.dll_fprintf]
push ebx
call dword [sym.imp.msvcrt.dll_fflush]
mov eax, dword [ebp + 8]
mov esi, dword [ebp - 8]
add esp, 0x10
cmp esi, eax
ja 0x409e1e
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 8
mov esi, dword [sym.imp.msvcrt.dll___iob_func]
call esi
add eax, 0x20
cmp ebx, eax
jne 0x409d3a
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, eax
mov dword [ebp + 8], ebx
and dword [ebp - 4], 0
push edi
call fcn.00401843
push 0
lea ecx, [ebp - 4]
push ecx
push eax
push edi
push ebx
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x409d59
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 4]
je 0x4064df
jmp 0x409d59
call dword [sym.imp.msvcrt.dll___iob_func]
jmp 0x409e43
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409e4b
call esi
add eax, 0x40
cmp ebx, eax
jne 0x409dda
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, eax
mov dword [ebp + 8], eax
jmp 0x407505
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x409dd6
push edi
call fcn.00401843
xor ebx, ebx
mov dword [ebp + 0xc], eax
test eax, eax
je 0x4064df
mov ecx, 0x400
mov esi, eax
sub esi, ebx
cmp esi, ecx
jbe 0x409d86
mov esi, ecx
push 0
lea eax, [ebp - 4]
push eax
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x409dba
cmp esi, dword [ebp - 4]
jne 0x409dba
mov eax, dword [ebp + 0xc]
mov ecx, 0x400
add ebx, ecx
add edi, 0x800
cmp ebx, eax
jae 0x4064df
jmp 0x409d7c
call dword [sym.imp.msvcrt.dll___iob_func]
add eax, 0x40
push eax
call fcn.0040c8e6
call fcn.004060b0
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call esi
jmp 0x409dc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x409e57
push 0x42b
jmp 0x409e51
mov esi, 0xff
jmp 0x40643c
add eax, 0xffffff01
cmp eax, 3
jbe 0x409e05
shr eax, 1
sub esi, eax
jmp 0x409e06
dec esi
xor ecx, ecx
mov dword [ebp - 4], ecx
test esi, esi
je 0x409e25
mov eax, dword [ebp + 0xc]
jmp 0x406442
mov esi, eax
jmp 0x406474
xor ecx, ecx
jmp 0x40642b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40753a
push 0x42b
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40753a
add eax, 0x20
jmp 0x409dc3
test eax, eax
jne 0x409e57
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4064e2