Function at 0x403bf0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x403f8b
mov ebx, dword [ebp + 8]
test ebx, ebx
js 0x403f8b
cmp ebx, dword [ebp + 0xc]
jg 0x403f8b
mov edx, dword [esi + 0x24]
mov ecx, dword [esi + 0x20]
test edx, edx
jg 0x403c35
jl 0x403c2a
test ecx, ecx
jae 0x403c35
cmp ebx, dword [esi + 0x28]
jg 0x403f8b
jmp 0x403c9e
cmp ebx, dword [esi + 0x28]
jg 0x403d09
cmp ebx, dword [esi + 0x2c]
jl 0x403c90
push 0
push edx
push ecx
push eax
call fcn.00411db2
mov eax, dword [esi + 0x2c]
lea edx, [esi + 0x3c]
dec eax
mov dword [esi + 0x2c], 0xffffffff
mov dword [esi + 0x28], eax
xor ecx, ecx
mov dword [esi + 0x30], 0
add esp, 0x10
mov dword [esi + 0x38], 0xffffffff
mov eax, dword [edx]
cmp eax, dword [edx + 4]
cmovne ecx, edx
cmp dword [esi + 0x24], 0
mov dword [esi + 0x48], ecx
jg 0x403d09
jl 0x403c9e
cmp dword [esi + 0x20], 0
jae 0x403d09
jmp 0x403c9e
mov dword [esi + 0x20], 0xffffffff
mov dword [esi + 0x24], 0xffffffff
push dword [esi + 4]
call fcn.00411153
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
call fcn.00404b40
mov eax, dword [esi + 0x14]
add esp, 4
mov ecx, esi
mov dword [esi + 0x18], eax
call fcn.00403fa0
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edx
test edx, edx
jl 0x403f8b
jg 0x403cd9
test eax, eax
jb 0x403f8b
mov dword [esi + 0x28], 0xffffffff
mov dword [esi + 0x2c], 0xffffffff
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0xffffffff
mov dword [esi + 0x38], 0xffffffff
mov eax, dword [esi + 0x3c]
mov dword [esi + 0x40], eax
mov dword [esi + 0x48], 0
mov edx, dword [esi + 0x30]
mov byte [ebp - 1], 0
mov eax, dword [esi + 0xc]
mov edi, 0x1000
mov ecx, dword [esi + 8]
sub eax, ecx
sar eax, 2
mov dword [ebp - 0xc], edx
cmp edx, eax
jae 0x403eb1
mov ebx, ecx
nop dword [eax]
mov eax, dword [ecx + edx*4]
cmp eax, 0xffffffff
jne 0x403d40
mov dword [esi + 0x38], eax
jmp 0x403e95
cmp eax, 0x80000000
jb 0x403d61
and eax, 0x3fffffff
cmp dword [esi + 0x34], 0xffffffff
mov dword [esi + 0x38], eax
jne 0x403e95
mov dword [esi + 0x34], eax
jmp 0x403e95
mov ecx, dword [esi + 0x38]
mov dword [ebp - 0x10], 0
cmp ecx, 0xffffffff
je 0x403dbb
movzx edi, ax
mov eax, 0x6c16c16d
add edi, ecx
mov ecx, edi
sub ecx, dword [esi + 0x34]
and ecx, 0x3fffffff
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 5
shl ecx, 2
mov dword [ebp - 0x10], ecx
cmp dword [esi + 0x28], ecx
jge 0x403db0
cmp ecx, dword [ebp + 0xc]
jge 0x403f4c
cmp dword [esi + 0x2c], 0
mov dword [esi + 0x28], ecx
jge 0x403db0
mov dword [esi + 0x2c], ecx
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x38], edi
mov edi, 0x1000
movzx eax, word [ebx + edx*4 + 2]
inc eax
mov dword [ebp - 0x14], eax
push dword [esi + 4]
lea eax, [ebp - 8]
push 1
push 2
push eax
call fcn.0041198e
add esp, 0x10
cmp eax, 1
jne 0x403f7d
mov ax, word [ebp - 8]
cmp ax, di
jb 0x403f7d
mov ecx, dword [esi + 0x18]
mov edi, dword [esi + 0x14]
sub ecx, edi
movzx edx, ax
sar ecx, 4
lea eax, [edx - 0x1000]
cmp eax, ecx
jae 0x403f7d
shl edx, 4
lea ebx, [edi - 0x10000]
add ebx, edx
movzx edi, word [edx + edi - 0xfff4]
test di, di
jne 0x403e26
mov dword [esi + 0x48], ebx
jmp 0x403e83
cmp dword [esi + 0x38], 0xffffffff
je 0x403e83
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x10], eax
jl 0x403e83
cmp byte [ebp - 1], 0
jne 0x403e66
cmp dword [esi + 0x48], 0
je 0x403e66
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x18], 0
mov ecx, dword [ecx + 0x24]
test ecx, ecx
je 0x403f94
mov eax, dword [ecx]
lea edx, [ebp - 0x18]
push edx
mov edx, dword [esi + 0x48]
push edx
call dword [eax + 8]
mov byte [ebp - 1], 1
mov eax, edi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x403f94
mov eax, dword [ecx]
lea edx, [ebp - 0x18]
push edx
push ebx
call dword [eax + 8]
sub dword [ebp - 0x14], 1
mov edi, 0x1000
jne 0x403dc4
mov edx, dword [ebp - 0xc]
inc dword [esi + 0x30]
inc edx
mov ecx, dword [esi + 8]
mov ebx, ecx
mov eax, dword [esi + 0xc]
sub eax, ecx
mov dword [ebp - 0xc], edx
sar eax, 2
cmp edx, eax
jb 0x403d30
push dword [esi + 4]
lea eax, [ebp - 0x1c]
push dword [esi + 0x4c]
push 1
push eax
call fcn.0041198e
add esp, 0x10
cmp eax, dword [esi + 0x4c]
jne 0x403f7d
mov eax, dword [esi + 0x48]
test eax, eax
je 0x403f19
lea edi, [esi + 0x3c]
cmp edi, eax
je 0x403f16
mov ecx, dword [eax]
mov ebx, dword [eax + 4]
mov eax, dword [edi + 8]
sub ebx, ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi]
sub eax, ecx
mov dword [ebp - 0x14], ecx
cmp ebx, eax
jbe 0x403f01
push ebx
mov ecx, edi
call fcn.00404cf0
mov ecx, dword [edi]
mov dword [ebp - 0x14], ecx
push ebx
push dword [ebp - 0x18]
push ecx
call fcn.0040fb60
mov eax, dword [ebp - 0x14]
add esp, 0xc
add eax, ebx
mov dword [edi + 4], eax
mov dword [esi + 0x48], edi
mov ecx, esi
call fcn.00403fa0
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edx
test edx, edx
jl 0x403f8b
jg 0x403f30
test eax, eax
jb 0x403f8b
mov dword [esi + 0x2c], 0xffffffff
xor edx, edx
mov dword [esi + 0x30], 0
mov dword [esi + 0x38], 0xffffffff
jmp 0x403d10
cmp byte [ebp - 1], 0
jne 0x403f8b
mov edx, dword [esi + 0x48]
test edx, edx
je 0x403f8b
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0xc], 0
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x403f94
mov eax, dword [ecx]
lea esi, [ebp + 0xc]
push esi
push edx
call dword [eax + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [esi + 0x20], 0xffffffff
mov dword [esi + 0x24], 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call fcn.0040cd5e
int3