Function at 0x40faa0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x41cbe4]
mov ecx, dword [0x41cbd8]
inc eax
push ebx
mov ebx, dword [0x41cbe8]
push esi
mov esi, dword [0x41cbdc]
push edi
mov edx, dword [esi + 4]
add eax, edx
cmp ebx, eax
ja 0x40fcc0
cmp dword [esi + 0x20], 0
jne 0x40fae5
sub ebx, ecx
dec ebx
neg ebx
sbb ebx, ebx
neg ebx
lea eax, [ebx + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ebx
sub eax, ecx
dec eax
mov dword [ebp - 4], eax
test eax, eax
jle 0x40fb05
mov edi, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
sub edi, 1
jne 0x40faf3
mov eax, dword [ebp - 4]
cmp dword [esi + 0x24], 2
jne 0x40fb1b
xor ebx, ebx
mov dword [0x41cbe4], ebx
mov dword [esi + 0x10], ebx
jmp 0x40fc63
mov edi, dword [esi + 0xc]
sub edi, eax
dec edi
test edi, edi
jg 0x40fb7f
mov edi, dword [esi + 4]
sub ebx, edi
cmp dword [esi + 0x14], 0
je 0x40fcca
mov edx, dword [esi + 0xc]
lea eax, [edx + edx]
test eax, eax
jg 0x40fb45
mov eax, edx
shr eax, 3
add eax, edx
mov edx, eax
add eax, 2
push eax
push edi
mov dword [esi + 0xc], edx
call fcn.0040fa90
add esp, 8
mov dword [esi + 4], eax
test eax, eax
je 0x40fcd1
mov esi, dword [0x41cbdc]
add ebx, eax
mov ecx, dword [ebp - 4]
mov dword [0x41cbe8], ebx
mov edi, dword [esi + 0xc]
sub edi, ecx
dec edi
test edi, edi
jle 0x40fb25
jmp 0x40fb82
mov ecx, dword [ebp - 4]
mov eax, 0x2000
cmp edi, eax
cmovg edi, eax
cmp dword [esi + 0x18], 0
je 0x40fc15
xor ebx, ebx
test edi, edi
jle 0x40fc0d
nop dword [eax]
push dword [0x41cbd0]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov esi, dword [0x41cbdc]
mov ecx, eax
mov edx, dword [ebp - 4]
add esp, 4
cmp ecx, 0xffffffff
je 0x40fbd1
cmp ecx, 0xa
je 0x40fbd1
mov eax, dword [esi + 4]
add eax, ebx
inc ebx
mov byte [eax + edx], cl
cmp ebx, edi
jl 0x40fba0
mov eax, ebx
cmp ecx, 0xa
jne 0x40fbe9
mov eax, dword [esi + 4]
add eax, ebx
inc ebx
mov dword [0x41cbe4], ebx
mov byte [eax + edx], cl
jmp 0x40fc5c
mov ebx, eax
cmp ecx, 0xffffffff
jne 0x40fc0d
push dword [0x41cbd0]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
jne 0x40fcdb
mov esi, dword [0x41cbdc]
mov dword [0x41cbe4], ebx
jmp 0x40fc5c
push dword [0x41cbd0]
mov eax, dword [esi + 4]
push edi
add eax, ecx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ebx, eax
add esp, 0x10
mov dword [0x41cbe4], ebx
test ebx, ebx
jne 0x40fc56
push dword [0x41cbd0]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
jne 0x40fcdb
mov ebx, dword [0x41cbe4]
mov esi, dword [0x41cbdc]
mov dword [esi + 0x10], ebx
test ebx, ebx
jne 0x40fc93
mov edi, dword [ebp - 4]
test edi, edi
jne 0x40fc89
push dword [0x41cbd0]
call fcn.0040a030
mov esi, dword [0x41cbdc]
lea eax, [edi + 1]
mov ebx, dword [0x41cbe4]
add esp, 4
jmp 0x40fc98
mov eax, 2
mov dword [esi + 0x24], eax
jmp 0x40fc98
mov edi, dword [ebp - 4]
xor eax, eax
mov ecx, dword [esi + 4]
lea edx, [ebx + edi]
pop edi
mov dword [0x41cbe4], edx
mov byte [edx + ecx], 0
mov ecx, dword [esi + 4]
mov byte [ecx + edx + 1], 0
mov ecx, dword [esi + 4]
pop esi
mov dword [0x41cbd8], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push str.fatal_flex_scanner_internal_error__end_of_buffer_missed
call fcn.0040fa40
mov dword [esi + 4], 0
push str.fatal_error___scanner_input_buffer_overflow
call fcn.0040fa40
push str.input_in_flex_scanner_failed
call fcn.0040fa40
int3