Function at 0x1007b43
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [0x1029c7c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
push esi
mov dword [ebp - 0x628], eax
push edi
xor eax, eax
mov word [ebp - 0x10], ax
lea edi, [ebp - 0xe]
stosd dword es:[edi], eax
mov esi, 0xfe
mov dword [ebp - 0x614], ecx
mov dword [ebp - 0x624], ecx
mov byte [ebp - 0x605], cl
stosd dword es:[edi], eax
mov dword [ebp - 0x60c], ecx
mov dword [ebp - 0x618], ecx
mov dword [ebp - 0x620], ecx
mov dword [ebp - 0x610], ecx
mov ecx, esi
lea eax, [ebp - 0x20c]
mov byte [eax], 0
inc eax
dec ecx
jne 0x1007ba8
mov ecx, esi
lea eax, [ebp - 0x604]
mov byte [eax], 0
inc eax
dec ecx
jne 0x1007bb7
mov ecx, esi
lea eax, [ebp - 0x408]
mov byte [eax], 0
inc eax
dec ecx
jne 0x1007bc6
mov edi, dword [sym.imp.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_GetStdHandle]
push 0xfffffffffffffff6
call edi
mov ebx, eax
mov dword [ebp - 0x61c], ebx
cmp ebx, 0xffffffff
jne 0x1007bf1
call fcn.01017fa1
xor eax, eax
inc eax
jmp 0x1007f63
push 0x30
call dword [sym.imp.USER32.dll_MessageBeep]
cmp ebx, 0xf
je 0x1007c07
cmp ebx, 3
jne 0x1007d88
lea eax, [ebp - 0x624]
push eax
push ebx
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_GetConsoleMode]
test eax, eax
je 0x1007be4
push 1
push ebx
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
test eax, eax
je 0x1007be4
mov ebx, 0x10014f0
push 0
lea eax, [ebp - 0x614]
push eax
push 1
lea eax, [ebp - 0x60c]
push eax
push dword [ebp - 0x61c]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_ReadConsoleW]
test eax, eax
je 0x1007ea3
cmp dword [ebp - 0x614], 0
je 0x1007c2b
mov eax, dword [ebp - 0x60c]
cmp ax, 0xd
je 0x1007ec7
movzx ecx, ax
mov dword [ebp - 0x618], ecx
cmp ax, 8
je 0x1007cb0
movzx eax, ax
push eax
push ebx
lea eax, [ebp - 0x604]
push esi
push eax
call fcn.01003e97
add esp, 0x10
push esi
lea eax, [ebp - 0x604]
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.01018c21
cmp word [ebp - 0x618], 8
jne 0x1007e73
cmp dword [ebp - 0x610], 0
je 0x1007c2b
push 8
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003e97
add esp, 0x10
push 0
lea eax, [ebp - 0x620]
push eax
push 1
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x1007be4
push 0
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003e97
add esp, 0x10
push 0
lea eax, [ebp - 0x620]
push eax
push 1
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x1007be4
push 8
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003e97
add esp, 0x10
push 0
lea eax, [ebp - 0x620]
push eax
push 1
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x1007be4
push 0
lea eax, [ebp - 0x408]
push eax
call fcn.010181d0
xor ecx, ecx
dec dword [ebp - 0x610]
mov word [ebp + eax*2 - 0x40a], cx
jmp 0x1007c2b
mov ebx, 0x10014f0
push 0
lea eax, [ebp - 0x614]
push eax
push 1
lea eax, [ebp - 0x605]
push eax
push dword [ebp - 0x61c]
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_ReadFile]
test eax, eax
je 0x1007be4
cmp dword [ebp - 0x614], 0
je 0x1007ec7
cmp word [ebp - 0x60c], 0xd
je 0x1007ec7
cmp word [ebp - 0x60c], 0xa
je 0x1007ec7
cmp word [ebp - 0x60c], 9
je 0x1007ec7
mov al, byte [ebp - 0x605]
mov byte [ebp - 0x10], al
lea eax, [ebp - 0x614]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x614], esi
call fcn.01018316
movzx eax, word [ebp - 0x20c]
push 0
mov dword [ebp - 0x60c], eax
lea eax, [ebp - 0x614]
push eax
push 1
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_WriteFile]
test eax, eax
je 0x1007be4
movzx eax, word [ebp - 0x60c]
mov dword [ebp - 0x618], eax
movzx eax, word [ebp - 0x60c]
push eax
push ebx
lea eax, [ebp - 0x408]
push esi
push eax
call fcn.01003e97
add esp, 0x10
inc dword [ebp - 0x610]
jmp 0x1007d8d
push 0
lea eax, [ebp - 0x614]
push eax
push 1
lea eax, [ebp - 0x618]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_WriteFile]
test eax, eax
je 0x1007be4
inc dword [ebp - 0x610]
jmp 0x1007c2b
call fcn.01017fa1
push dword [ebp - 0x624]
push dword [ebp - 0x61c]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
test eax, eax
jne 0x1007be9
jmp 0x1007be4
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x10014e8
add eax, 0x20
push eax
call fcn.01018c64
xor esi, esi
inc esi
cmp dword [ebp - 0x610], esi
jne 0x1007f48
push 0
push esi
push 0xbb
call fcn.01019fbc
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010181f1
test eax, eax
jne 0x1007f07
xor eax, eax
jmp 0x1007f63
push 0
push esi
push 0xbc
call fcn.01019fbc
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010181f1
test eax, eax
jne 0x1007f48
mov eax, dword [ebp - 0x628]
push 0x226
mov dword [eax], esi
call fcn.01019fbc
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01018c64
jmp 0x1007f03
push 0x227
call fcn.01019fbc
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01018c64
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010175b3
leave
ret 4