Function at 0x4120e5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc58
mov eax, dword [edi + 0x10cc07c]
mov ecx, dword [edi + 0x10cc080]
mov edx, dword [eax + 0xe0]
mov eax, dword [eax + 0xe4]
push ebx
mov ebx, dword [ecx + 0xe0]
mov ecx, dword [ecx + 0xe4]
cmp eax, ecx
push esi
lea esi, [edi + 0x10969f8]
mov dword [ebp - 0x34], esi
jg 0x412135
jl 0x412127
cmp edx, ebx
jae 0x412135
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ecx
jmp 0x412141
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jne 0x412155
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x1c]
je 0x412390
mov ecx, dword [ebp - 0x20]
and dword [ebp - 0x30], 0
sub ecx, eax
mov eax, dword [ebp - 0x1c]
sbb eax, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
fild qword [ebp - 8]
push 0xcc
fstp qword [ebp - 0x58]
call fcn.0041482f
pop ecx
push eax
push 2
mov ebx, 0x400
push ebx
push dword [edi + 0x1097a10]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [0x44b3c0]
push 0
lea ecx, [eax + 0x4c9c]
push ecx
add eax, 0x489c
push eax
push 1
push esi
mov esi, dword [edi + 0x10cc078]
call fcn.0040282c
xor esi, esi
push esi
push 0x20
push 3
push esi
push esi
push 0x40000000
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x2c], eax
jne 0x4121ed
push 0x64
push 1
push ebx
push dword [edi + 0x1097a10]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [edi + 0x1097a10], esi
jmp 0x412390
push 2
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x44b3c0]
add eax, 0x489c
push ebx
push eax
lea eax, [ebp - 0x458]
push eax
call fcn.004208b0
mov eax, dword [0x44b3c0]
add esp, 0xc
add eax, 0x4c9c
push ebx
push eax
lea eax, [ebp - 0x858]
push eax
call fcn.004208b0
mov eax, dword [edi + 0x10cc078]
mov ecx, dword [eax + 0x2c]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x10]
add esp, 0xc
cmp eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
jg 0x412344
jl 0x412260
cmp ecx, dword [ebp - 0x20]
jae 0x412344
xor eax, eax
cmp dword [ebp - 0x38], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], eax
jle 0x4122e2
lea ecx, [edi + 0x10971f8]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x14]
cmp dword [ecx], esi
jne 0x412283
cmp dword [ebp - 0x3c], 1
je 0x4122b2
push dword [ebp - 4]
mov ecx, dword [edi + 0x10cc078]
push dword [ebp - 8]
call fcn.004024f3
mov eax, dword [ebp - 0x28]
fmul dword [ebp + eax*4 - 0x458]
fadd dword [ebp + eax*4 - 0x858]
mov eax, dword [ebp - 0x24]
inc dword [ebp - 0x24]
fstp dword [ebp + eax*4 - 0xc58]
mov eax, dword [ebp - 0x28]
add dword [ebp - 0x14], 4
inc eax
cmp eax, dword [ebp - 0x38]
mov dword [ebp - 0x28], eax
jl 0x412276
mov eax, dword [ebp - 0x24]
cmp eax, esi
jle 0x4122e2
push esi
lea ecx, [ebp - 0x4c]
push ecx
shl eax, 2
push eax
lea eax, [ebp - 0xc58]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
sbb ecx, dword [ebp - 0xc]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
fild qword [ebp - 0x48]
fdiv qword [ebp - 0x58]
fmul qword [0x4416e0]
call fcn.004248a0
cmp eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
je 0x412323
push eax
push 1
push ebx
push dword [edi + 0x1097a10]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
add dword [ebp - 8], 1
adc dword [ebp - 4], esi
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x1c]
jl 0x412260
jg 0x412344
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 8], eax
jb 0x412260
push dword [ebp - 0xc]
mov ebx, dword [ebp - 0x2c]
push dword [ebp - 0x10]
mov ecx, edi
call fcn.00412eeb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
xor eax, eax
push 0x64
inc eax
push eax
mov ebx, 0x400
push ebx
push dword [edi + 0x1097a10]
mov dword [edi + 0x1097a30], eax
call esi
push dword [ebp - 0x34]
and dword [edi + 0x1097a10], 0
push 1
push ebx
push dword [0x44b424]
call esi
pop esi
pop ebx
leave
ret