Function at 0x40c1be
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x44
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [0x7bdcd4]
mov dword [ebp - 0x10], eax
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [0x7af0a4]
inc edx
add edx, eax
mov eax, dword [0x7af0a8]
cmp edx, eax
jae 0x40c218
mov dword [esp], str.fatal_flex_scanner_internal_error__end_of_buffer_missed
call fcn.0040d093
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x40c25a
mov eax, dword [0x7af0a8]
mov edx, eax
mov eax, dword [0x7bdcd4]
sub edx, eax
mov eax, edx
cmp eax, 1
jne 0x40c250
mov eax, 1
jmp 0x40c70d
mov eax, 2
jmp 0x40c70d
mov eax, dword [0x7af0a8]
mov edx, eax
mov eax, dword [0x7bdcd4]
sub edx, eax
mov eax, edx
dec eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], 0
jmp 0x40c290
mov edx, dword [ebp - 0x10]
lea eax, [edx + 1]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
lea ecx, [eax + 1]
mov dword [ebp - 0xc], ecx
mov dl, byte [edx]
mov byte [eax], dl
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x28]
jl 0x40c277
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
cmp eax, 2
jne 0x40c2dc
mov dword [0x7af0a4], 0
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov edx, dword [0x7af0a4]
mov dword [eax + 0x10], edx
jmp 0x40c597
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebp - 0x28]
dec eax
mov dword [ebp - 0x1c], eax
jmp 0x40c3e6
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x7af0a8]
mov edx, eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
sub edx, eax
mov eax, edx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x40c39a
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
add eax, eax
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jg 0x40c364
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
mov ecx, eax
sar ecx, 0x1f
and ecx, 7
add eax, ecx
sar eax, 3
add edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0xc], edx
jmp 0x40c373
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
add eax, 2
mov edx, eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040d234
mov edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 4], edx
jmp 0x40c3a4
mov eax, dword [ebp - 0x2c]
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
test eax, eax
jne 0x40c3ba
mov dword [esp], str.fatal_error___scanner_input_buffer_overflow
call fcn.0040d093
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x30]
add eax, edx
mov dword [0x7af0a8], eax
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebp - 0x28]
dec eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jle 0x40c2fd
cmp dword [ebp - 0x1c], 0x2000
jle 0x40c400
mov dword [ebp - 0x1c], 0x2000
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40c4da
mov dword [ebp - 0x20], 0x2a
mov dword [ebp - 0x24], 0
jmp 0x40c454
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
add edx, ecx
add eax, edx
mov edx, dword [ebp - 0x20]
mov byte [eax], dl
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jge 0x40c478
mov eax, dword [0x7af088]
mov dword [esp], eax
call sub.msvcrt.dll_getc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x40c478
cmp dword [ebp - 0x20], 0xa
jne 0x40c42d
cmp dword [ebp - 0x20], 0xa
jne 0x40c4aa
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [ebp - 0x24]
lea edx, [eax + 1]
mov dword [ebp - 0x24], edx
mov edx, eax
mov eax, dword [ebp - 0x28]
add eax, edx
add eax, ecx
mov edx, dword [ebp - 0x20]
mov byte [eax], dl
cmp dword [ebp - 0x20], 0xffffffff
jne 0x40c4cd
mov eax, dword [0x7af088]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x40c4cd
mov dword [esp], str.input_in_flex_scanner_failed
call fcn.0040d093
mov eax, dword [ebp - 0x24]
mov dword [0x7af0a4], eax
jmp 0x40c57c
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
jmp 0x40c51d
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
cmp eax, 4
je 0x40c503
mov dword [esp], str.input_in_flex_scanner_failed
call fcn.0040d093
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov eax, dword [0x7af088]
mov dword [esp], eax
call sub.msvcrt.dll_clearerr
mov edx, dword [0x7af088]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x7af09c]
mov ebx, dword [0x7af094]
shl ebx, 2
add ecx, ebx
mov ecx, dword [ecx]
mov ebx, dword [ecx + 4]
mov ecx, dword [ebp - 0x28]
add ecx, ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ecx
call sub.msvcrt.dll_fread
mov dword [0x7af0a4], eax
mov eax, dword [0x7af0a4]
test eax, eax
jne 0x40c57c
mov eax, dword [0x7af088]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x40c4e9
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov edx, dword [0x7af0a4]
mov dword [eax + 0x10], edx
mov eax, dword [0x7af0a4]
test eax, eax
jne 0x40c5de
cmp dword [ebp - 0x28], 0
jne 0x40c5bc
mov dword [ebp - 0x18], 1
mov eax, dword [0x7af088]
mov dword [esp], eax
call fcn.0040c8c4
jmp 0x40c5e5
mov dword [ebp - 0x18], 2
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [eax + 0x2c], 2
jmp 0x40c5e5
mov dword [ebp - 0x18], 0
mov edx, dword [0x7af0a4]
mov eax, dword [ebp - 0x28]
lea ecx, [edx + eax]
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
cmp ecx, eax
jle 0x40c69f
mov edx, dword [0x7af0a4]
mov eax, dword [ebp - 0x28]
add edx, eax
mov eax, dword [0x7af0a4]
sar eax, 1
add eax, edx
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
mov eax, dword [0x7af09c]
mov ecx, dword [0x7af094]
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [0x7af09c]
mov ebx, dword [0x7af094]
shl ebx, 2
add ecx, ebx
mov ebx, dword [ecx]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040d234
mov dword [ebx + 4], eax
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
jne 0x40c684
mov dword [esp], str.out_of_dynamic_memory_in_yy_get_next_buffer__
call fcn.0040d093
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov edx, dword [ebp - 0x38]
sub edx, 2
mov dword [eax + 0xc], edx
mov edx, dword [0x7af0a4]
mov eax, dword [ebp - 0x28]
add eax, edx
mov dword [0x7af0a4], eax
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [0x7af0a4]
add eax, edx
mov byte [eax], 0
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [0x7af0a4]
inc edx
add eax, edx
mov byte [eax], 0
mov eax, dword [0x7af09c]
mov edx, dword [0x7af094]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [0x7bdcd4], eax
mov eax, dword [ebp - 0x18]
add esp, 0x44
pop ebx
pop ebp
ret