Function at 0x1018c64
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 8], edi
cmp dword [ebp + 8], edi
je 0x1018ea9
mov ebx, dword [ebp + 0xc]
cmp ebx, edi
je 0x1018ea9
push dword [ebp + 8]
call fcn.01018101
cmp eax, 1
jne 0x1018d96
mov esi, dword [sym.imp.msvcrt.dll___iob_func]
call esi
add eax, 0x20
cmp dword [ebp + 8], eax
jne 0x1018cad
push 0xfffffffffffffff5
jmp 0x1018cbd
call esi
add eax, 0x40
cmp dword [ebp + 8], eax
jne 0x1018d7e
push 0xfffffffffffffff4
call dword [sym.imp.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_GetStdHandle]
push edi
push ebx
mov dword [ebp + 8], eax
mov dword [ebp - 8], edi
call fcn.010181d0
push edi
lea ecx, [ebp - 8]
push ecx
push eax
push ebx
push dword [ebp + 8]
mov ebx, dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
mov dword [ebp - 0x10], eax
call ebx
test eax, eax
je 0x1018cf1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
je 0x1018d56
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_GetLastError]
cmp eax, 8
jne 0x1018d7a
mov esi, dword [ebp + 0xc]
push edi
push esi
call fcn.010181d0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edi
cmp eax, edi
jbe 0x1018d56
mov dword [ebp - 4], esi
mov esi, 0x400
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0xc]
mov dword [ebp + 0xc], esi
cmp eax, esi
ja 0x1018d28
mov dword [ebp + 0xc], eax
push edi
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
push dword [ebp - 4]
push dword [ebp + 8]
call ebx
test eax, eax
je 0x1018d5e
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 8]
jne 0x1018d5e
add dword [ebp - 0xc], esi
mov eax, dword [ebp - 0xc]
add dword [ebp - 4], 0x800
cmp eax, dword [ebp - 0x10]
jb 0x1018d18
xor eax, eax
inc eax
jmp 0x1018ebd
call dword [sym.imp.msvcrt.dll___iob_func]
add eax, 0x40
push eax
call fcn.01018028
call fcn.01018a9e
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call esi
jmp 0x1018d64
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_GetLastError]
test eax, eax
jne 0x1018ebb
push 0x42b
jmp 0x1018eb5
push edi
push ebx
call fcn.010181d0
push 0x100
push edi
mov esi, 0x102a1e0
push esi
mov dword [ebp - 0x10], eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0x10], edi
jbe 0x1018d56
mov ebx, 0xff
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 8], edi
mov dword [ebp - 4], ebx
cmp eax, ebx
ja 0x1018dd6
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x14], eax
push edi
push edi
push edi
push edi
push dword [ebp - 4]
push dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 8], eax
cmp eax, edi
je 0x1018e33
cmp eax, ebx
jbe 0x1018e41
add eax, 0xffffff01
cmp eax, 3
jbe 0x1018e13
shr eax, 1
sub dword [ebp - 4], eax
jmp 0x1018e16
dec dword [ebp - 4]
mov dword [ebp - 8], edi
cmp dword [ebp - 4], edi
jne 0x1018ddf
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_GetLastError]
test eax, eax
jne 0x1018e33
push 0x42b
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_SetLastError]
call dword [sym.imp.msvcrt.dll___iob_func]
add eax, 0x20
jmp 0x1018d67
cmp eax, dword [ebp - 4]
jae 0x1018e49
mov dword [ebp - 4], eax
push 0x100
push edi
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
push edi
push edi
push ebx
push esi
push dword [ebp - 4]
push dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 8], eax
cmp eax, edi
je 0x1018e33
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], eax
push esi
push 0x1001ed0
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_fprintf]
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_fflush]
mov eax, dword [ebp - 0xc]
add esp, 0x10
cmp dword [ebp - 0x10], eax
ja 0x1018dc1
jmp 0x1018d56
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_GetLastError]
test eax, eax
jne 0x1018ebb
push 0x57
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8