Function at 0x1018ec9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x1029c7c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
xor eax, eax
push esi
push edi
mov word [ebp - 0x24], ax
xor esi, esi
lea edi, [ebp - 0x22]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x18], esi
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x3c], esi
stosd dword es:[edi], eax
mov dword [ebp - 0x40], esi
cmp ecx, esi
jne 0x1018f28
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_GetLastError]
test eax, eax
jne 0x1018f21
push 0x57
call dword [sym.imp.API_MS_Win_Core_ErrorHandling_L1_1_0.dll_SetLastError]
xor eax, eax
jmp 0x1019123
push ebx
mov ebx, dword [sym.imp.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_GetStdHandle]
push 0xfffffffffffffff6
call ebx
mov edi, eax
mov dword [ebp - 0x38], edi
cmp edi, esi
je 0x10190e0
cmp edi, 0xf
je 0x1018f58
cmp edi, 3
je 0x1018f58
cmp edi, 0xffffffff
je 0x1018f58
mov dword [ebp - 0x40], 1
jmp 0x1018f74
lea eax, [ebp - 0x3c]
push eax
push edi
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_GetConsoleMode]
push 1
push edi
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
test eax, eax
je 0x10190e0
xor eax, eax
mov esi, dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, 0x10014f0
cmp dword [ebp - 0x40], 1
push 0
lea eax, [ebp - 0x34]
push eax
push 1
jne 0x1018fe6
lea eax, [ebp - 0x29]
push eax
push dword [ebp - 0x38]
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_ReadFile]
test eax, eax
je 0x10190e0
cmp dword [ebp - 0x34], 0
je 0x10190e4
mov al, byte [ebp - 0x29]
mov byte [ebp - 0x24], al
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x34], 0xa
call fcn.01018316
movzx eax, word [ebp - 0x18]
mov dword [ebp - 0x48], eax
jmp 0x1018ffe
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x38]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_ReadConsoleW]
test eax, eax
je 0x10190d4
mov eax, dword [ebp - 0x48]
cmp ax, 0xd
je 0x10190e4
cmp ax, 8
jne 0x101908c
cmp dword [ebp - 0x28], 0
je 0x1018f92
push 8
push edi
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.01018a63
add esp, 0x10
push 0
lea eax, [ebp - 0x30]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call esi
push 0
push edi
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.01018a63
add esp, 0x10
push 0
lea eax, [ebp - 0x30]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call esi
push 8
push edi
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.01018a63
add esp, 0x10
push 0
lea eax, [ebp - 0x30]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call esi
dec dword [ebp - 0x28]
jmp 0x1018f92
mov ecx, dword [ebp + 0xc]
dec ecx
cmp dword [ebp - 0x28], ecx
jne 0x10190a4
push 0
lea eax, [ebp - 0x30]
push eax
push 1
push 0x10014ec
jmp 0x10190c8
cmp ax, 0xa
je 0x1018f92
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x44]
inc dword [ebp - 0x28]
push 0
mov word [ecx + edx*2], ax
lea eax, [ebp - 0x30]
push eax
push 1
push 0x10014e4
push 0xfffffffffffffff5
call ebx
push eax
call esi
jmp 0x1018f92
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
xor eax, eax
jmp 0x1019122
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x28]
push dword [ebp - 0x38]
xor eax, eax
mov word [ecx + edx*2], ax
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
push 0xa
push 0x1001ed4
lea eax, [ebp - 0x18]
push eax
call fcn.01018bde
push 0
lea eax, [ebp - 0x30]
push eax
push 2
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call esi
xor eax, eax
inc eax
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.010175b3
leave
ret 8