Function at 0x4a6790
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 0x4a67c6
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 0x4a6a39
mov eax, dword [esi + 4]
add eax, ecx
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x14], 0
je 0x4a681d
mov edx, dword [ecx + 0x1c]
cmp edx, eax
ja 0x4a67e9
mov eax, edx
mov dword [ecx + 0x18], eax
mov ecx, dword [esi + 0xc]
add ecx, 2
cmp ecx, dword [esi + 8]
ja 0x4a6a39
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a684a
lea edx, [esp + 0x14]
push edx
mov eax, 2
call fcn.00469830
cmp eax, 2
je 0x4a6875
jmp 0x4a6a39
push 0
push eax
mov eax, dword [ecx + 4]
push eax
call fcn.005303b8
add esp, 0xc
test eax, eax
je 0x4a67ec
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 + 0x1c]
push 2
push ecx
call fcn.0052edba
add esp, 0x10
test eax, eax
jne 0x4a6875
cmp dword [edi + 4], eax
jne 0x4a6a39
cmp dword [edi + 0xc], eax
jne 0x4a6a39
mov ax, word [esp + 0x14]
cmp ax, 0x3e8
movzx ecx, ax
lea edi, [ecx + ecx*2]
lea edi, [edi*4 + 2]
mov dword [esp + 0x1c], edi
ja 0x4a6a39
mov edx, dword [esi + 8]
cmp edi, edx
ja 0x4a6a39
mov ebx, dword [esi + 0xc]
lea eax, [ebx + edi]
cmp eax, edx
ja 0x4a6a39
test ecx, ecx
mov edx, dword [esi + 4]
mov dword [esi + 0x10], eax
lea ebx, [ebx + edx + 2]
mov dword [esp + 0x18], 0
jbe 0x4a6981
jmp 0x4a68d0
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a6907
lea eax, [esp + 0x38]
push eax
mov eax, 0xc
call fcn.00469830
cmp eax, 0xc
je 0x4a6942
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 0x4a6928
push eax
push 1
lea ecx, [esp + 0x40]
push 0xc
push ecx
call fcn.0052edba
add esp, 0x10
test eax, eax
je 0x4a6928
xor edi, edi
jmp 0x4a6938
cmp dword [edi + 4], 0
je 0x4a6935
mov edi, 2
jmp 0x4a6938
mov edi, dword [edi + 0xc]
test edi, edi
mov eax, edi
jne 0x4a6a3b
push ebx
lea edx, [esp + 0x3c]
push edx
mov eax, esi
mov ecx, ebp
call fcn.004a7b00
add ebx, 0xc
mov ecx, ebx
mov eax, ebp
call fcn.004a6f10
test eax, eax
jne 0x4a6a3b
mov eax, dword [esp + 0x18]
movzx ecx, word [esp + 0x14]
add eax, 1
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x4a68d0
mov edi, dword [esp + 0x1c]
cmp dword [esi], 0
jne 0x4a6a39
mov edx, dword [ebp + 0xc]
shr edx, 9
test dl, 1
je 0x4a6a39
mov eax, dword [esi + 8]
lea ecx, [edi + 4]
cmp ecx, eax
ja 0x4a6a39
mov edx, dword [esi + 0xc]
lea ecx, [edx + edi + 4]
cmp ecx, eax
ja 0x4a6a39
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a69d5
lea edx, [esp + 0x18]
push edx
mov eax, 4
call fcn.00469830
cmp eax, 4
je 0x4a69f8
jmp 0x4a6a39
mov eax, dword [edi + 4]
push eax
push 1
lea ecx, [esp + 0x20]
push 4
push ecx
call fcn.0052edba
add esp, 0x10
test eax, eax
jne 0x4a69f8
cmp dword [edi + 4], eax
jne 0x4a6a39
cmp dword [edi + 0xc], eax
jne 0x4a6a39
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4a6a39
mov edx, dword [esi + 4]
mov ecx, dword [esi + 8]
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 + 0x28], ecx
mov dword [esp + 0x30], eax
mov byte [esp + 0x34], 0
call fcn.004a7a90
test eax, eax
je 0x4a67ac
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