Function at 0x412394
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1458
call fcn.00424e40
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 - 0x40], esi
jg 0x4123e8
jl 0x4123da
cmp edx, ebx
jae 0x4123e8
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ecx
jmp 0x4123f4
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 0x412408
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x1c]
je 0x4126ed
mov ecx, dword [ebp - 0x20]
xor ebx, ebx
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
mov dword [ebp - 0x38], ebx
fstp qword [ebp - 0x58]
call fcn.0041482f
pop ecx
push eax
push 2
push 0x400
push dword [edi + 0x1097a10]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [edi + 0x10cc078]
fld dword [eax + 0x4ff0]
lea ecx, [ebp - 0x24]
push ecx
fstp qword [ebp - 8]
fld qword [ebp - 8]
push ebx
push ebx
fstp dword [ebp - 0x24]
push 1
push esi
mov esi, eax
call fcn.0040282c
push ebx
push 0x20
push 3
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x4124a5
push 0x64
push 1
push 0x400
push dword [edi + 0x1097a10]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [edi + 0x1097a10], ebx
jmp 0x4126ed
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 0x10cc078]
mov eax, dword [eax + 0x2c]
mov esi, 0x800
push esi
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0xc58]
push ebx
push eax
call fcn.004204c0
add esp, 0xc
push 0x400
lea eax, [ebp - 0x458]
push ebx
push eax
call fcn.004204c0
fld dword [edi + 0x10cc074]
add esp, 0xc
fstp qword [ebp - 0x48]
push esi
lea eax, [ebp - 0x1458]
push ebx
push eax
call fcn.004204c0
fld qword [ebp - 0x48]
fmul qword [ebp - 8]
add esp, 0xc
mov dword [ebp - 0x2c], ebx
fdiv qword [0x4416c8]
call fcn.004248d6
mov ecx, dword [ebp - 0x10]
mov esi, eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], esi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
jg 0x4126a5
jl 0x41253a
cmp ecx, dword [ebp - 0x20]
jae 0x4126a5
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 - 0x38]
mov dword [ebp - 0x14], eax
je 0x41257f
push eax
push 1
push 0x400
push dword [edi + 0x1097a10]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
xor eax, eax
cmp dword [ebp - 0x3c], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], eax
jle 0x41265e
lea ecx, [edi + 0x10971f8]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x30]
cmp dword [ecx], ebx
jne 0x4125b0
mov ecx, dword [edi + 0x10cc078]
cmp dword [ecx + 0x30], 1
je 0x41264a
push dword [ebp - 4]
mov ecx, dword [edi + 0x10cc078]
push dword [ebp - 8]
call fcn.004024f3
fstp dword [ebp - 0x34]
mov eax, dword [ebp - 0x18]
fld dword [ebp - 0x34]
shl eax, 3
fld st(0)
lea esi, [ebp + eax - 0xc58]
fmulp st(1)
lea eax, [ebp + eax - 0x1458]
add dword [eax], 1
fadd qword [esi]
adc dword [eax + 4], ebx
mov ecx, dword [eax + 4]
fstp qword [esi]
cmp ecx, ebx
jl 0x41261c
jg 0x4125f9
mov eax, dword [eax]
cmp eax, dword [ebp - 0x28]
jbe 0x41261c
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 4]
sbb ecx, ebx
push ecx
mov ecx, dword [edi + 0x10cc078]
push eax
mov eax, dword [ebp - 0x18]
call fcn.004024f3
fld st(0)
fmulp st(1)
fsubr qword [esi]
fstp qword [esi]
mov eax, dword [ebp - 0x28]
fild dword [ebp - 0x28]
test eax, eax
jge 0x41262c
fadd qword [0x4416b8]
fdivr qword [esi]
push ecx
push ecx
fstp qword [esp]
call fcn.00421b74
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x14]
fstp dword [ebp + eax*4 - 0x458]
mov esi, dword [ebp - 0x28]
pop ecx
pop ecx
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x30], 4
inc eax
cmp eax, dword [ebp - 0x3c]
mov dword [ebp - 0x18], eax
jl 0x412599
mov eax, dword [ebp - 0x2c]
inc dword [ebp - 0x2c]
cmp eax, esi
jbe 0x412684
push ebx
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x14]
shl eax, 2
push eax
lea eax, [ebp - 0x458]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [ebp - 8], 1
adc dword [ebp - 4], ebx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x1c]
jl 0x41253a
jg 0x4126a5
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 8], eax
jb 0x41253a
mov ebx, dword [ebp - 0x24]
xor eax, eax
add esi, dword [ebp - 0x10]
mov ecx, edi
adc eax, dword [ebp - 0xc]
push eax
push esi
call fcn.00412eeb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
mov ebx, 0x400
push ebx
push dword [edi + 0x1097a10]
call esi
push dword [ebp - 0x40]
and dword [edi + 0x1097a10], 0
push 1
push ebx
push dword [0x44b424]
call esi
pop esi
pop ebx
leave
ret