Function at 0x100c9a4
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 0x100ca18
mov edx, esi
lea eax, [ebp - 0x604]
mov byte [eax], cl
inc eax
dec edx
jne 0x100ca26
mov edx, esi
lea eax, [ebp - 0x408]
mov byte [eax], cl
inc eax
dec edx
jne 0x100ca34
mov edx, 0x1fc
lea eax, [ebp - 0x9fc]
mov byte [eax], cl
inc eax
dec edx
jne 0x100ca45
cmp ebx, ecx
jne 0x100ca57
xor eax, eax
inc eax
jmp 0x100ce86
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 0x100cda9
push 0x30
call dword [sym.imp.USER32.dll_MessageBeep]
cmp edi, 0xf
je 0x100ca90
cmp edi, 3
je 0x100ca90
mov dword [ebp - 0xa24], 1
jmp 0x100cab7
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 0x100cda9
push 1
push edi
call dword [sym.imp.API_MS_Win_Core_Console_L1_1_0.dll_SetConsoleMode]
test eax, eax
je 0x100cda9
push 0
push 1
push 0x10014f4
push dword [ebp - 0xa20]
call fcn.010182d1
test eax, eax
jne 0x100cadb
push 0xfd
call fcn.01019fbd
jmp 0x100cb02
push dword [ebp - 0xa20]
push esi
call fcn.01019fbd
push eax
lea eax, [ebp - 0x9fc]
push 0x1fc
push eax
call fcn.01003f97
add esp, 0x10
lea eax, [ebp - 0x9fc]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01018c65
cmp dword [ebp - 0xa24], 1
mov edi, 0x1001500
jne 0x100cc09
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 0x100cda9
cmp dword [ebp - 0xa08], 0
je 0x100cdc6
cmp word [ebp - 0xa04], 0xd
je 0x100cdc6
cmp word [ebp - 0xa04], 0xa
je 0x100cdc6
cmp word [ebp - 0xa04], 9
je 0x100cdc6
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.010183f6
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 0x100cda9
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.01003f97
add esp, 0x10
inc dword [ebp - 0xa0c]
jmp 0x100cb23
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 0x100cd8e
cmp dword [ebp - 0xa08], 0
je 0x100cc09
mov eax, dword [ebp - 0xa04]
cmp ax, 0xd
je 0x100cdc6
movzx ecx, ax
mov dword [ebp - 0xa14], ecx
cmp ax, 8
je 0x100cc8e
movzx eax, ax
push eax
push edi
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 - 0xa14], 8
jne 0x100cd62
cmp dword [ebp - 0xa0c], 0
je 0x100cc09
push 8
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003f97
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 0x100cda9
push 0
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003f97
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 0x100cda9
push 8
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01003f97
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 0x100cda9
push 0
lea eax, [ebp - 0x408]
push eax
call fcn.010182b0
xor ecx, ecx
dec dword [ebp - 0xa0c]
mov word [ebp + eax*2 - 0x40a], cx
jmp 0x100cc09
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 0x100cda9
inc dword [ebp - 0xa0c]
jmp 0x100cc09
call fcn.01018081
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 0x100cdae
call fcn.01018081
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x10001
add eax, 0x40
push eax
call fcn.01019fd5
jmp 0x100ca4f
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 - 0xa0c], esi
jne 0x100ce51
push 0
push esi
push 0xbb
call fcn.01019fbd
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010182d1
test eax, eax
jne 0x100ce18
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 0x100ce84
push 0
push esi
push 0xbc
call fcn.01019fbd
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.010182d1
test eax, eax
jne 0x100ce51
push 0x226
call fcn.01019fbd
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call fcn.01018c65
jmp 0x100ce04
push 0x92
call fcn.01019fbd
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01018c65
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.01017692
leave
ret 8