Function at 0x1012e0e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x1019060]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], eax
push esi
xor esi, esi
push edi
xor eax, eax
cmp ecx, esi
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 - 0x34], ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x30], esi
stosd dword es:[edi], eax
mov dword [ebp - 0x38], esi
jne 0x1012e5b
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.01012975
xor eax, eax
jmp 0x1012f13
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push ebx
push 0xfffffffffffffff6
call edi
mov ebx, eax
cmp ebx, esi
mov dword [ebp - 0x28], ebx
jne 0x1012e76
xor eax, eax
jmp 0x1012f12
cmp ebx, 3
je 0x1012e89
cmp ebx, 0xffffffff
je 0x1012e89
mov dword [ebp - 0x38], 1
jmp 0x1012ea1
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x1012e6f
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
cmp dword [ebp - 0x38], 1
push 0
lea eax, [ebp - 0x2c]
push eax
push 1
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x28]
jne 0x1012f21
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1012e6f
cmp dword [ebp - 0x2c], 0
jne 0x1012f2f
push dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x1c]
push dword [ebp - 0x28]
and word [eax + ecx*2], 0
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push 0x1002ca4
lea eax, [ebp - 0x18]
push 0x1002c9c
push eax
call ebx
add esp, 0xc
push 0
lea eax, [ebp - 0x20]
push eax
push 2
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call edi
push eax
call esi
xor eax, eax
inc eax
pop ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.0101256f
leave
ret 8
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x1013002
mov ax, word [ebp - 0x24]
cmp ax, 0xd
je 0x1012ed2
cmp ax, 8
jne 0x1012fba
cmp dword [ebp - 0x1c], 0
je 0x1012ead
push 8
lea eax, [ebp - 0x18]
push 0x1002c94
push eax
call ebx
add esp, 0xc
push 0
lea eax, [ebp - 0x20]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call edi
push eax
call esi
push 0
lea eax, [ebp - 0x18]
push 0x1002c94
push eax
call ebx
add esp, 0xc
push 0
lea eax, [ebp - 0x20]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call edi
push eax
call esi
push 8
lea eax, [ebp - 0x18]
push 0x1002c94
push eax
call ebx
add esp, 0xc
push 0
lea eax, [ebp - 0x20]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push 0xfffffffffffffff5
call edi
push eax
call esi
dec dword [ebp - 0x1c]
jmp 0x1012ead
mov ecx, dword [ebp + 0xc]
dec ecx
cmp dword [ebp - 0x1c], ecx
jne 0x1012fdc
push 0
lea eax, [ebp - 0x20]
push eax
push 1
push 0x1002c90
push 0xfffffffffffffff5
call edi
push eax
call esi
jmp 0x1012ead
cmp ax, 0xa
je 0x1012ead
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x34]
inc dword [ebp - 0x1c]
push 0
mov word [ecx + edx*2], ax
lea eax, [ebp - 0x20]
push eax
push 1
push 0x1001394
jmp 0x1012fd0
push dword [ebp - 0x30]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
jmp 0x1012e6f