Function at 0x1009696
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 4], ebx
je 0x10098c5
mov esi, dword [ebp + 0xc]
cmp esi, ebx
je 0x10098c5
push edi
call fcn.01007832
cmp eax, 1
jne 0x10097a9
mov eax, dword [sym.imp.msvcrt.dll__iob]
lea ecx, [eax + 0x20]
cmp edi, ecx
jne 0x10096d9
push 0xfffffffffffffff5
jmp 0x10096e6
add eax, 0x40
cmp edi, eax
jne 0x1009791
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push ebx
push esi
mov dword [ebp + 8], eax
mov dword [ebp - 4], ebx
call fcn.010078eb
mov edi, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
push esi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
call edi
test eax, eax
je 0x100971a
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 4]
je 0x100977c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x1009784
push ebx
push esi
call fcn.010078eb
cmp eax, ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ebx
jbe 0x100977c
mov dword [ebp - 0x10], esi
mov esi, 0x400
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 8]
mov dword [ebp + 0xc], esi
cmp eax, esi
ja 0x100974e
mov dword [ebp + 0xc], eax
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp + 8]
call edi
test eax, eax
je 0x1009784
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 4]
jne 0x1009784
add dword [ebp - 8], esi
mov eax, dword [ebp - 8]
add dword [ebp - 0x10], 0x800
cmp eax, dword [ebp - 0xc]
jb 0x100973e
xor eax, eax
inc eax
jmp 0x10098d9
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
jmp 0x1009853
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10098d7
push 0x42b
jmp 0x10098d1
push 1
push esi
call fcn.010093e5
push ebx
push eax
mov dword [ebp - 0x14], eax
call fcn.010078eb
mov dword [ebp - 0xc], eax
push 0x40
mov esi, 0x100f0a0
xor eax, eax
cmp dword [ebp - 0xc], ebx
pop ecx
mov edi, esi
rep stosd dword es:[edi], eax
mov dword [ebp - 8], ebx
jbe 0x100977c
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edi, 0xff
sub eax, ecx
cmp eax, edi
mov dword [ebp - 4], ebx
mov dword [ebp + 0xc], edi
ja 0x10097ee
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x14]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x10], eax
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x100984b
cmp eax, edi
jbe 0x1009866
add eax, 0xffffff01
cmp eax, 3
jbe 0x100982b
shr eax, 1
sub dword [ebp + 0xc], eax
jmp 0x100982e
dec dword [ebp + 0xc]
cmp dword [ebp + 0xc], ebx
mov dword [ebp - 4], ebx
jne 0x10097f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100984b
push 0x42b
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01007776
call fcn.0100851b
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp eax, dword [ebp + 0xc]
jae 0x100986e
mov dword [ebp + 0xc], eax
push 0x40
pop ecx
push ebx
push ebx
push 0xff
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
push edi
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x100984b
add dword [ebp - 8], edi
push esi
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, 0xc
cmp eax, dword [ebp - 8]
ja 0x10097d4
jmp 0x100977c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10098d7
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8