Function at 0x4a5830
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 0x4a5866
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 0x4a5aef
mov eax, dword [esi + 4]
add eax, ecx
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x14], 0
je 0x4a58bd
mov edx, dword [ecx + 0x1c]
cmp edx, eax
ja 0x4a5889
mov eax, edx
mov dword [ecx + 0x18], eax
mov ecx, dword [esi + 0xc]
add ecx, 2
cmp ecx, dword [esi + 8]
ja 0x4a5aef
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a58ea
lea edx, [esp + 0x18]
push edx
mov eax, 2
call fcn.00469830
cmp eax, 2
je 0x4a5915
jmp 0x4a5aef
push 0
push eax
mov eax, dword [ecx + 4]
push eax
call fcn.005303b8
add esp, 0xc
test eax, eax
je 0x4a588c
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 0x4a5915
cmp dword [edi + 4], eax
jne 0x4a5aef
cmp dword [edi + 0xc], eax
jne 0x4a5aef
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 0x4a5aef
mov edx, dword [esi + 8]
cmp edi, edx
ja 0x4a5aef
mov ebx, dword [esi + 0xc]
lea eax, [ebx + edi]
cmp eax, edx
ja 0x4a5aef
test ecx, ecx
mov dword [esi + 0x10], eax
mov eax, dword [esi + 4]
lea ebx, [ebx + eax + 2]
mov dword [esp + 0x14], 0
jbe 0x4a5a2b
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a59aa
lea ecx, [esp + 0x38]
push ecx
mov eax, 0xc
call fcn.00469830
cmp eax, 0xc
je 0x4a59e5
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 0x4a59cb
push eax
push 1
lea edx, [esp + 0x40]
push 0xc
push edx
call fcn.0052edba
add esp, 0x10
test eax, eax
je 0x4a59cb
xor edi, edi
jmp 0x4a59db
cmp dword [edi + 4], 0
je 0x4a59d8
mov edi, 2
jmp 0x4a59db
mov edi, dword [edi + 0xc]
test edi, edi
mov eax, edi
jne 0x4a5af1
lea ecx, [esp + 0x38]
call fcn.0049b5a0
mov eax, ecx
push ebx
push eax
mov eax, esi
mov ecx, ebp
call fcn.004a7500
add ebx, 0xc
mov ecx, ebx
mov eax, ebp
call fcn.004a6f10
test eax, eax
jne 0x4a5af1
mov eax, dword [esp + 0x14]
movzx ecx, word [esp + 0x18]
add eax, 1
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x4a5973
mov edi, dword [esp + 0x1c]
cmp dword [esi], 0
jne 0x4a5aef
mov edx, dword [ebp + 0xc]
shr edx, 9
test dl, 1
je 0x4a5aef
mov eax, dword [esi + 8]
lea ecx, [edi + 4]
cmp ecx, eax
ja 0x4a5aef
mov edx, dword [esi + 0xc]
lea ecx, [edx + edi + 4]
cmp ecx, eax
ja 0x4a5aef
mov edi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
je 0x4a5a7f
lea edx, [esp + 0x14]
push edx
mov eax, 4
call fcn.00469830
cmp eax, 4
je 0x4a5aa2
jmp 0x4a5aef
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 0x4a5aa2
cmp dword [edi + 4], eax
jne 0x4a5aef
cmp dword [edi + 0xc], eax
jne 0x4a5aef
cmp dword [esp + 0x14], 0
je 0x4a5aef
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 0x4a584c
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