Function at 0x30058a80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
mov ebx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0x24]
mov ecx, dword [esi + 0x50]
mov eax, dword [eax + ebx*4]
mov dword [ebp - 8], eax
mov edx, dword [eax + 4]
mov eax, dword [esi + 0x1c]
inc eax
add eax, edx
cmp edi, eax
ja 0x30058da6
mov eax, dword [ebp - 8]
sub edi, ecx
mov dword [ebp - 0xc], edi
cmp dword [eax + 0x28], 0
jne 0x30058acc
xor eax, eax
cmp edi, 1
setne al
inc eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edi - 1]
mov dword [ebp - 4], eax
test eax, eax
jle 0x30058aee
mov edi, eax
mov al, byte [ecx]
lea edx, [edx + 1]
mov byte [edx - 1], al
lea ecx, [ecx + 1]
sub edi, 1
jne 0x30058ad8
mov ebx, dword [esi + 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [esi + 0x14]
mov edi, dword [ecx + ebx*4]
lea edx, [ecx + ebx*4]
cmp dword [edi + 0x2c], 2
jne 0x30058b15
mov ebx, dword [ebp - 4]
mov dword [esi + 0x1c], 0
mov eax, dword [edx]
mov dword [eax + 0x10], 0
jmp 0x30058c31
mov edi, dword [edi + 0xc]
sub edi, eax
dec edi
test edi, edi
jg 0x30058b85
mov edx, dword [esi + 0x24]
mov edi, dword [ecx + ebx*4]
mov ebx, dword [edi + 4]
sub edx, ebx
cmp dword [edi + 0x14], 0
mov dword [ebp - 8], edx
je 0x30058b5f
mov ecx, dword [edi + 0xc]
lea eax, [ecx + ecx]
test eax, eax
jg 0x30058b4a
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, ecx
mov dword [edi + 0xc], eax
add eax, 2
push eax
push ebx
call fcn.3016a0ac
mov edx, dword [ebp - 8]
add esp, 8
jmp 0x30058b61
xor eax, eax
mov dword [edi + 4], eax
test eax, eax
je 0x30058db2
mov ebx, dword [esi + 0xc]
add edx, eax
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x24], edx
mov eax, dword [ecx + ebx*4]
mov edi, dword [eax + 0xc]
sub edi, dword [ebp - 4]
dec edi
test edi, edi
jle 0x30058b22
mov eax, 0x2000
cmp edi, eax
cmovg edi, eax
mov eax, dword [ecx + ebx*4]
cmp dword [eax + 0x18], 0
je 0x30058c5d
xor ecx, ecx
mov dword [ebp - 8], ecx
test edi, edi
jle 0x30058c1c
push dword [esi + 4]
call fcn.3016a20a
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x30058bde
cmp ebx, 0xa
je 0x30058be6
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
mov ecx, dword [ecx + edx*4]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + 4]
mov ecx, dword [ebp - 8]
add eax, ecx
inc ecx
mov dword [ebp - 8], ecx
mov byte [eax + edx - 1], bl
cmp ecx, edi
jl 0x30058ba5
jmp 0x30058be1
mov ecx, dword [ebp - 8]
cmp ebx, 0xa
jne 0x30058c01
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
mov ebx, dword [ebp - 4]
mov eax, dword [eax + ecx*4]
mov ecx, dword [ebp - 8]
mov eax, dword [eax + 4]
add eax, ecx
inc ecx
mov byte [eax + ebx], 0xa
jmp 0x30058c1f
cmp ebx, 0xffffffff
jne 0x30058c1c
push dword [esi + 4]
call fcn.30169fd0
add esp, 4
test eax, eax
jne 0x30058dbe
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 4]
mov dword [esi + 0x1c], ecx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0xc]
mov ecx, dword [eax + ecx*4]
mov eax, dword [esi + 0x1c]
mov dword [ecx + 0x10], eax
mov ecx, dword [esi + 0x1c]
test ecx, ecx
jne 0x30058d08
test ebx, ebx
jne 0x30058cec
mov ecx, dword [esi + 4]
mov edx, esi
mov dword [ebp - 8], 1
call fcn.30058ea0
mov ecx, dword [esi + 0x1c]
jmp 0x30058d0d
call fcn.30165db2
mov ebx, dword [ebp - 4]
mov dword [eax], 0
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
push dword [esi + 4]
push edi
mov eax, dword [eax + ecx*4]
push 1
mov eax, dword [eax + 4]
add eax, ebx
push eax
call fcn.301697c8
add esp, 0x10
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x30058c22
nop
push dword [esi + 4]
call fcn.30169fd0
add esp, 4
test eax, eax
je 0x30058c22
call fcn.30165db2
cmp dword [eax], 4
jne 0x30058dbe
call fcn.30165db2
mov dword [eax], 0
push dword [esi + 4]
call fcn.30169ffc
mov ecx, dword [esi + 0xc]
add esp, 4
mov eax, dword [esi + 0x14]
push dword [esi + 4]
mov eax, dword [eax + ecx*4]
push edi
push 1
mov eax, dword [eax + 4]
add eax, ebx
push eax
call fcn.301697c8
add esp, 0x10
mov dword [esi + 0x1c], eax
test eax, eax
je 0x30058c90
jmp 0x30058c22
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
mov dword [ebp - 8], 2
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x2c], 2
mov ecx, dword [esi + 0x1c]
jmp 0x30058d0d
xor edi, edi
mov dword [ebp - 8], edi
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + edx*4]
mov dword [ebp - 4], eax
lea eax, [ecx + ebx]
mov edi, dword [ebp - 4]
cmp eax, dword [edi + 0xc]
mov edi, dword [ebp - 8]
jle 0x30058d68
mov eax, dword [ebp - 4]
mov edi, ecx
sar edi, 1
add edi, ecx
add edi, ebx
push edi
push dword [eax + 4]
call fcn.3016a0ac
mov edx, dword [esi + 0xc]
add esp, 8
mov ecx, dword [esi + 0x14]
mov ecx, dword [ecx + edx*4]
mov dword [ecx + 4], eax
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + ecx*4]
cmp dword [ecx + 4], 0
je 0x30058dca
lea eax, [edi - 2]
mov edi, dword [ebp - 8]
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
add ecx, ebx
mov dword [esi + 0x1c], ecx
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 4]
mov byte [ecx + eax], 0
mov eax, edi
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
pop edi
mov ecx, dword [ecx + edx*4]
mov edx, dword [ecx + 4]
mov ecx, dword [esi + 0x1c]
mov byte [edx + ecx + 1], 0
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
mov ecx, dword [ecx + edx*4]
mov ecx, dword [ecx + 4]
mov dword [esi + 0x50], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, str.fatal_flex_scanner_internal_error__end_of_buffer_missed
mov ecx, esi
call fcn.300594e0
mov edx, str.fatal_error___scanner_input_buffer_overflow
mov ecx, esi
call fcn.300594e0
mov edx, str.input_in_flex_scanner_failed
mov ecx, esi
call fcn.300594e0
mov edx, str.out_of_dynamic_memory_in_yy_get_next_buffer__
mov ecx, esi
call fcn.300594e0
int3