Function at 0x413190
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x440
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x10cc07c]
mov ebx, dword [eax + 0xe0]
mov edx, dword [edi + 0x10cc080]
mov ebp, dword [eax + 0xe4]
mov ecx, dword [edx + 0xe0]
mov eax, dword [edx + 0xe4]
cmp ebp, eax
lea esi, [edi + 0x10969f8]
mov dword [esp + 0x38], esi
jg 0x4131ec
jl 0x4131da
cmp ebx, ecx
jae 0x4131ec
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x413208
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
mov ebx, ecx
mov ecx, dword [esp + 0x10]
mov ebp, eax
mov eax, dword [esp + 0x14]
cmp ebx, ecx
jne 0x413214
cmp ebp, eax
je 0x41343f
sub ecx, ebx
sbb eax, ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
push 0xcc
mov dword [esp + 0x30], 0
fstp qword [esp + 0x34]
call fcn.004159d0
add esp, 4
push eax
mov eax, dword [edi + 0x1097a10]
push 2
push 0x400
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [edi + 0x10cc078]
push 0
lea eax, [edi + 0x10cbbb4]
push eax
push esi
call fcn.00401e50
push 0
push 0x20
push 3
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x3c], esi
jne 0x4132b0
mov ecx, dword [edi + 0x1097a10]
push 0x64
push 1
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [edi + 0x1097a10], 0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp ebp, dword [esp + 0x14]
mov edx, dword [edi + 0x10cbbb4]
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], ebx
jg 0x4133ee
jl 0x4132e1
cmp ebx, dword [esp + 0x10]
jae 0x4133ee
fld qword [0x4307c8]
fdiv qword [esp + 0x30]
fstp qword [esp + 0x40]
nop
mov eax, dword [esp + 0x28]
xor ebx, ebx
test eax, eax
jle 0x413353
lea esi, [edi + 0x10cbbb8]
mov eax, dword [esi + 0x80]
mov ecx, dword [esp + 0x18]
dec eax
push eax
push ebp
push ecx
mov ecx, dword [edi + 0x10cc078]
call fcn.004014c0
fimul dword [esi]
mov edx, dword [esi + 0x84]
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0x10cc078]
dec edx
push edx
push ebp
push eax
fstp dword [esp + ebx*4 + 0x5c]
call fcn.004014c0
fimul dword [esi + 4]
mov eax, dword [esp + 0x28]
inc ebx
add esi, 8
cmp ebx, eax
fadd dword [esp + ebx*4 + 0x4c]
fstp dword [esp + ebx*4 + 0x4c]
jl 0x413300
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x50]
push ecx
shl eax, 2
push eax
lea edx, [esp + 0x5c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, ebx
mov ecx, ebp
sbb ecx, edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
fild qword [esp + 0x30]
fmul qword [esp + 0x40]
fmul qword [0x42f6f0]
call fcn.0041a7f8
mov ebx, eax
cmp ebx, dword [esp + 0x2c]
je 0x4133bc
mov edx, dword [edi + 0x1097a10]
push ebx
push 1
push 0x400
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x2c], ebx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
add edx, 1
adc ebp, 0
cmp ebp, eax
mov dword [esp + 0x18], edx
jl 0x4132f0
jg 0x4133e6
mov eax, dword [esp + 0x10]
mov ecx, edx
cmp ecx, eax
jb 0x4132f0
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
push ebp
push ebx
push esi
mov ecx, edi
call fcn.00411a40
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0x1097a10]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push ecx
mov dword [edi + 0x1097a30], 1
call esi
mov edx, dword [esp + 0x38]
push edx
push 1
mov dword [edi + 0x1097a10], 0
mov eax, dword [0x4405b4]
push 0x400
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret