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

Disassembly:
push ebp
lea ebp, [esp - 0x5a4]
sub esp, 0x624
mov eax, dword [0x1016020]
xor ecx, ecx
push ebx
push esi
mov dword [ebp + 0x5a0], eax
push edi
mov word [ebp + 0x594], cx
xor eax, eax
lea edi, [ebp + 0x596]
stosd dword es:[edi], eax
mov esi, 0xfe
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x80], ecx
mov byte [ebp - 0x61], cl
stosd dword es:[edi], eax
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x68], ecx
lea eax, [ebp + 0x398]
mov ecx, esi
mov byte [eax], 0
inc eax
dec ecx
jne 0x10027eb
lea eax, [ebp - 0x60]
mov ecx, esi
mov byte [eax], 0
inc eax
dec ecx
jne 0x10027f7
lea eax, [ebp + 0x19c]
mov ecx, esi
mov byte [eax], 0
inc eax
dec ecx
jne 0x1002806
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff6
call edi
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x7c], ebx
jne 0x100282e
call fcn.0100efe9
xor eax, eax
inc eax
jmp 0x1002b29
push 0x30
call dword [sym.imp.USER32.dll_MessageBeep]
cmp ebx, 0xf
je 0x1002844
cmp ebx, 3
jne 0x1002990
lea eax, [ebp - 0x80]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x1002821
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x1002821
mov ebx, 0x1001334
push 0
lea eax, [ebp - 0x6c]
push eax
push 1
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x1002a72
cmp dword [ebp - 0x6c], 0
je 0x1002865
mov eax, dword [ebp - 0x70]
cmp ax, 0xd
je 0x1002a90
cmp ax, 8
mov dword [ebp - 0x74], eax
je 0x10028cc
movzx eax, ax
push eax
push ebx
lea eax, [ebp - 0x60]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push esi
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp + 0x19c]
push eax
call fcn.01010072
cmp word [ebp - 0x74], 8
jne 0x1002a4b
cmp dword [ebp - 0x68], 0
je 0x1002865
push 8
push ebx
lea eax, [ebp + 0x398]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push 0
lea eax, [ebp - 0x78]
push eax
push 1
lea eax, [ebp + 0x398]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1002821
push 0
push ebx
lea eax, [ebp + 0x398]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push 0
lea eax, [ebp - 0x78]
push eax
push 1
lea eax, [ebp + 0x398]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1002821
push 8
push ebx
lea eax, [ebp + 0x398]
push esi
push eax
call fcn.01001a92
add esp, 0x10
push 0
lea eax, [ebp - 0x78]
push eax
push 1
lea eax, [ebp + 0x398]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1002821
push 0
lea eax, [ebp + 0x19c]
push eax
call fcn.0100f1d5
and word [ebp + eax*2 + 0x19a], 0
dec dword [ebp - 0x68]
jmp 0x1002865
mov ebx, 0x1001334
push 0
lea eax, [ebp - 0x6c]
push eax
push 1
lea eax, [ebp - 0x61]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002821
cmp dword [ebp - 0x6c], 0
je 0x1002a90
cmp word [ebp - 0x70], 0xd
je 0x1002a90
cmp word [ebp - 0x70], 0xa
je 0x1002a90
cmp word [ebp - 0x70], 9
je 0x1002a90
mov al, byte [ebp - 0x61]
mov byte [ebp + 0x594], al
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0x398]
push eax
lea eax, [ebp + 0x594]
push eax
mov dword [ebp - 0x6c], esi
call fcn.0100f2fd
mov eax, dword [ebp + 0x398]
push 0
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x6c]
push eax
push 1
lea eax, [ebp - 0x70]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002821
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x74], eax
movzx eax, ax
push eax
push ebx
lea eax, [ebp + 0x19c]
push esi
push eax
call fcn.01001a92
add esp, 0x10
inc dword [ebp - 0x68]
jmp 0x1002995
push 0
lea eax, [ebp - 0x6c]
push eax
push 1
lea eax, [ebp - 0x74]
push eax
push 0xfffffffffffffff5
call edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002821
inc dword [ebp - 0x68]
jmp 0x1002865
call fcn.0100efe9
push dword [ebp - 0x80]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
jne 0x1002826
jmp 0x1002821
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 0x1002b0e
push 0
push esi
push 0xbb
call fcn.0101132b
push eax
lea eax, [ebp + 0x19c]
push eax
call fcn.0100f1ed
test eax, eax
jne 0x1002acd
xor eax, eax
jmp 0x1002b29
push 0
push esi
push 0xbc
call fcn.0101132b
push eax
lea eax, [ebp + 0x19c]
push eax
call fcn.0100f1ed
test eax, eax
jne 0x1002b0e
mov eax, dword [ebp + 0x5ac]
push 0x226
mov dword [eax], esi
call fcn.0101132b
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01010fc1
jmp 0x1002ac9
push 0x227
call fcn.0101132b
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01010fc1
mov eax, esi
mov ecx, dword [ebp + 0x5a0]
pop edi
pop esi
pop ebx
call fcn.0100eec6
add ebp, 0x5a4
leave
ret 4