Function at 0x4662f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, dword [esp + 0x28]
xor ebp, ebp
push edi
mov eax, dword [esi + 0xc908]
cmp eax, 0x2000
jg 0x466407
mov eax, dword [esi + 0xc904]
push ebp
push ebp
push eax
call fcn.0047960b
mov ecx, dword [esi + 0xc908]
mov edx, dword [esi + 0xc8e0]
mov eax, dword [esi + 0xc904]
push ecx
push edx
push eax
call fcn.0047abb6
mov ecx, dword [esi + 0xc908]
add esp, 0x18
cmp eax, ecx
mov dword [esi + 0xc8e8], eax
jne 0x466608
mov eax, dword [esi + 0xc8e0]
lea ecx, [eax + ecx - 0x16]
cmp ecx, eax
mov dword [esi + 0xc8e4], ecx
jb 0x466608
mov eax, dword [esi + 0xc8e4]
cmp byte [eax], 0x50
jne 0x466384
push 4
push 0x497bc8
push eax
call fcn.00470230
add esp, 0xc
test eax, eax
je 0x4663aa
mov edx, dword [esi + 0xc8e4]
mov ecx, dword [esi + 0xc8e0]
dec edx
mov eax, edx
mov dword [esi + 0xc8e4], edx
cmp eax, ecx
jae 0x466365
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x18
ret
mov ecx, dword [esi + 0xc8e0]
mov edx, dword [esi + 0xc8e4]
mov eax, dword [esi + 0xc8e8]
sub ecx, edx
add eax, ecx
mov dword [esi + 0xc8e8], eax
mov eax, dword [esi + 0xc90c]
mov edx, dword [esi + 0xc8e0]
mov ecx, dword [esi + 0xc8e4]
sub eax, edx
add eax, ecx
lea ecx, [esp + 0x10]
push 0x16
push ecx
push esi
mov dword [esi + 0x80], eax
call fcn.00467010
add esp, 0xc
test eax, eax
jne 0x466615
pop edi
pop esi
pop ebp
mov eax, 0x33
pop ebx
add esp, 0x18
ret
mov edi, eax
and edi, 0x80001fff
jns 0x466419
dec edi
or edi, 0xffffe000
inc edi
cmp edi, 0x12
jle 0x4664e7
mov edx, dword [esi + 0xc904]
sub eax, edi
push 0
push eax
push edx
call fcn.0047960b
mov ecx, dword [esi + 0xc904]
mov dword [esi + 0xc90c], eax
mov eax, dword [esi + 0xc8e0]
push edi
push eax
push ecx
call fcn.0047abb6
add esp, 0x18
cmp eax, edi
mov dword [esi + 0xc8e8], eax
jne 0x466608
mov eax, dword [esi + 0xc8e0]
lea ecx, [eax + edi - 0x16]
cmp ecx, eax
mov dword [esi + 0xc8e4], ecx
jb 0x4664cd
mov eax, dword [esi + 0xc8e4]
cmp byte [eax], 0x50
jne 0x466491
push 4
push 0x497bc8
push eax
call fcn.00470230
add esp, 0xc
test eax, eax
je 0x4664ac
mov edx, dword [esi + 0xc8e4]
mov ecx, dword [esi + 0xc8e0]
dec edx
mov eax, edx
mov dword [esi + 0xc8e4], edx
cmp eax, ecx
jae 0x466472
jmp 0x4664cd
mov edx, dword [esi + 0xc8e0]
mov ecx, dword [esi + 0xc8e4]
mov eax, dword [esi + 0xc8e8]
sub edx, ecx
add eax, edx
mov ebp, 1
mov dword [esi + 0xc8e8], eax
mov eax, dword [esi + 0xc8e0]
mov ecx, dword [esi + 0xc918]
mov dx, word [eax]
mov word [ecx], dx
mov al, byte [eax + 2]
mov byte [ecx + 2], al
jmp 0x4664ef
sub eax, edi
mov dword [esi + 0xc90c], eax
mov eax, dword [esp + 0x30]
mov ebx, 1
sub eax, edi
add eax, 0x1fff
cdq
and edx, 0x1fff
add eax, edx
mov edi, eax
sar edi, 0xd
test ebp, ebp
jne 0x4663c6
cmp ebx, edi
jg 0x466600
mov eax, dword [esi + 0xc90c]
mov ecx, dword [esi + 0xc904]
add eax, 0xffffe000
push 0
push eax
push ecx
mov dword [esi + 0xc90c], eax
call fcn.0047960b
mov edx, dword [esi + 0xc8e0]
mov eax, dword [esi + 0xc904]
push 0x2000
push edx
push eax
call fcn.0047abb6
add esp, 0x18
cmp eax, 0x2000
mov dword [esi + 0xc8e8], eax
jne 0x466600
mov eax, dword [esi + 0xc8e0]
lea ecx, [eax + 0x1fff]
cmp ecx, eax
mov dword [esi + 0xc8e4], ecx
jb 0x4665da
mov eax, dword [esi + 0xc8e4]
cmp byte [eax], 0x50
jne 0x46659e
push 4
push 0x497bc8
push eax
call fcn.00470230
add esp, 0xc
test eax, eax
je 0x4665b9
mov edx, dword [esi + 0xc8e4]
mov ecx, dword [esi + 0xc8e0]
dec edx
mov eax, edx
mov dword [esi + 0xc8e4], edx
cmp eax, ecx
jae 0x46657f
jmp 0x4665da
mov ecx, dword [esi + 0xc8e0]
mov edx, dword [esi + 0xc8e4]
mov eax, dword [esi + 0xc8e8]
sub ecx, edx
add eax, ecx
mov ebp, 1
mov dword [esi + 0xc8e8], eax
mov edx, dword [esi + 0xc8e0]
mov eax, dword [esi + 0xc918]
inc ebx
mov cx, word [edx]
mov word [eax], cx
mov dl, byte [edx + 2]
test ebp, ebp
mov byte [eax + 2], dl
je 0x466515
jmp 0x4663c6
test ebp, ebp
jne 0x4663c6
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x18
ret
lea edx, [esp + 0x14]
push edx
call fcn.00467d00
mov word [esi + 0xc964], ax
lea eax, [esp + 0x1a]
push eax
call fcn.00467d00
lea ecx, [esp + 0x20]
mov word [esi + 0xc966], ax
push ecx
call fcn.00467d00
lea edx, [esp + 0x26]
mov word [esi + 0xc968], ax
push edx
call fcn.00467d00
mov word [esi + 0xc96a], ax
lea eax, [esp + 0x2c]
push eax
call fcn.00467d10
lea ecx, [esp + 0x34]
mov dword [esi + 0xc96c], eax
push ecx
call fcn.00467d10
lea edx, [esp + 0x3c]
mov dword [esi + 0xc970], eax
push edx
call fcn.00467d00
mov ecx, dword [esi + 0xc970]
mov word [esi + 0xc974], ax
mov eax, dword [esi + 0xc96c]
add esp, 0x1c
add eax, ecx
mov dword [esi + 0x84], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret