Function at 0x47a5c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5cd9a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ecx
push edi
test esi, esi
je 0x47a809
test eax, eax
je 0x47a809
test ecx, ecx
je 0x47a809
mov edi, dword [eax]
mov dword [eax + 4], edi
test edi, edi
je 0x47a81e
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
add edi, 4
je 0x47a7f5
test ebx, ebx
jne 0x47a7f5
mov eax, dword [edi + 8]
sub eax, 1
je 0x47a781
sub eax, 1
je 0x47a6db
sub eax, 1
jne 0x47a809
mov eax, dword [edi]
mov ecx, esi
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], ebx
push eax
mov dword [ebp - 0x18], ebx
call fcn.004790c0
test eax, eax
je 0x47a7d1
mov ebx, dword [ebp - 0x18]
push 0
push 0
push dword [ebp - 0x14]
mov dword [esi + 0x18], ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x47a683
mov dword [esi + 0x28], 0xa
jmp 0x47a7d1
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x17fa
push dword [ebp - 0x20]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x47a6cf
cmp dword [ebp - 8], 0x17fa
jne 0x47a6cf
push 1
push ebx
mov ecx, esi
call fcn.0047a4b0
test eax, eax
je 0x47a7d1
mov eax, dword [edi]
mov dword [eax + 0x17ee], ebx
mov ebx, dword [ebp - 0x1c]
jmp 0x47a7d9
mov dword [esi + 0x28], 4
jmp 0x47a7d1
mov edi, dword [edi]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], 0
push eax
push dword [edi + 0x17ee]
mov ecx, esi
mov dword [ebp - 0x18], 0
call fcn.00478f80
test eax, eax
je 0x47a7d1
cmp dword [ebp - 0x14], 0
jne 0x47a7ca
cmp byte [ebp - 0xd], 0
je 0x47a7ca
push 0
push 0
push dword [ebp - 0x18]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x47a744
mov dword [esi + 0x28], 0xa
jmp 0x47a7d1
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x17fa
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x47a6cf
cmp dword [ebp - 0xc], 0x17fa
jne 0x47a6cf
mov ecx, esi
call fcn.00479a90
test eax, eax
jne 0x47a7d9
jmp 0x47a7d1
mov edi, dword [edi + 4]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], 0
push eax
push edi
mov ecx, esi
mov dword [ebp - 0x20], 0
call fcn.00478f80
test eax, eax
je 0x47a7d1
cmp dword [ebp - 0x14], 0
jne 0x47a7ca
cmp byte [ebp - 0xd], 0
je 0x47a7ca
push 0
push edi
mov ecx, esi
call fcn.0047a4b0
test eax, eax
jne 0x47a7d9
jmp 0x47a7d1
mov dword [esi + 0x28], 9
mov ebx, 1
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x24]
mov edi, dword [eax + 4]
test edi, edi
je 0x47a7f5
mov edi, dword [edi]
mov dword [eax + 4], edi
test edi, edi
je 0x47a7f5
add edi, 4
jne 0x47a615
mov ecx, esi
call fcn.00478560
test ebx, ebx
je 0x47a825
mov eax, dword [ebp - 0x28]
mov dword [eax], 1
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ce1ec
mov esp, ebp
pop ebp
ret 0xc
mov ecx, esi
call fcn.00478560
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ce1ec
mov esp, ebp
pop ebp
ret 0xc