Function at 0x47f579
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
test esi, esi
jne 0x47f586
push 0xffffffffffffff9a
pop eax
leave
ret
cmp dword [esi + 0xc], 1
push ebx
jne 0x47f59c
mov ebx, esi
call fcn.0047f9b3
test eax, eax
jne 0x47f8db
xor ebx, ebx
cmp dword [ebp + 8], ebx
jne 0x47f5aa
mov dword [ebp + 8], 0x4bbda8
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x47f5b0
sub eax, edx
mov edx, dword [ebp + 0xc]
push edi
mov edi, eax
mov dword [ebp - 4], edi
cmp edx, ebx
jne 0x47f5ce
mov dword [esi + 0x4064], ebx
jmp 0x47f5e0
mov eax, dword [edx + 0x18]
cmp eax, ebx
jne 0x47f5da
call fcn.0047f483
mov dword [esi + 0x4064], eax
and dword [esi + 0x48], 0
and dword [esi + 0x4c], 0
push 8
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x4068], ebx
pop ebx
push dword [esi]
mov dword [esi + 0x60], ebx
call fcn.0049b163
mov dword [esi + 0x50], eax
lea eax, [edi + 0x2e]
push eax
mov dword [esi + 0x58], eax
call fcn.004860e8
pop ecx
pop ecx
mov dword [esi + 0x54], eax
mov edx, 0x2014b50
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, 4
jl 0x47f619
mov eax, dword [esi + 0x54]
push 2
xor edx, edx
add eax, 4
xor ecx, ecx
pop edi
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, edi
jl 0x47f632
mov eax, dword [esi + 0x54]
push 0x14
add eax, 6
pop edx
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, edi
jl 0x47f648
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 0x5c]
add eax, ebx
push edi
push eax
call fcn.0047f469
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 0x60]
add eax, 0xa
push edi
push eax
call fcn.0047f469
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 0x4064]
push 4
pop ebx
add eax, 0xc
push ebx
push eax
call fcn.0047f469
mov eax, dword [esi + 0x54]
add esp, 0x18
xor edx, edx
add eax, 0x10
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, ebx
jl 0x47f695
mov eax, dword [esi + 0x54]
xor edx, edx
add eax, 0x14
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, ebx
jl 0x47f6aa
mov eax, dword [esi + 0x54]
xor edx, edx
add eax, 0x18
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, ebx
jl 0x47f6bf
mov eax, dword [esi + 0x54]
mov ecx, dword [ebp - 4]
add eax, 0x1c
push edi
push eax
call fcn.0047f469
mov eax, dword [esi + 0x54]
add eax, 0x1e
push edi
push eax
xor ecx, ecx
call fcn.0047f469
mov eax, dword [esi + 0x54]
add eax, 0x20
push edi
push eax
xor ecx, ecx
call fcn.0047f469
mov eax, dword [esi + 0x54]
add esp, 0x18
xor edx, edx
add eax, 0x22
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, edi
jl 0x47f705
mov eax, dword [esi + 0x54]
mov ebx, dword [ebp + 0xc]
add eax, 0x24
test ebx, ebx
jne 0x47f744
xor edx, edx
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, edi
jl 0x47f721
mov eax, dword [esi + 0x54]
xor edx, edx
add eax, 0x26
xor ecx, ecx
mov byte [ecx + eax], dl
shr edx, 8
inc ecx
cmp ecx, 4
jl 0x47f736
jmp 0x47f763
mov ecx, dword [ebx + 0x1c]
push edi
push eax
call fcn.0047f469
mov eax, dword [esi + 0x54]
pop ecx
pop ecx
mov ecx, dword [ebx + 0x20]
add eax, 0x26
push 4
push eax
call fcn.0047f469
pop ecx
pop ecx
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
add eax, 0x2a
push 4
push eax
call fcn.0047f469
xor eax, eax
pop ecx
pop ecx
cmp dword [ebp - 4], eax
jbe 0x47f790
mov edx, dword [ebp + 8]
mov dl, byte [eax + edx]
mov ecx, dword [esi + 0x54]
mov byte [ecx + eax + 0x2e], dl
inc eax
cmp eax, dword [ebp - 4]
jb 0x47f77d
cmp dword [esi + 0x54], 0
jne 0x47f79e
push 0xffffffffffffff98
pop eax
jmp 0x47f8da
push 4
push dword [esi]
mov ecx, 0x4034b50
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
push edi
push dword [esi]
push 0x14
pop ecx
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
mov ecx, dword [esi + 0x5c]
push edi
push dword [esi]
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
mov ecx, dword [esi + 0x60]
push edi
push dword [esi]
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
mov ecx, dword [esi + 0x4064]
push 4
push dword [esi]
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
push 4
push dword [esi]
xor ecx, ecx
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
push 4
push dword [esi]
xor ecx, ecx
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
push 4
push dword [esi]
xor ecx, ecx
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
mov ecx, dword [ebp - 4]
push edi
push dword [esi]
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
push edi
push dword [esi]
xor ecx, ecx
call fcn.0047f436
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x47f891
cmp dword [ebp - 4], eax
jbe 0x47f891
push dword [esi]
push 1
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0048967f
add esp, 0x10
cmp eax, 1
je 0x47f891
or ebx, 0xffffffff
xor eax, eax
lea ecx, [esi + 0x64]
mov dword [esi + 0x14], eax
mov dword [esi + 0x20], 0x4000
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x18], eax
mov dword [esi + 0x24], eax
cmp ebx, eax
jne 0x47f8d8
cmp dword [esi + 0x60], 8
jne 0x47f8d1
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
lea eax, [esi + 0x10]
call fcn.004813b4
mov ebx, eax
test ebx, ebx
jne 0x47f8d8
mov dword [esi + 0x48], 1
mov dword [esi + 0xc], 1
mov eax, ebx
pop edi
pop ebx
leave
ret