Function at 0x10058c15
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x10058c52
cmp dword [ebp + 0x14], edi
je 0x10058c52
cmp ecx, edi
jne 0x10058c59
call fcn.1005b440
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.10055f34
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x10058c6d
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x10058c8e
cmp ebx, 0xffffffff
je 0x10058c7d
push ebx
push edi
push ecx
call fcn.1005a450
add esp, 0xc
cmp esi, edi
je 0x10058c3a
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x10058c3a
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x10058caa
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x10058cb1
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x10058da2
test word [esi + 0xc], 0x10c
je 0x10058d05
mov eax, dword [esi + 4]
test eax, eax
je 0x10058d05
jl 0x10058e03
cmp ebx, eax
mov edi, ebx
jb 0x10058cd6
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x10058daa
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.100549f5
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x10058d9a
cmp ebx, dword [ebp - 0xc]
jb 0x10058d72
cmp dword [ebp - 0xc], 0
je 0x10058d2f
mov ecx, closesocket
xor edx, edx
cmp ebx, ecx
jbe 0x10058d24
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x10058d2b
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x10058d3a
mov eax, closesocket
cmp ebx, eax
ja 0x10058d3a
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x10058dd6
push eax
push dword [ebp - 8]
push esi
call fcn.10067cf9
pop ecx
push eax
call fcn.1006b882
add esp, 0xc
test eax, eax
je 0x10058e15
cmp eax, 0xffffffff
je 0x10058e03
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x10058d9a
push esi
call fcn.1006b1a1
cmp eax, 0xffffffff
pop ecx
je 0x10058e07
cmp dword [ebp - 4], 0
je 0x10058dd6
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x10058cb9
mov eax, dword [ebp + 0x14]
jmp 0x10058c54
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x10058dc1
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.1005a450
add esp, 0xc
call fcn.1005b440
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x10058c4a
cmp dword [ebp + 0xc], 0xffffffff
je 0x10058dec
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.1005a450
add esp, 0xc
call fcn.1005b440
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x10058c4a
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x10058c54
or dword [esi + 0xc], 0x10
jmp 0x10058e07