Function at 0x405e10
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov ecx, dword [0x40a490]
mov eax, dword [0x40a488]
mov edx, dword [ecx + eax*4]
push ebx
lea ebx, [ecx + eax*4]
mov ecx, dword [0x40a828]
mov eax, dword [0x40a498]
push esi
mov esi, dword [edx + 4]
inc eax
push edi
mov edi, dword [0x40a49c]
add eax, esi
mov dword [ebp - 8], ebx
cmp edi, eax
ja 0x40614f
cmp dword [edx + 0x28], 0
jne 0x405e65
sub edi, ecx
dec edi
neg edi
sbb edi, edi
neg edi
lea eax, [edi + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, edi
sub edx, ecx
dec edx
mov dword [ebp - 4], edx
test edx, edx
jle 0x405e86
mov ebx, edx
mov al, byte [ecx]
lea esi, [esi + 1]
mov byte [esi - 1], al
lea ecx, [ecx + 1]
sub ebx, 1
jne 0x405e73
mov ebx, dword [ebp - 8]
mov esi, dword [ebx]
cmp dword [esi + 0x2c], 2
jne 0x405e9e
xor edi, edi
mov dword [0x40a498], edi
mov dword [esi + 0x10], edi
jmp 0x40609c
mov ebx, dword [esi + 0xc]
sub ebx, edx
dec ebx
test ebx, ebx
jg 0x405f1d
nop dword [eax + eax]
mov ebx, dword [esi + 4]
sub edi, ebx
cmp dword [esi + 0x14], 0
je 0x405eeb
mov ecx, dword [esi + 0xc]
lea eax, [ecx + ecx]
test eax, eax
jg 0x405ed2
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, ecx
mov dword [esi + 0xc], eax
add eax, 2
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov edx, dword [ebp - 4]
add esp, 8
mov dword [esi + 4], eax
jmp 0x405ef2
mov dword [esi + 4], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x406163
mov ecx, dword [0x40a490]
add edi, eax
mov eax, dword [0x40a488]
mov dword [0x40a49c], edi
mov esi, dword [ecx + eax*4]
mov ebx, dword [esi + 0xc]
sub ebx, edx
dec ebx
test ebx, ebx
jle 0x405eb0
mov ecx, dword [0x40a490]
mov eax, 0x2000
cmp ebx, eax
cmovg ebx, eax
mov eax, dword [0x40a488]
mov eax, dword [ecx + eax*4]
cmp dword [eax + 0x18], 0
je 0x405fca
xor edi, edi
test ebx, ebx
jle 0x405fbf
mov esi, dword [ebp - 4]
nop dword [eax + eax]
push dword [0x40a47c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov edx, eax
add esp, 4
cmp edx, 0xffffffff
je 0x405f86
cmp edx, 0xa
je 0x405f8b
mov ecx, dword [0x40a490]
mov eax, dword [0x40a488]
mov eax, dword [ecx + eax*4]
mov eax, dword [eax + 4]
add eax, edi
inc edi
mov byte [eax + esi], dl
cmp edi, ebx
jl 0x405f50
cmp edx, 0xa
jne 0x405fa2
mov ecx, dword [0x40a490]
mov eax, dword [0x40a488]
mov eax, dword [ecx + eax*4]
mov eax, dword [eax + 4]
add eax, edi
inc edi
mov byte [eax + esi], dl
cmp edx, 0xffffffff
jne 0x405fbf
push dword [0x40a47c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
je 0x405fbf
jmp 0x406159
mov dword [0x40a498], edi
jmp 0x406082
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [0x40a490]
mov esi, dword [ebp - 4]
mov dword [eax], 0
mov eax, dword [0x40a488]
push dword [0x40a47c]
push ebx
mov eax, dword [ecx + eax*4]
push 1
mov eax, dword [eax + 4]
add eax, esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, eax
add esp, 0x10
mov dword [0x40a498], edi
test edi, edi
jne 0x406082
nop dword [eax + eax]
push dword [0x40a47c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
je 0x40607c
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call edi
cmp dword [eax], 4
jne 0x406159
call edi
mov dword [eax], 0
push dword [0x40a47c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
mov ecx, dword [0x40a490]
mov eax, dword [0x40a488]
push dword [0x40a47c]
push ebx
mov eax, dword [ecx + eax*4]
push 1
mov eax, dword [eax + 4]
add eax, esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, eax
add esp, 0x14
mov dword [0x40a498], edi
test edi, edi
je 0x406010
jmp 0x406082
mov edi, dword [0x40a498]
mov eax, dword [0x40a488]
mov ecx, dword [0x40a490]
mov edx, dword [ebp - 4]
lea ebx, [ecx + eax*4]
mov eax, dword [ebx]
mov dword [eax + 0x10], edi
test edi, edi
jne 0x4060cc
test edx, edx
jne 0x4060bc
push dword [0x40a47c]
lea ebx, [edx + 1]
call fcn.00405d40
mov edi, dword [0x40a498]
add esp, 4
mov edx, dword [ebp - 4]
jmp 0x4060ce
mov eax, dword [ebx]
mov ebx, 2
mov dword [eax + 0x2c], 2
jmp 0x4060ce
xor ebx, ebx
mov ecx, dword [0x40a490]
mov eax, dword [0x40a488]
lea esi, [ecx + eax*4]
mov ecx, dword [esi]
lea eax, [edi + edx]
cmp eax, dword [ecx + 0xc]
jle 0x406120
mov eax, edi
sar eax, 1
add eax, edi
add eax, edx
push eax
push dword [ecx + 4]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ecx, dword [0x40a488]
add esp, 8
mov edx, dword [0x40a490]
lea esi, [edx + ecx*4]
mov ecx, dword [esi]
mov dword [ecx + 4], eax
mov eax, dword [esi]
cmp dword [eax + 4], 0
je 0x40616d
mov edi, dword [0x40a498]
mov edx, dword [ebp - 4]
mov ecx, dword [esi]
add edi, edx
mov dword [0x40a498], edi
mov eax, ebx
mov ecx, dword [ecx + 4]
mov byte [edi + ecx], 0
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
mov byte [ecx + edi + 1], 0
mov ecx, dword [esi]
pop edi
pop esi
pop ebx
mov ecx, dword [ecx + 4]
mov dword [0x40a828], ecx
mov esp, ebp
pop ebp
ret
push str.fatal_flex_scanner_internal_error__end_of_buffer_missed
call fcn.00405de0
push str.input_in_flex_scanner_failed
call fcn.00405de0
push str.fatal_error___scanner_input_buffer_overflow
call fcn.00405de0
push str.out_of_dynamic_memory_in_yy_get_next_buffer__
call fcn.00405de0
int3