Function at 0x47c790
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1002c
call fcn.004a0d80
mov eax, dword [0x4d1698]
xor eax, esp
mov dword [esp + 0x10028], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
cmp byte [edi + 4], 0
mov dword [esp + 0xc], ebx
je 0x47c9e7
mov eax, ebx
mov dword [esp + 0x10], 0x76504653
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x47c7d1
sub eax, esi
push 0x4aeee4
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 0
call fcn.0048d0d9
mov esi, eax
add esp, 8
test esi, esi
je 0x47c9e7
push 2
push 0
push esi
call fcn.0048d5da
add esp, 0xc
test eax, eax
jne 0x47c9de
push esi
call fcn.0048d4eb
mov dword [esp + 0x20], eax
mov eax, dword [edi + 8]
add esp, 4
cmp eax, dword [edi + 0xc]
jae 0x47c843
xor ebx, ebx
call fcn.0047c4c0
test eax, eax
js 0x47c9de
mov ecx, dword [edi + 8]
cmp ecx, dword [edi + 0xc]
jb 0x47c828
mov ebx, dword [esp + 0xc]
mov edx, dword [edi + 0x10]
mov eax, dword [edi]
push 0
push edx
push eax
call fcn.0048d5da
add esp, 0xc
test eax, eax
jne 0x47c9de
mov ecx, dword [edi]
push ecx
push 1
lea edx, [esp + 0x18]
push 0x10
push edx
call fcn.0048f994
add esp, 0x10
test eax, eax
je 0x47c9de
mov eax, dword [edi]
mov ecx, dword [esp + 0x14]
push eax
push 1
push ecx
push ebx
call fcn.0048f994
add esp, 0x10
test eax, eax
je 0x47c9de
push 0
push 0
push esi
call fcn.0048d5da
add esp, 0xc
test eax, eax
jne 0x47c9de
mov ebx, dword [esp + 0x1c]
cmp ebx, 0x10000
jb 0x47c8fe
push esi
push 1
lea edx, [esp + 0x38]
push 0x10000
push edx
call fcn.0048d33a
add esp, 0x10
test eax, eax
je 0x47c9de
mov eax, dword [edi]
push eax
push 1
lea ecx, [esp + 0x38]
push 0x10000
push ecx
call fcn.0048f994
add esp, 0x10
test eax, eax
je 0x47c9de
sub ebx, 0x10000
cmp ebx, 0x10000
jae 0x47c8b4
test ebx, ebx
je 0x47c936
push esi
push 1
lea edx, [esp + 0x38]
push ebx
push edx
call fcn.0048d33a
add esp, 0x10
test eax, eax
je 0x47c9de
mov eax, dword [edi]
push eax
push 1
lea ecx, [esp + 0x38]
push ebx
push ecx
call fcn.0048f994
add esp, 0x10
test eax, eax
je 0x47c9de
mov edx, dword [edi]
push edx
call fcn.00495b0f
add esp, 4
test eax, eax
jne 0x47c9de
mov eax, dword [edi]
push eax
call fcn.0048d4eb
mov ecx, dword [edi + 0x18]
mov edx, dword [edi + 0xc]
add esp, 4
inc edx
mov dword [esp + 0x24], ecx
mov ecx, dword [edi + 0x14]
push 0
mov dword [esp + 0x2c], edx
mov edx, dword [edi]
mov ebx, eax
mov eax, dword [edi + 0x1c]
push ecx
push edx
mov dword [esp + 0x2c], 0x76504653
mov dword [esp + 0x38], eax
call fcn.0048d5da
add esp, 0xc
test eax, eax
jne 0x47c9de
mov eax, dword [edi]
push eax
push 1
lea ecx, [esp + 0x28]
push 0x10
push ecx
call fcn.0048f994
add esp, 0x10
test eax, eax
je 0x47c9de
mov edx, dword [edi]
push edx
call fcn.00495b0f
add esp, 4
test eax, eax
jne 0x47c9de
mov eax, 1
add dword [edi + 0xc], eax
add dword [edi + 8], eax
push esi
mov dword [edi + 0x10], ebx
call fcn.0048d6c3
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10028]
xor ecx, esp
call fcn.0048c97b
mov esp, ebp
pop ebp
ret
push esi
call fcn.0048d6c3
add esp, 4
mov ecx, dword [esp + 0x10034]
pop edi
pop esi
pop ebx
xor ecx, esp
or eax, 0xffffffff
call fcn.0048c97b
mov esp, ebp
pop ebp
ret