Function at 0x58ef80
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x44
mov edx, dword [ecx + 2]
push ebx
movzx eax, ax
push ebp
mov ebp, dword [esp + 0x50]
push esi
mov esi, eax
imul esi, esi, 0x32
add esi, dword [ebp + 0x10]
lea eax, [eax + eax*2]
lea eax, [edx + eax*2]
push edi
push esi
mov dword [esp + 0x1c], eax
call fcn.00599930
add esp, 8
test al, al
jne 0x58f2b6
mov ecx, dword [ebp + 0x2f]
mov byte [esp + 0x54], al
movzx eax, word [esi + 0x2d]
cmp eax, 0x310d
mov ebx, dword [ecx + 0x21]
jg 0x58f002
je 0x58eff9
sub eax, 0x110d
je 0x58efeb
sub eax, 3
jne 0x58f01e
push edi
push esi
call fcn.00599910
mov edx, dword [eax]
mov dword [esp + 0x20], edx
mov byte [esp + 0x18], 1
jmp 0x58f01b
push edi
push esi
call fcn.00599910
mov byte [esp + 0x18], 1
jmp 0x58f017
push edi
push esi
call fcn.00599910
jmp 0x58f012
cmp eax, 0x3110
jne 0x58f01e
push edi
push esi
call fcn.00599910
mov eax, dword [eax]
mov byte [esp + 0x18], 0
mov dword [esp + 0x20], eax
add esp, 8
cmp byte [ebp + 0x5d], 0
jne 0x58f040
push edi
push esi
call fcn.00599900
add esp, 8
test eax, eax
je 0x58f040
push edi
push esi
call fcn.00599900
mov eax, dword [eax]
add esp, 8
jmp 0x58f045
mov eax, 0xfffffffd
movzx ecx, byte [ebp + 0x63]
mov ebp, dword [esp + 0x58]
push ecx
mov ecx, dword [ebx + 8]
push edi
lea edx, [esp + 0x5c]
push edx
mov edx, dword [esp + 0x1c]
push ebp
push ecx
push 0
push edx
push eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00595c10
add esp, 0x28
test eax, eax
jne 0x58f2b8
add esi, 9
cmp dword [esi], eax
jne 0x58f0ce
mov edx, dword [esp + 0x14]
mov ax, word [edx]
call fcn.0058de00
test eax, eax
je 0x58f0ce
cmp byte [esp + 0x54], 0
je 0x58f0a7
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push 0x6784
push 6
call fcn.00406f10
push 0
push 0
push 0
push 0
push edi
push 6
push ebp
call fcn.00594510
add esp, 0x24
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov ecx, dword [esp + 0x14]
movzx eax, word [ecx]
cmp ax, 0xd
jne 0x58f0fa
mov eax, dword [esi]
mov dword [eax], 1
mov edx, dword [esp + 0xc]
mov dword [eax + 8], edx
mov edx, dword [esi]
pop esi
mov eax, ecx
pop ebp
mov dword [eax + 2], edx
xor eax, eax
pop ebx
add esp, 0x44
ret
cmp ax, 0xc
jne 0x58f2bf
mov ecx, dword [esp + 0xc]
mov ebx, dword [esi]
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.0056a9c0
add esp, 8
cmp eax, 0xffffffff
jne 0x58f167
mov edx, dword [esp + 0xc]
push edx
push 0x6784
push 0x727
call fcn.00406f10
add esp, 0xc
cmp byte [esp + 0x54], 0
je 0x58f149
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push 0
push 0
push 0
push 0
push edi
push 0x727
push ebp
call fcn.00594510
add esp, 0x1c
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
cmp dword [esp + 0x3c], 0
jl 0x58f1ad
jg 0x58f17a
cmp dword [esp + 0x38], 0x7f9c
jbe 0x58f1ad
cmp byte [esp + 0x54], 0
je 0x58f18f
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push 0
push 0
push 0
push 0
push edi
push 0x4288
push ebp
call fcn.00594510
add esp, 0x1c
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov edx, dword [esp + 0xc]
push 0x5a8528
push edx
call dword [sym.imp.MSVCR90.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x58f219
mov eax, dword [esp + 0xc]
push 0x5a8528
push eax
push 0x6784
push 0x713
call fcn.00406f10
add esp, 0x10
cmp byte [esp + 0x54], 0
je 0x58f1f7
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov edx, dword [esp + 0x58]
push 0
push 0
push 0
push 0
push edi
push 0x713
push edx
call fcn.00594510
add esp, 0x1c
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov eax, dword [esp + 0x38]
push ebp
push eax
lea ecx, [ebx + 4]
push 1
push ecx
call dword [sym.imp.MSVCR90.dll_fread]
mov ecx, dword [esp + 0x48]
cdq
add esp, 0x10
cmp ecx, eax
jne 0x58f23f
mov eax, dword [esp + 0x3c]
cmp eax, edx
je 0x58f288
push 0x6784
push 0x712
call fcn.00406f10
add esp, 8
cmp byte [esp + 0x54], 0
je 0x58f266
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov edx, dword [esp + 0x58]
push 0
push 0
push 0
push 0
push edi
push 0x712
push edx
call fcn.00594510
add esp, 0x1c
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
push ebp
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
cmp byte [esp + 0x54], 0
je 0x58f2a7
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x14]
mov dword [ebx], ecx
mov edx, dword [esi]
mov dword [eax + 2], edx
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
cmp byte [esp + 0x54], 0
je 0x58f2d4
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push 0
push 0
push 0
push 0
push edi
push 0x4276
push ebp
call fcn.00594510
add esp, 0x1c
pop esi
pop ebp
pop ebx
add esp, 0x44
ret