Function at 0x47c7e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c6748
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
push esi
push edi
mov dword [esp + 0x18], ecx
jne 0x47c823
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ecx + 0x24]
mov edx, dword [eax]
test edx, edx
je 0x47c85c
mov eax, dword [ecx + 0x34]
mov esi, dword [eax]
add esi, edx
cmp edx, esi
jae 0x47c85c
add dword [eax], 0xffffffff
mov eax, dword [ecx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x47cbb4
cmp dword [ecx + 0x3c], 0
jne 0x47c899
push eax
movsx eax, bl
push eax
call fcn.0049823c
add esp, 8
cmp eax, 0xffffffff
je 0x47cbb4
mov eax, ebx
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, 0xf
xor eax, eax
cmp ecx, 0x10
mov byte [esp + 0x30], 0
mov byte [esp + 0x13], bl
mov dword [esp + 0x44], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], 8
jae 0x47c8c6
lea eax, [esp + 0x30]
mov byte [eax + 8], 0
mov dword [esp + 0x54], 0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
cmp edx, 0x10
jb 0x47ca9a
test ecx, ecx
mov esi, ecx
mov dword [esp + 0x14], esi
je 0x47c911
cmp edx, 0x10
mov eax, ecx
jae 0x47c8f8
lea eax, [esp + 0x30]
cmp eax, esi
ja 0x47c911
cmp edx, 0x10
mov eax, ecx
jae 0x47c907
lea eax, [esp + 0x30]
mov edi, dword [esp + 0x40]
add eax, edi
cmp esi, eax
jbe 0x47c91e
call fcn.0049458d
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x2c]
cmp eax, 0xfffffffe
je 0x47c949
cmp edx, 0x10
mov eax, ecx
jae 0x47c932
lea eax, [esp + 0x30]
mov edi, dword [esp + 0x40]
add eax, edi
cmp esi, eax
jb 0x47c949
call fcn.0049458d
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
cmp edx, 0x10
mov ebx, dword [esp + 0x40]
jb 0x47caa9
test ecx, ecx
mov edi, ecx
je 0x47c980
cmp edx, 0x10
mov eax, ecx
jae 0x47c967
lea eax, [esp + 0x30]
cmp eax, edi
ja 0x47c980
cmp edx, 0x10
mov eax, ecx
jae 0x47c976
lea eax, [esp + 0x30]
mov esi, dword [esp + 0x40]
add eax, esi
cmp edi, eax
jbe 0x47c98d
call fcn.0049458d
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x2c]
cmp eax, 0xfffffffe
je 0x47c9b0
cmp edx, 0x10
mov eax, ecx
jae 0x47c9a1
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x40]
add eax, ecx
cmp edi, eax
jb 0x47c9b0
call fcn.0049458d
mov esi, dword [esp + 0x18]
mov ecx, dword [esi + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x18]
add eax, ebx
push eax
push edi
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x27]
push eax
lea eax, [esi + 0x44]
push eax
call edx
test eax, eax
jl 0x47cbab
cmp eax, 1
jg 0x47cb32
mov edx, dword [esp + 0x44]
cmp edx, 0x10
mov ecx, dword [esp + 0x30]
jb 0x47cab2
test ecx, ecx
mov edi, ecx
je 0x47ca2a
cmp edx, 0x10
mov eax, ecx
jae 0x47ca11
lea eax, [esp + 0x30]
cmp eax, edi
ja 0x47ca2a
cmp edx, 0x10
mov eax, ecx
jae 0x47ca20
lea eax, [esp + 0x30]
mov esi, dword [esp + 0x40]
add eax, esi
cmp edi, eax
jbe 0x47ca37
call fcn.0049458d
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x2c]
cmp eax, 0xfffffffe
je 0x47ca62
cmp edx, 0x10
mov eax, ecx
jae 0x47ca4b
lea eax, [esp + 0x30]
mov esi, dword [esp + 0x40]
add eax, esi
cmp edi, eax
jb 0x47ca62
call fcn.0049458d
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x1c]
sub esi, edi
je 0x47caf4
lea ebx, [esp + 0x24]
lea edi, [esp + 0x2c]
call fcn.0047d3a0
mov edi, eax
mov eax, dword [edi]
cmp eax, 0xfffffffe
je 0x47cacd
test eax, eax
jne 0x47ca8d
call fcn.0049458d
mov eax, dword [edi]
cmp dword [eax + 0x18], 0x10
jb 0x47cabb
mov ecx, dword [eax + 4]
jmp 0x47cabe
lea eax, [esp + 0x30]
mov dword [esp + 0x14], eax
mov esi, eax
jmp 0x47c8ed
lea edi, [esp + 0x30]
jmp 0x47c95c
lea edi, [esp + 0x30]
jmp 0x47ca06
lea ecx, [eax + 4]
mov edx, dword [eax + 0x14]
add edx, ecx
cmp dword [edi + 4], edx
jb 0x47cacd
call fcn.0049458d
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x4c]
mov edi, dword [edi + 4]
push ecx
push esi
push 1
push edi
call fcn.00494974
add esp, 0x10
cmp esi, eax
jne 0x47cbab
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
mov byte [eax + 0x41], 1
lea eax, [esp + 0x13]
cmp dword [esp + 0x20], eax
jne 0x47cb8b
test esi, esi
ja 0x47c8da
cmp dword [esp + 0x40], 0x20
jae 0x47cbab
push 0
mov eax, 8
lea edi, [esp + 0x30]
call fcn.0041ee70
jmp 0x47c8d2
cmp eax, 3
jne 0x47cbab
mov eax, dword [esi + 0x4c]
mov cl, byte [esp + 0x13]
call fcn.0047c570
test al, al
je 0x47cb69
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x2c]
call fcn.004040a0
mov eax, esi
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x2c]
or esi, 0xffffffff
call fcn.004040a0
mov eax, esi
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x2c]
call fcn.004040a0
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x2c]
call fcn.004040a0
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
or eax, 0xffffffff
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4