Function at 0x1001ca8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp + 0x18]
push esi
mov dword [ebp - 0x234], eax
mov eax, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x230], eax
xor eax, eax
push 0x1f8
push eax
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x208]
push eax
call sub.msvcrt.dll_memset
xor eax, eax
mov word [ebp - 0x10], ax
lea edi, [ebp - 0xe]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
xor eax, eax
push 9
mov word [ebp - 0x264], ax
pop ecx
lea edi, [ebp - 0x260]
rep stosd dword es:[edi], eax
mov byte [ebp - 0x20d], 0
mov ecx, 0x1fc
lea eax, [ebp - 0x20c]
mov byte [eax], 0
inc eax
dec ecx
jne 0x1001d4a
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff6
call esi
mov edi, eax
mov dword [ebp - 0x214], edi
cmp edi, 0xffffffff
je 0x1002008
cmp edi, 0xf
je 0x1001d80
cmp edi, 3
je 0x1001d80
mov dword [ebp - 0x220], 1
push 0xfffffffffffffff5
call esi
cmp eax, 0xffffffff
je 0x1002008
lea eax, [ebp - 0x224]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
cmp eax, 1
jne 0x1001dcb
and dword [ebp - 0x224], 0xfffffff9
push dword [ebp - 0x224]
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x1002008
push edi
call dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
test eax, eax
je 0x1002008
mov esi, dword [sym.imp.msvcrt.dll___iob_func]
push ebx
call esi
add eax, 0x20
push eax
call fcn.01003a44
push 1
push 0x10014ff
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
je 0x1002008
xor eax, eax
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x1001e16
imul eax, eax, 0x3e8
jmp 0x1001e19
or eax, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push eax
push dword [ebp - 0x214]
call ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x21c], eax
test edi, edi
je 0x1001e4d
cmp edi, 0x102
jne 0x1001dfb
mov edi, dword [ebp - 0x234]
jmp 0x1002279
xor eax, eax
xor edi, edi
mov word [ebp - 0x20a], ax
cmp dword [ebp - 0x220], edi
jne 0x10020a4
mov ebx, dword [ebp - 0x214]
lea eax, [ebp - 0x23c]
push eax
push 2
lea eax, [ebp - 0x264]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputW]
test eax, eax
je 0x1002205
mov ax, word [ebp - 0x25a]
cmp ax, 0x25
jb 0x1001ea0
cmp ax, 0x28
jbe 0x1002051
cmp ax, 0x24
je 0x1002051
cmp ax, 0x23
je 0x1002051
cmp ax, 0x2d
je 0x1002051
cmp ax, 0x2e
je 0x1002051
cmp ax, 0x21
je 0x1002051
cmp ax, 0x22
je 0x1002051
cmp ax, 9
je 0x1002051
cmp ax, 0x20
je 0x1002051
cmp ax, 0x70
jb 0x1001f00
cmp ax, 0x7f
jbe 0x1002023
cmp ax, 0x1b
je 0x1002023
cmp ax, 1
jb 0x1001f1a
cmp ax, 6
jbe 0x1002023
cmp ax, 0x13
je 0x1002023
cmp ax, 0x14
je 0x1002023
mov ecx, 0x90
cmp ax, cx
je 0x1002023
inc ecx
cmp ax, cx
je 0x1002023
cmp ax, 0x29
jb 0x1001f56
cmp ax, 0x2c
jbe 0x1002023
cmp ax, 0x2f
je 0x1002023
cmp ax, 0x5b
je 0x1002023
cmp ax, 0x5c
je 0x1002023
cmp ax, 0x5d
je 0x1002023
mov cx, word [ebp - 0x264]
push 0x10
pop edx
cmp dx, cx
je 0x1002023
push 0x12
pop edx
cmp dx, ax
je 0x1002023
push 0x11
pop edx
cmp dx, ax
je 0x1002023
push 0x10
pop edx
cmp dx, ax
je 0x1002023
push 4
pop eax
cmp ax, cx
je 0x1002023
push 2
pop eax
cmp ax, cx
je 0x1002023
push 8
pop eax
cmp ax, cx
je 0x1002023
cmp dword [ebp - 0x260], edi
je 0x1002023
mov ebx, 0xfe
push ebx
push 0x100120c
lea eax, [ebp - 0x20c]
push eax
call fcn.010039be
push edi
lea eax, [ebp - 0x22c]
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
jne 0x1002102
call fcn.01002f23
mov eax, 0xff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01002899
leave
ret 0x18
cmp dword [ebp + 0xc], edi
je 0x1002040
mov eax, dword [ebp - 0x21c]
sub eax, dword [ebp - 0x218]
xor edx, edx
mov ecx, 0x3e8
div ecx
sub dword [ebp + 0xc], eax
push ebx
call dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
test eax, eax
jne 0x1001dfb
jmp 0x1002008
cmp dword [ebp + 0xc], edi
je 0x100206e
mov eax, dword [ebp - 0x21c]
sub eax, dword [ebp - 0x218]
xor edx, edx
mov ecx, 0x3e8
div ecx
sub dword [ebp + 0xc], eax
push 0x1f4
push 0x5dc
call dword [sym.imp.KERNEL32.dll_Beep]
test eax, eax
jne 0x1002040
call esi
add eax, 0x20
push eax
call fcn.0100306b
cmp eax, 1
jne 0x1002040
push 0x1001208
call esi
add eax, 0x20
push eax
call fcn.01003a44
jmp 0x1002040
push edi
lea eax, [ebp - 0x22c]
push eax
xor edi, edi
inc edi
push edi
lea eax, [ebp - 0x20d]
push eax
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002214
mov al, byte [ebp - 0x20d]
mov byte [ebp - 0x10], al
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x238], 0xfe
call fcn.01003211
cmp dword [ebp - 0x22c], 0
je 0x1002255
mov di, word [ebp - 0x20c]
cmp di, 0x2f
jbe 0x100218d
cmp di, 0x7a
jbe 0x100211b
cmp di, 0x7f
jb 0x100218d
cmp di, 0x39
jbe 0x1002127
cmp di, 0x41
jb 0x100218d
cmp di, 0x5a
jbe 0x1002133
cmp di, 0x61
jb 0x100218d
mov ebx, 0xff
mov eax, ebx
cmp di, ax
je 0x100218d
cmp dword [ebp + 0x10], 0
jne 0x1002169
cmp di, 0x7f
ja 0x1002169
push 1
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.USER32.dll_CharUpperBuffW]
test eax, eax
je 0x10022ba
mov di, word [ebp - 0x20c]
push dword [ebp - 0x20c]
push dword [ebp - 0x228]
call fcn.0100149c
mov ebx, eax
xor eax, eax
mov word [ebp - 0x20a], ax
test ebx, ebx
jne 0x10022e6
push 0x1f4
push 0x5dc
call dword [sym.imp.KERNEL32.dll_Beep]
test eax, eax
jne 0x10021c1
call esi
add eax, 0x20
push eax
call fcn.0100306b
cmp eax, 1
jne 0x10021c1
push 0x1001208
call esi
add eax, 0x20
push eax
call fcn.01003a44
cmp dword [ebp - 0x220], 0
jne 0x10021de
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
test eax, eax
je 0x1002008
cmp dword [ebp + 0xc], 0
je 0x1001dfb
mov eax, dword [ebp - 0x21c]
sub eax, dword [ebp - 0x218]
xor edx, edx
mov ecx, 0x3e8
div ecx
sub dword [ebp + 0xc], eax
jmp 0x1001dfb
call fcn.01002f23
call fcn.010038d8
jmp 0x100200d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x1002008
mov eax, dword [ebp - 0x230]
mov dword [eax], edi
push 0xfe
push 0x10
call fcn.010048ee
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.010039be
lea eax, [ebp - 0x20c]
push eax
call fcn.01002ebc
jmp 0x100200d
mov edi, dword [ebp - 0x234]
push 0
push edi
call fcn.0100313a
test eax, eax
je 0x10022a9
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x3e8
push eax
push dword [ebp - 0x214]
call ebx
push edi
call esi
add eax, 0x20
push eax
call fcn.01003a44
push 0x1001204
call esi
add eax, 0x20
push eax
call fcn.01003a44
movzx eax, word [edi]
push eax
push dword [ebp - 0x228]
call fcn.0100149c
jmp 0x1002012
mov eax, dword [ebp - 0x230]
mov dword [eax], 1
jmp 0x100222b
push 0xfe
push 0x12
call fcn.010048ee
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.010039be
lea eax, [ebp - 0x20c]
push eax
call fcn.01002ebc
mov eax, ebx
jmp 0x1002012
movzx eax, di
push eax
push 0x10011fc
lea eax, [ebp - 0x20c]
push 0xfe
push eax
call fcn.01001523
lea eax, [ebp - 0x20c]
add esp, 0x10
push eax
call esi
add eax, 0x20
push eax
call fcn.01003a44
jmp 0x10022df