Function at 0x486ea8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
mov ebx, ecx
xor esi, esi
cmp dword [ebx + 0x10], esi
jne 0x486ec1
xor eax, eax
inc eax
jmp 0x48714a
push edi
push esi
push esi
push esi
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
lea esi, [ebx + 0x1c]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
mov ecx, 0x314
cdq
idiv ecx
test eax, eax
jbe 0x48705f
push 6
pop ecx
push dword [ebp - 4]
xor eax, eax
lea edi, [ebp - 0x40]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, esi
mov dword [ebp - 0x44], 0x4034b50
call fcn.00486c08
lea ecx, [ebp - 0x44]
push ecx
push dword [eax]
mov ecx, ebx
call fcn.00486bb4
test eax, eax
je 0x48714e
push 0x104
push 0
push dword [ebp - 4]
mov ecx, esi
call fcn.00486c08
mov edi, 0x20c
add eax, edi
push eax
call fcn.0049d740
add esp, 0xc
push 0
push 0
push 0x104
push dword [ebp - 4]
mov ecx, esi
call fcn.00486c08
add eax, edi
push eax
push 0xffffffffffffffff
push dword [ebp - 4]
mov ecx, esi
call fcn.00486c08
add eax, 4
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x48714e
push dword [ebp - 4]
lea edi, [eax - 1]
mov ecx, esi
mov word [ebp - 0x2a], di
call fcn.00486c08
mov eax, dword [eax]
push dword [ebp - 4]
mov ecx, esi
mov word [eax + 0x1c], di
call fcn.00486c08
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [eax + 0x2a], ecx
push 0
lea eax, [ebp - 8]
push eax
push 0x1e
lea eax, [ebp - 0x44]
push eax
push dword [ebx + 4]
call edi
test eax, eax
je 0x48714e
mov eax, dword [ebp - 8]
add dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 8]
push eax
movzx eax, word [ebp - 0x2a]
push eax
push dword [ebp - 4]
mov ecx, esi
call fcn.00486c08
add eax, 0x20c
push eax
push dword [ebx + 4]
call edi
test eax, eax
je 0x48714e
mov eax, dword [ebp - 8]
add dword [ebp - 0xc], eax
cmp dword [ebp - 0x32], 0
je 0x487045
push dword [ebp - 4]
mov ecx, esi
call fcn.00486c08
cmp dword [eax + 0x310], 0
je 0x487045
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x32]
mov ecx, esi
push dword [ebp - 4]
call fcn.00486c08
push dword [eax + 0x310]
push dword [ebx + 4]
call edi
test eax, eax
je 0x48714e
mov eax, dword [ebp - 8]
add dword [ebp - 0xc], eax
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
mov ecx, 0x314
cdq
idiv ecx
inc dword [ebp - 4]
cmp dword [ebp - 4], eax
jb 0x486ef9
xor eax, eax
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x20], ax
mov word [ebp - 0x1e], ax
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
mov ecx, 0x314
cdq
mov edi, ecx
idiv edi
xor edi, edi
mov dword [ebp - 0x24], 0x6054b50
mov word [ebp - 0x1c], ax
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
cdq
idiv ecx
mov word [ebp - 0x1a], ax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
xor eax, eax
mov word [ebp - 0x10], ax
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
mov dword [ebp - 0xc], edi
cdq
idiv ecx
test eax, eax
jbe 0x48712b
push dword [ebp - 0xc]
mov ecx, esi
call fcn.00486c08
push 0
lea ecx, [ebp - 8]
push ecx
push 0x2e
push dword [eax]
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x48714e
push dword [ebp - 0xc]
add edi, dword [ebp - 8]
mov ecx, esi
call fcn.00486c08
mov eax, dword [eax]
movzx eax, word [eax + 0x1c]
push 0
lea ecx, [ebp - 8]
push ecx
push eax
push dword [ebp - 0xc]
mov ecx, esi
call fcn.00486c08
add eax, 0x20c
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x48714e
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
mov ecx, 0x314
cdq
idiv ecx
add edi, dword [ebp - 8]
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], eax
jb 0x4870ba
push 0
lea eax, [ebp - 8]
push eax
push 0x16
lea eax, [ebp - 0x24]
push eax
push dword [ebx + 4]
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ebx
leave
ret
xor eax, eax
jmp 0x487149