Function at 0x1039a4f
Capabilities:
Clear file content
Write file on windows

Disassembly:
mov eax, 0x10a5ed5
call fcn.0103f400
sub esp, 0x4c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push 6
push 0x40000000
push dword [ebp + 0xc]
mov dword [ebp - 0x28], 0x8007054f
mov dword [esi + 0xa4], 7
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp + 8], edi
cmp edi, 0xffffffff
mov dword [ebp - 4], ebx
jne 0x1039ad5
call fcn.0104c9b5
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
jl 0x1039ab8
or dword [ebp - 4], edi
jmp 0x1039c83
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
call fcn.0103901e
push esi
call fcn.0105d125
mov ebx, eax
jmp 0x1039cc7
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x1039afa
push ebx
lea eax, [ebp + 0xc]
push eax
push 3
push 0x1005468
push edi
mov dword [ebp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1039b30
call fcn.0104c9b5
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
jge 0x1039c78
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
call fcn.0103901e
push esi
call fcn.0105d125
mov ebx, eax
jmp 0x1039cc0
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
push dword [esi + 0x80]
lea edx, [ebp - 0x24]
xor ecx, ecx
mov byte [ebp - 4], 1
call fcn.01046932
mov esi, eax
cmp esi, ebx
jge 0x1039b7a
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
call fcn.0103903e
push esi
call fcn.0105d125
mov ebx, eax
jmp 0x1039cb8
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], ebx
mov esi, 0x1005338
lea edi, [ebp - 0x58]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x10052a8
lea edi, [ebp - 0x4c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x24]
lea edi, [ebp - 0x40]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x58]
push eax
movsd dword es:[edi], dword [esi]
push 3
push ebx
mov byte [ebp - 4], 2
movsd dword es:[edi], dword [esi]
call fcn.01042c9e
mov esi, eax
cmp esi, ebx
jge 0x1039bf6
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
call fcn.0103903e
push esi
call fcn.0105d125
lea ecx, [ebp - 0x18]
mov ebx, eax
call fcn.0102034d
lea ecx, [ebp - 0x24]
call fcn.0102034d
push dword [ebp + 8]
jmp 0x1039cc1
cmp dword [ebp - 0x18], 0xffffffff
jbe 0x1039c3a
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
call fcn.0102034d
lea ecx, [ebp - 0x24]
call fcn.0102034d
push dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], 0x100542c
call fcn.01039078
mov ebx, dword [ebp - 0x28]
jmp 0x1039cc7
mov edi, dword [ebp + 8]
push ebx
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1039cb0
call fcn.0104c9b5
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
jl 0x1039c98
lea ecx, [ebp - 0x18]
call fcn.0102034d
lea ecx, [ebp - 0x24]
call fcn.0102034d
or dword [ebp - 4], 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], 0x100542c
call fcn.01039482
jmp 0x1039c32
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
call fcn.0103901e
push esi
call fcn.0105d125
mov ebx, eax
lea ecx, [ebp - 0x18]
call fcn.0102034d
lea ecx, [ebp - 0x24]
call fcn.0102034d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, ebx
pop ebx
mov dword fs:[0], ecx
leave
ret 8