Function at 0x40e030
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [0x41ab6c]
sub esp, 8
mov eax, dword [0x41ab74]
mov ecx, dword [0x41ab68]
inc eax
push esi
mov esi, dword [0x41ab78]
push edi
mov edi, dword [edx + 4]
add eax, edi
cmp esi, eax
ja 0x40e241
cmp dword [edx + 0x20], 0
jne 0x40e075
sub esi, ecx
dec esi
neg esi
pop edi
sbb esi, esi
neg esi
lea eax, [esi + 1]
pop esi
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, esi
sub ebx, ecx
dec ebx
mov dword [ebp - 8], ebx
test ebx, ebx
jle 0x40e094
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edi], al
lea edi, [edi + 1]
sub ebx, 1
jne 0x40e082
mov ebx, dword [ebp - 8]
cmp dword [edx + 0x24], 2
jne 0x40e0aa
xor esi, esi
mov dword [0x41ab74], esi
mov dword [edx + 0x10], esi
jmp 0x40e1e9
mov edi, dword [edx + 0xc]
sub edi, ebx
dec edi
test edi, edi
jg 0x40e113
mov eax, dword [edx + 4]
lea edi, [edx + 4]
sub esi, eax
mov dword [ebp - 8], eax
cmp dword [edx + 0x14], 0
je 0x40e0f5
mov ecx, dword [edx + 0xc]
lea eax, [ecx + ecx]
test eax, eax
jg 0x40e0d8
mov eax, ecx
shr eax, 3
add eax, ecx
jmp 0x40e0db
lea eax, [ecx + ecx]
mov dword [edx + 0xc], eax
add eax, 2
push eax
push dword [ebp - 8]
call fcn.0040e020
mov edx, dword [0x41ab6c]
add esp, 8
jmp 0x40e0f7
xor eax, eax
mov dword [edi], eax
test eax, eax
je 0x40e24b
mov edi, dword [edx + 0xc]
add esi, eax
sub edi, ebx
mov dword [0x41ab78], esi
dec edi
test edi, edi
jle 0x40e0b4
mov eax, 0x2000
cmp edi, eax
cmovg edi, eax
cmp dword [edx + 0x18], 0
je 0x40e19f
xor esi, esi
test edi, edi
jle 0x40e197
nop dword [eax]
push dword [0x41ab60]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov edx, dword [0x41ab6c]
mov ecx, eax
add esp, 4
cmp ecx, 0xffffffff
je 0x40e15e
cmp ecx, 0xa
je 0x40e163
mov eax, dword [edx + 4]
add eax, esi
inc esi
mov byte [eax + ebx], cl
cmp esi, edi
jl 0x40e130
cmp ecx, 0xa
jne 0x40e175
mov eax, dword [edx + 4]
add eax, esi
inc esi
mov dword [0x41ab74], esi
mov byte [eax + ebx], 0xa
jmp 0x40e1e2
cmp ecx, 0xffffffff
jne 0x40e197
push dword [0x41ab60]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
jne 0x40e255
mov edx, dword [0x41ab6c]
mov dword [0x41ab74], esi
jmp 0x40e1e2
push dword [0x41ab60]
mov eax, dword [edx + 4]
push edi
add eax, ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov esi, eax
add esp, 0x10
mov dword [0x41ab74], esi
test esi, esi
jne 0x40e1dc
push dword [0x41ab60]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
jne 0x40e255
mov esi, dword [0x41ab74]
mov edx, dword [0x41ab6c]
mov dword [edx + 0x10], esi
test esi, esi
jne 0x40e216
test ebx, ebx
jne 0x40e20c
push dword [0x41ab60]
lea edi, [ebx + 1]
call fcn.004085a0
mov edx, dword [0x41ab6c]
add esp, 4
mov esi, dword [0x41ab74]
jmp 0x40e218
mov edi, 2
mov dword [edx + 0x24], edi
jmp 0x40e218
xor edi, edi
mov ecx, dword [edx + 4]
add esi, ebx
pop ebx
mov eax, edi
mov dword [0x41ab74], esi
pop edi
mov byte [esi + ecx], 0
mov ecx, dword [edx + 4]
mov byte [esi + ecx + 1], 0
mov ecx, dword [edx + 4]
mov dword [0x41ab68], ecx
pop esi
mov esp, ebp
pop ebp
ret
push str.fatal_flex_scanner_internal_error__end_of_buffer_missed
call fcn.0040dfd0
push str.fatal_error___scanner_input_buffer_overflow
call fcn.0040dfd0
push str.input_in_flex_scanner_failed
call fcn.0040dfd0
int3