Function at 0x10005680
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], edi
test eax, eax
jg 0x100056b2
jl 0x100056a5
test ecx, ecx
jne 0x100056b2
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x10005772
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov ecx, ebx
call fcn.10006c00
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x1000571e
jg 0x100056dd
test esi, esi
je 0x1000571e
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jg 0x100056f5
mov eax, dword [esp + 0xc]
jl 0x100056ef
cmp eax, esi
jae 0x100056f5
mov esi, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push edi
call fcn.10044fa0
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
sub ecx, esi
sbb edx, dword [esp + 0x14]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x1000573f
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov edx, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x1000575b
mov ecx, dword [esp + 0xc]
mov esi, 1
add ecx, 0xffffffff
mov byte [edi], al
adc edx, 0xffffffff
add edi, esi
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
test edx, edx
jg 0x100056c4
jl 0x1000575b
test ecx, ecx
jne 0x100056c4
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0xc]
mov ecx, dword [ebp + 0x10]
sbb ecx, edx
mov edx, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov esi, ecx
mov edx, dword [eax]
test edx, edx
je 0x100057bd
mov eax, dword [ebx + 0x2c]
mov dword [esp + 0xc], esi
mov eax, dword [eax]
test eax, eax
je 0x100057c1
mov edi, dword [esp + 0x10]
cmp eax, ecx
cmovb esi, eax
push esi
push edx
push edi
call fcn.10044fa0
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [esp + 0x1c], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, edi
mov dword [esp + 0xc], esi
jmp 0x100057c1
mov dword [esp + 0xc], ecx
cmp dword [ebx + 0x4c], 0
je 0x1000586b
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x100057ec
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov edx, esi
cmp esi, 0xfff
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], edx
jbe 0x10005828
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.1004926f
sub edi, eax
add esp, 0x10
add esi, eax
mov dword [esp + 0x14], edi
mov edx, edi
cmp eax, 0xfff
jne 0x10005857
cmp edi, eax
ja 0x10005800
mov ecx, edx
test edx, edx
je 0x1000586f
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.1004926f
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov edx, dword [ebp + 0x10]
sub ecx, eax
mov eax, dword [ebp + 0xc]
sub eax, ecx
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, ecx
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc