Function at 0x40be38
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov eax, dword [0x6ef264]
mov dword [ebp - 0x3c], eax
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [0x6e5090]
add edx, 1
add edx, eax
mov eax, dword [0x6e5094]
cmp edx, eax
jae 0x40be93
mov dword [esp], str.fatal_flex_scanner_internal_error__end_of_buffer_missed
call fcn.0040cc99
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x40bed5
mov eax, dword [0x6e5094]
mov edx, eax
mov eax, dword [0x6ef264]
sub edx, eax
mov eax, edx
cmp eax, 1
jne 0x40becb
mov eax, 1
jmp 0x40c34e
mov eax, 2
jmp 0x40c34e
mov eax, dword [0x6e5094]
mov edx, eax
mov eax, dword [0x6ef264]
sub edx, eax
mov eax, edx
lea ebx, [eax - 1]
mov esi, 0
jmp 0x40bf05
mov eax, edi
lea edi, [eax + 1]
mov edx, dword [ebp - 0x3c]
lea ecx, [edx + 1]
mov dword [ebp - 0x3c], ecx
movzx edx, byte [edx]
mov byte [eax], dl
add esi, 1
cmp esi, ebx
jl 0x40beef
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
cmp eax, 2
jne 0x40bf4d
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [0x6e5090], 0
mov edx, dword [0x6e5090]
mov dword [eax + 0x10], edx
jmp 0x40c1ff
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, ebx
sub eax, edx
sub eax, 1
mov dword [ebp - 0x20], eax
jmp 0x40c051
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x6e5094]
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 0x40c002
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
add eax, eax
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x40bfce
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
shr eax, 3
add edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0xc], edx
jmp 0x40bfdd
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]
lea edx, [eax + 2]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040ce36
mov edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 4], edx
jmp 0x40c00c
mov eax, dword [ebp - 0x2c]
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
test eax, eax
jne 0x40c022
mov dword [esp], str.fatal_error___scanner_input_buffer_overflow
call fcn.0040cc99
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x30]
add eax, edx
mov dword [0x6e5094], eax
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, ebx
sub eax, edx
sub eax, 1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x40bf71
cmp dword [ebp - 0x20], 0x2000
jbe 0x40c06b
mov dword [ebp - 0x20], 0x2000
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40c142
mov dword [ebp - 0x24], 0x2a
mov dword [ebp - 0x28], 0
jmp 0x40c0bf
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov ecx, ebx
mov edx, dword [ebp - 0x28]
add edx, ecx
add eax, edx
mov edx, dword [ebp - 0x24]
mov byte [eax], dl
add dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x20]
jae 0x40c0e3
mov eax, dword [0x6e5074]
mov dword [esp], eax
call sub.msvcrt.dll_getc
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x40c0e3
cmp dword [ebp - 0x24], 0xa
jne 0x40c098
cmp dword [ebp - 0x24], 0xa
jne 0x40c112
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [ebp - 0x28]
lea edx, [eax + 1]
mov dword [ebp - 0x28], edx
mov edx, ebx
add eax, edx
add eax, ecx
mov edx, dword [ebp - 0x24]
mov byte [eax], dl
cmp dword [ebp - 0x24], 0xffffffff
jne 0x40c135
mov eax, dword [0x6e5074]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x40c135
mov dword [esp], str.input_in_flex_scanner_failed
call fcn.0040cc99
mov eax, dword [ebp - 0x28]
mov dword [0x6e5090], eax
jmp 0x40c1e4
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
jmp 0x40c187
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
cmp eax, 4
je 0x40c16d
mov dword [esp], str.input_in_flex_scanner_failed
call fcn.0040cc99
jmp 0x40c1e4
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov eax, dword [0x6e5074]
mov dword [esp], eax
call sub.msvcrt.dll_clearerr
mov eax, dword [0x6e5074]
mov edx, dword [0x6e5088]
mov ecx, dword [0x6e5080]
shl ecx, 2
add edx, ecx
mov edx, dword [edx]
mov edx, dword [edx + 4]
mov ecx, ebx
add edx, ecx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], edx
call sub.msvcrt.dll_fread
mov dword [0x6e5090], eax
mov eax, dword [0x6e5090]
test eax, eax
jne 0x40c1e4
mov eax, dword [0x6e5074]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x40c151
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov edx, dword [0x6e5090]
mov dword [eax + 0x10], edx
mov eax, dword [0x6e5090]
test eax, eax
jne 0x40c244
test ebx, ebx
jne 0x40c222
mov dword [ebp - 0x1c], 1
mov eax, dword [0x6e5074]
mov dword [esp], eax
call fcn.0040c4cc
jmp 0x40c24b
mov dword [ebp - 0x1c], 2
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [eax + 0x2c], 2
jmp 0x40c24b
mov dword [ebp - 0x1c], 0
mov eax, dword [0x6e5090]
mov edx, ebx
lea ecx, [eax + edx]
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
cmp ecx, eax
jbe 0x40c2e1
mov eax, dword [0x6e5090]
mov edx, ebx
add edx, eax
mov eax, dword [0x6e5090]
shr eax, 1
add eax, edx
mov dword [ebp - 0x38], eax
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov esi, dword [eax]
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040ce36
mov dword [esi + 4], eax
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
jne 0x40c2e1
mov dword [esp], str.out_of_dynamic_memory_in_yy_get_next_buffer__
call fcn.0040cc99
mov eax, dword [0x6e5090]
mov edx, ebx
add eax, edx
mov dword [0x6e5090], eax
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [0x6e5090]
add eax, edx
mov byte [eax], 0
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [0x6e5090]
add edx, 1
add eax, edx
mov byte [eax], 0
mov eax, dword [0x6e5088]
mov edx, dword [0x6e5080]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [0x6ef264], eax
mov eax, dword [ebp - 0x1c]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret