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

Disassembly:
push ebp
lea ebp, [esp - 0x9a0]
sub esp, 0xa20
mov eax, dword [0x1016020]
xor ecx, ecx
push esi
mov dword [ebp + 0x99c], eax
push edi
xor eax, eax
mov word [ebp + 0x990], cx
lea edi, [ebp + 0x992]
stosd dword es:[edi], eax
mov esi, 0xfe
stosd dword es:[edi], eax
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x80], ecx
mov byte [ebp - 0x5d], cl
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x68], ecx
lea eax, [ebp + 0x794]
mov edx, esi
mov byte [eax], 0
inc eax
dec edx
jne 0x10072fc
lea eax, [ebp + 0x39c]
mov edx, esi
mov byte [eax], 0
inc eax
dec edx
jne 0x100730b
lea eax, [ebp + 0x598]
mov edx, esi
mov byte [eax], 0
inc eax
dec edx
jne 0x100731a
lea eax, [ebp - 0x5c]
mov edx, 0x1fc
mov byte [eax], 0
inc eax
dec edx
jne 0x1007329
cmp dword [ebp + 0x9a8], ecx
jne 0x100733f
xor eax, eax
jmp 0x10076d9
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff6
call ebx
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x70], edi
jne 0x1007361
call fcn.0100efe9
xor eax, eax
inc eax
jmp 0x10076d8
push 0x30
call dword [sym.imp.USER32.dll_MessageBeep]
cmp edi, 0xf
je 0x100737c
cmp edi, 3
je 0x100737c
mov dword [ebp - 0x80], 1
jmp 0x1007398
lea eax, [ebp - 0x74]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x1007354
push 1
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x1007354
push 0
push 1
push 0x100134c
push dword [ebp + 0x9a8]
call fcn.0100f1ed
test eax, eax
jne 0x10073bc
push 0xfd
call fcn.0101132b
jmp 0x10073dd
push dword [ebp + 0x9a8]
push esi
call fcn.0101132b
push eax
lea eax, [ebp - 0x5c]
push 0x1fc
push eax
call fcn.01001a92
add esp, 0x10
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01010fc1
cmp dword [ebp - 0x80], 1
mov edi, 0x1001334
jne 0x10074b1
push 0
lea eax, [ebp - 0x64]
push eax
push 1
lea eax, [ebp - 0x5d]
push eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1007354
cmp dword [ebp - 0x64], 0
je 0x1007627
cmp word [ebp - 0x6c], 0xd
je 0x1007627
cmp word [ebp - 0x6c], 0xa
je 0x1007627
cmp word [ebp - 0x6c], 9
je 0x1007627
mov al, byte [ebp - 0x5d]
mov byte [ebp + 0x990], al
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp + 0x794]
push eax
lea eax, [ebp + 0x990]
push eax
mov dword [ebp - 0x64], esi
call fcn.0100f2fd
mov eax, dword [ebp + 0x794]
push 0
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x64]
push eax
push 1
lea eax, [ebp - 0x6c]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1007354
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x78], eax
movzx eax, ax
push eax
push edi
lea eax, [ebp + 0x598]
push esi
push eax
call fcn.01001a92
add esp, 0x10
inc dword [ebp - 0x68]
jmp 0x10073fb
push 0
lea eax, [ebp - 0x64]
push eax
push 1
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x1007609
cmp dword [ebp - 0x64], 0
je 0x10074b1
mov eax, dword [ebp - 0x6c]
cmp ax, 0xd
je 0x1007627
cmp ax, 8
mov dword [ebp - 0x78], eax
je 0x100751e
movzx eax, ax
push eax
push edi
lea eax, [ebp + 0x39c]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push esi
lea eax, [ebp + 0x39c]
push eax
lea eax, [ebp + 0x598]
push eax
call fcn.01010072
cmp word [ebp - 0x78], 8
jne 0x10075e2
cmp dword [ebp - 0x68], 0
je 0x10074b1
push 8
push edi
lea eax, [ebp + 0x794]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push 0
lea eax, [ebp - 0x7c]
push eax
push 1
lea eax, [ebp + 0x794]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1007354
push 0
push edi
lea eax, [ebp + 0x794]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push 0
lea eax, [ebp - 0x7c]
push eax
push 1
lea eax, [ebp + 0x794]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1007354
push 8
push edi
lea eax, [ebp + 0x794]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push 0
lea eax, [ebp - 0x7c]
push eax
push 1
lea eax, [ebp + 0x794]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1007354
push 0
lea eax, [ebp + 0x598]
push eax
call fcn.0100f1d5
and word [ebp + eax*2 + 0x596], 0
dec dword [ebp - 0x68]
jmp 0x10074b1
push 0
lea eax, [ebp - 0x64]
push eax
push 1
lea eax, [ebp - 0x78]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1007354
inc dword [ebp - 0x68]
jmp 0x10074b1
call fcn.0100efe9
push dword [ebp - 0x74]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
jne 0x1007359
jmp 0x1007354
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x1001330
add eax, 0x20
push eax
call fcn.01010fc1
xor esi, esi
inc esi
cmp dword [ebp - 0x68], esi
jne 0x10076a9
push 0
push esi
push 0xbb
call fcn.0101132b
push eax
lea eax, [ebp + 0x598]
push eax
call fcn.0100f1ed
test eax, eax
jne 0x1007670
xor esi, esi
push dword [ebp - 0x74]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
jmp 0x10076d6
push 0
push esi
push 0xbc
call fcn.0101132b
push eax
lea eax, [ebp + 0x598]
push eax
call fcn.0100f1ed
test eax, eax
jne 0x10076a9
push 0x226
call fcn.0101132b
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01010fc1
jmp 0x1007662
push 0x92
call fcn.0101132b
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01010fc1
push dword [ebp - 0x74]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [ebp + 0x9ac]
mov dword [eax], esi
mov eax, esi
pop ebx
mov ecx, dword [ebp + 0x99c]
pop edi
pop esi
call fcn.0100eec6
add ebp, 0x9a0
leave
ret 8