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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa28
mov eax, dword [0x1029c7c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xor ecx, ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 0xa28], eax
push edi
xor eax, eax
mov word [ebp - 0x10], ax
lea edi, [ebp - 0xe]
stosd dword es:[edi], eax
mov esi, 0xfe
stosd dword es:[edi], eax
mov dword [ebp - 0xa20], ebx
mov dword [ebp - 0xa08], ecx
mov dword [ebp - 0xa18], ecx
mov dword [ebp - 0xa24], ecx
mov byte [ebp - 0x9fd], cl
mov dword [ebp - 0xa04], ecx
mov dword [ebp - 0xa14], ecx
mov dword [ebp - 0xa1c], ecx
mov dword [ebp - 0xa0c], ecx
mov edx, esi
lea eax, [ebp - 0x20c]
mov byte [eax], cl
inc eax
dec edx
jne 0x100c93c
mov edx, esi
lea eax, [ebp - 0x604]
mov byte [eax], cl
inc eax
dec edx
jne 0x100c94a
mov edx, esi
lea eax, [ebp - 0x408]
mov byte [eax], cl
inc eax
dec edx
jne 0x100c958
mov edx, 0x1fc
lea eax, [ebp - 0x9fc]
mov byte [eax], cl
inc eax
dec edx
jne 0x100c969
cmp ebx, ecx
jne 0x100c97b
xor eax, eax
inc eax
jmp 0x100cdaa
mov ebx, dword [sym.imp.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_GetStdHandle]
push 0xfffffffffffffff6
call ebx
mov edi, eax
mov dword [ebp - 0xa10], edi
cmp edi, 0xffffffff
je 0x100cccd
push 0x30
call dword [sym.imp.USER32.dll_MessageBeep]
cmp edi, 0xf
je 0x100c9b4
cmp edi, 3
je 0x100c9b4
mov dword [ebp - 0xa24], 1
jmp 0x100c9db
lea eax, [ebp - 0xa18]
push eax
push edi
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_GetConsoleMode]
test eax, eax
je 0x100cccd
push 1
push edi
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
test eax, eax
je 0x100cccd
push 0
push 1
push 0x10014e4
push dword [ebp - 0xa20]
call fcn.010181f1
test eax, eax
jne 0x100c9ff
push 0xfd
call fcn.01019fbc
jmp 0x100ca26
push dword [ebp - 0xa20]
push esi
call fcn.01019fbc
push eax
lea eax, [ebp - 0x9fc]
push 0x1fc
push eax
call fcn.01003e97
add esp, 0x10
lea eax, [ebp - 0x9fc]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01018c64
cmp dword [ebp - 0xa24], 1
mov edi, 0x10014f0
jne 0x100cb2d
push 0
lea eax, [ebp - 0xa08]
push eax
push 1
lea eax, [ebp - 0x9fd]
push eax
push dword [ebp - 0xa10]
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_ReadFile]
test eax, eax
je 0x100cccd
cmp dword [ebp - 0xa08], 0
je 0x100ccea
cmp word [ebp - 0xa04], 0xd
je 0x100ccea
cmp word [ebp - 0xa04], 0xa
je 0x100ccea
cmp word [ebp - 0xa04], 9
je 0x100ccea
mov al, byte [ebp - 0x9fd]
mov byte [ebp - 0x10], al
lea eax, [ebp - 0xa08]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0xa08], esi
call fcn.01018316
movzx eax, word [ebp - 0x20c]
push 0
mov dword [ebp - 0xa04], eax
lea eax, [ebp - 0xa08]
push eax
push 1
lea eax, [ebp - 0xa04]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_WriteFile]
test eax, eax
je 0x100cccd
movzx eax, word [ebp - 0xa04]
mov dword [ebp - 0xa14], eax
movzx eax, word [ebp - 0xa04]
push eax
push edi
lea eax, [ebp - 0x408]
push esi
push eax
call fcn.01003e97
add esp, 0x10
inc dword [ebp - 0xa0c]
jmp 0x100ca47
push 0
lea eax, [ebp - 0xa08]
push eax
push 1
lea eax, [ebp - 0xa04]
push eax
push dword [ebp - 0xa10]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_ReadConsoleW]
test eax, eax
je 0x100ccb2
cmp dword [ebp - 0xa08], 0
je 0x100cb2d
mov eax, dword [ebp - 0xa04]
cmp ax, 0xd
je 0x100ccea
movzx ecx, ax
mov dword [ebp - 0xa14], ecx
cmp ax, 8
je 0x100cbb2
movzx eax, ax
push eax
push edi
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 - 0xa14], 8
jne 0x100cc86
cmp dword [ebp - 0xa0c], 0
je 0x100cb2d
push 8
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003e97
add esp, 0x10
push 0
lea eax, [ebp - 0xa1c]
push eax
push 1
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x100cccd
push 0
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003e97
add esp, 0x10
push 0
lea eax, [ebp - 0xa1c]
push eax
push 1
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x100cccd
push 8
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003e97
add esp, 0x10
push 0
lea eax, [ebp - 0xa1c]
push eax
push 1
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x100cccd
push 0
lea eax, [ebp - 0x408]
push eax
call fcn.010181d0
xor ecx, ecx
dec dword [ebp - 0xa0c]
mov word [ebp + eax*2 - 0x40a], cx
jmp 0x100cb2d
push 0
lea eax, [ebp - 0xa08]
push eax
push 1
lea eax, [ebp - 0xa14]
push eax
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_WriteFile]
test eax, eax
je 0x100cccd
inc dword [ebp - 0xa0c]
jmp 0x100cb2d
call fcn.01017fa1
push dword [ebp - 0xa18]
push dword [ebp - 0xa10]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
test eax, eax
jne 0x100ccd2
call fcn.01017fa1
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x10001
add eax, 0x40
push eax
call fcn.01019fd4
jmp 0x100c973
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 - 0xa0c], esi
jne 0x100cd75
push 0
push esi
push 0xbb
call fcn.01019fbc
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010181f1
test eax, eax
jne 0x100cd3c
xor esi, esi
push dword [ebp - 0xa18]
push dword [ebp - 0xa10]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
jmp 0x100cda8
push 0
push esi
push 0xbc
call fcn.01019fbc
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010181f1
test eax, eax
jne 0x100cd75
push 0x226
call fcn.01019fbc
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01018c64
jmp 0x100cd28
push 0x92
call fcn.01019fbc
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01018c64
push dword [ebp - 0xa18]
push dword [ebp - 0xa10]
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
mov eax, dword [ebp - 0xa28]
mov dword [eax], esi
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010175b3
leave
ret 8