Function at 0x1007c43
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 0x1007ca8
mov ecx, esi
lea eax, [ebp - 0x604]
mov byte [eax], 0
inc eax
dec ecx
jne 0x1007cb7
mov ecx, esi
lea eax, [ebp - 0x408]
mov byte [eax], 0
inc eax
dec ecx
jne 0x1007cc6
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 0x1007cf1
call fcn.01018081
xor eax, eax
inc eax
jmp 0x1008063
push 0x30
call dword [sym.imp.USER32.dll_MessageBeep]
cmp ebx, 0xf
je 0x1007d07
cmp ebx, 3
jne 0x1007e88
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 0x1007ce4
push 1
push ebx
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
test eax, eax
je 0x1007ce4
mov ebx, 0x1001500
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 0x1007fa3
cmp dword [ebp - 0x614], 0
je 0x1007d2b
mov eax, dword [ebp - 0x60c]
cmp ax, 0xd
je 0x1007fc7
movzx ecx, ax
mov dword [ebp - 0x618], ecx
cmp ax, 8
je 0x1007db0
movzx eax, ax
push eax
push ebx
lea eax, [ebp - 0x604]
push esi
push eax
call fcn.01003f97
add esp, 0x10
push esi
lea eax, [ebp - 0x604]
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.01018c22
cmp word [ebp - 0x618], 8
jne 0x1007f73
cmp dword [ebp - 0x610], 0
je 0x1007d2b
push 8
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003f97
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 0x1007ce4
push 0
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003f97
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 0x1007ce4
push 8
push ebx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003f97
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 0x1007ce4
push 0
lea eax, [ebp - 0x408]
push eax
call fcn.010182b0
xor ecx, ecx
dec dword [ebp - 0x610]
mov word [ebp + eax*2 - 0x40a], cx
jmp 0x1007d2b
mov ebx, 0x1001500
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 0x1007ce4
cmp dword [ebp - 0x614], 0
je 0x1007fc7
cmp word [ebp - 0x60c], 0xd
je 0x1007fc7
cmp word [ebp - 0x60c], 0xa
je 0x1007fc7
cmp word [ebp - 0x60c], 9
je 0x1007fc7
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.010183f6
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 0x1007ce4
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.01003f97
add esp, 0x10
inc dword [ebp - 0x610]
jmp 0x1007e8d
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 0x1007ce4
inc dword [ebp - 0x610]
jmp 0x1007d2b
call fcn.01018081
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 0x1007ce9
jmp 0x1007ce4
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x10014f8
add eax, 0x20
push eax
call fcn.01018c65
xor esi, esi
inc esi
cmp dword [ebp - 0x610], esi
jne 0x1008048
push 0
push esi
push 0xbb
call fcn.01019fbd
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010182d1
test eax, eax
jne 0x1008007
xor eax, eax
jmp 0x1008063
push 0
push esi
push 0xbc
call fcn.01019fbd
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010182d1
test eax, eax
jne 0x1008048
mov eax, dword [ebp - 0x628]
push 0x226
mov dword [eax], esi
call fcn.01019fbd
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01018c65
jmp 0x1008003
push 0x227
call fcn.01019fbd
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01018c65
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01017692
leave
ret 4