Function at 0x4a6a50
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x38
mov eax, dword [0x577830]
xor eax, esp
mov dword [esp + 0x34], eax
push ebx
push ebp
mov ebp, dword [esp + 0x44]
push esi
mov esi, ecx
test esi, esi
push edi
jne 0x4a6a86
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005120db
add esp, 0x38
ret 4
mov ecx, dword [esi + 0xc]
cmp ecx, dword [esi + 8]
ja 0x4a6d0f
mov eax, dword [esi + 4]
add eax, ecx
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x14], 0
je 0x4a6add
mov edx, dword [ecx + 0x1c]
cmp edx, eax
ja 0x4a6aa9
mov eax, edx
mov dword [ecx + 0x18], eax
mov ecx, dword [esi + 0xc]
add ecx, 2
cmp ecx, dword [esi + 8]
ja 0x4a6d0f
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a6b0a
lea edx, [esp + 0x18]
push edx
mov eax, 2
call fcn.00469830
cmp eax, 2
je 0x4a6b35
jmp 0x4a6d0f
push 0
push eax
mov eax, dword [ecx + 4]
push eax
call fcn.005303b8
add esp, 0xc
test eax, eax
je 0x4a6aac
mov eax, 3
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005120db
add esp, 0x38
ret 4
mov eax, dword [edi + 4]
push eax
push 1
lea ecx, [esp + 0x20]
push 2
push ecx
call fcn.0052edba
add esp, 0x10
test eax, eax
jne 0x4a6b35
cmp dword [edi + 4], eax
jne 0x4a6d0f
cmp dword [edi + 0xc], eax
jne 0x4a6d0f
mov dx, word [esp + 0x18]
rol dx, 8
movzx eax, dx
cmp ax, 0x3e8
movzx ecx, ax
lea edi, [ecx + ecx*2]
lea edi, [edi*4 + 2]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
ja 0x4a6d0f
mov edx, dword [esi + 8]
cmp edi, edx
ja 0x4a6d0f
mov ebx, dword [esi + 0xc]
lea eax, [ebx + edi]
cmp eax, edx
ja 0x4a6d0f
test ecx, ecx
mov dword [esi + 0x10], eax
mov eax, dword [esi + 4]
lea ebx, [ebx + eax + 2]
mov dword [esp + 0x14], 0
jbe 0x4a6c4b
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a6bca
lea ecx, [esp + 0x38]
push ecx
mov eax, 0xc
call fcn.00469830
cmp eax, 0xc
je 0x4a6c05
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005120db
add esp, 0x38
ret 4
mov eax, dword [edi + 4]
test eax, eax
je 0x4a6beb
push eax
push 1
lea edx, [esp + 0x40]
push 0xc
push edx
call fcn.0052edba
add esp, 0x10
test eax, eax
je 0x4a6beb
xor edi, edi
jmp 0x4a6bfb
cmp dword [edi + 4], 0
je 0x4a6bf8
mov edi, 2
jmp 0x4a6bfb
mov edi, dword [edi + 0xc]
test edi, edi
mov eax, edi
jne 0x4a6d11
lea ecx, [esp + 0x38]
call fcn.0049b5a0
mov eax, ecx
push ebx
push eax
mov eax, esi
mov ecx, ebp
call fcn.004a7dc0
add ebx, 0xc
mov ecx, ebx
mov eax, ebp
call fcn.004a6f10
test eax, eax
jne 0x4a6d11
mov eax, dword [esp + 0x14]
movzx ecx, word [esp + 0x18]
add eax, 1
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x4a6b93
mov edi, dword [esp + 0x1c]
cmp dword [esi], 0
jne 0x4a6d0f
mov edx, dword [ebp + 0xc]
shr edx, 9
test dl, 1
je 0x4a6d0f
mov eax, dword [esi + 8]
lea ecx, [edi + 4]
cmp ecx, eax
ja 0x4a6d0f
mov edx, dword [esi + 0xc]
lea ecx, [edx + edi + 4]
cmp ecx, eax
ja 0x4a6d0f
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a6c9f
lea edx, [esp + 0x14]
push edx
mov eax, 4
call fcn.00469830
cmp eax, 4
je 0x4a6cc2
jmp 0x4a6d0f
mov eax, dword [edi + 4]
push eax
push 1
lea ecx, [esp + 0x1c]
push 4
push ecx
call fcn.0052edba
add esp, 0x10
test eax, eax
jne 0x4a6cc2
cmp dword [edi + 4], eax
jne 0x4a6d0f
cmp dword [edi + 0xc], eax
jne 0x4a6d0f
cmp dword [esp + 0x14], 0
je 0x4a6d0f
lea ecx, [esp + 0x14]
call fcn.0049b570
mov eax, dword [esi + 8]
mov edx, dword [esi + 4]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
add eax, 2
lea esi, [esp + 0x20]
mov edi, ebp
mov dword [esp + 0x20], 0x1a
mov dword [esp + 0x24], edx
mov dword [esp + 0x30], eax
mov byte [esp + 0x34], 1
call fcn.004a8090
test eax, eax
je 0x4a6a6c
xor eax, eax
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005120db
add esp, 0x38
ret 4