Function at 0x410a50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x858
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x4a7f38]
mov ecx, dword [esi + 0x4a7f3c]
mov edx, dword [eax + 0xb8]
mov eax, dword [eax + 0xbc]
push edi
mov edi, dword [ecx + 0xb8]
mov ecx, dword [ecx + 0xbc]
cmp eax, ecx
lea ebp, [esi + 0x48a9f0]
mov dword [esp + 0x58], ebp
jg 0x410aac
jl 0x410a9a
cmp edx, edi
jae 0x410aac
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ecx
jmp 0x410ac8
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov eax, ecx
mov ecx, dword [esp + 0x2c]
mov edi, edx
mov edx, dword [esp + 0x20]
cmp edx, edi
jne 0x410ad4
cmp eax, ecx
je 0x410e74
xor ebx, ebx
sub edi, edx
sbb ecx, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edi
fild qword [esp + 0x18]
push 0xcf
mov dword [esp + 0x3c], ebx
fstp qword [esp + 0x44]
call fcn.004124e0
mov edx, dword [esi + 0x48ba08]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
add esp, 4
push eax
push 2
push 0x400
push edx
call edi
mov ecx, dword [esi + 0x4a7f34]
push ebx
push ebx
push ebx
push 1
push ebp
call fcn.004016a0
push ebx
push 0x20
push 3
push ebx
push ebx
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x30], ebp
jne 0x410b61
mov eax, dword [esi + 0x48ba08]
push 0x64
push 1
push 0x400
push eax
call edi
mov dword [esi + 0x48ba08], ebx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi + 0x4a7f34]
mov edi, dword [ecx + 0x2c]
imul edi, dword [esi + 0x48b5f4]
shl edi, 2
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x50], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
mov ecx, edi
mov ebx, ecx
shr ecx, 2
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 0x4a7f34]
mov ebx, dword [eax + 0x2c]
mov eax, dword [esi + 0x48b5f4]
test eax, eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x10], 0
jbe 0x410c44
mov dword [esp + 0x14], edx
xor edi, edi
test ebx, ebx
jle 0x410c20
mov ebp, edx
lea esp, [esp]
mov eax, dword [esi + 0x48b5f4]
mov ecx, dword [esp + 0x10]
cdq
sub eax, edx
sar eax, 1
cdq
sub ecx, eax
mov eax, 0
sbb eax, edx
add ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
push edi
adc eax, edx
push eax
push ecx
mov ecx, dword [esi + 0x4a7f34]
call fcn.004014c0
inc edi
fstp dword [ebp]
add ebp, 4
cmp edi, ebx
jl 0x410be0
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
lea eax, [ebx*4]
add edx, eax
mov eax, dword [esi + 0x48b5f4]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
jb 0x410bd4
mov edi, dword [esp + 0x24]
cmp edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
jg 0x410e16
jl 0x410c6a
cmp eax, dword [esp + 0x28]
jae 0x410e16
fld qword [0x42c5b8]
fdiv qword [esp + 0x40]
fstp qword [esp + 0x60]
jmp 0x410c82
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
sub edx, eax
mov eax, dword [esp + 0x1c]
sbb eax, edi
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
fild qword [esp + 0x40]
fmul qword [esp + 0x60]
fmul qword [0x42b6c0]
call fcn.00416c6c
mov ebp, eax
cmp ebp, dword [esp + 0x38]
je 0x410cca
mov ecx, dword [esi + 0x48ba08]
push ebp
push 1
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x38], ebp
xor ebp, ebp
test ebx, ebx
mov dword [esp + 0x14], ebp
jle 0x410da6
mov eax, dword [esp + 0x3c]
lea edi, [esp + 0x68]
mov ecx, edi
lea edx, [esi + 0x48b1f0]
sub eax, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x10]
cmp dword [edx], 0
jne 0x410d0b
mov eax, dword [esi + 0x4a7f34]
cmp dword [eax + 0x30], 1
je 0x410d8f
mov eax, dword [esi + 0x48b5f4]
mov ecx, dword [esp + 0x18]
cdq
sub eax, edx
sar eax, 1
cdq
add eax, ecx
mov ecx, dword [esp + 0x1c]
push ebp
adc edx, ecx
mov ecx, dword [esi + 0x4a7f34]
push edx
push eax
call fcn.004014c0
mov edx, dword [esp + 0x3c]
mov ecx, ebx
imul ecx, dword [esp + 0x34]
add ecx, ebp
mov dword [edi], 0
fstp dword [edx + ecx*4]
mov eax, dword [esi + 0x48b5f4]
test eax, eax
mov dword [esp + 0x54], eax
jle 0x410d79
mov eax, dword [esp + 0x50]
fld dword [0x42e870]
mov ecx, dword [esi + 0x48b5f4]
lea edx, [ebx*4]
add eax, edi
mov edi, edi
fadd dword [eax]
add eax, edx
dec ecx
jne 0x410d70
fstp dword [edi]
fild dword [esp + 0x54]
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
fdivr dword [edi]
fstp dword [esp + eax*4 + 0x464]
mov edx, dword [esp + 0x10]
inc ebp
add edx, 4
add edi, 4
cmp ebp, ebx
mov dword [esp + 0x10], edx
jl 0x410cf2
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x60]
push ecx
lea eax, [edx*4]
mov edx, dword [esp + 0x38]
push eax
lea ecx, [esp + 0x474]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x34]
inc eax
cdq
idiv dword [esi + 0x48b5f4]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
add edi, 1
adc eax, 0
cmp eax, ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], edx
jl 0x410c7a
jg 0x410e0e
mov ecx, dword [esp + 0x28]
mov eax, edi
cmp eax, ecx
jb 0x410c7a
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x4c]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x20]
push edi
push ecx
push ebp
mov ecx, esi
call fcn.004103b0
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi + 0x48ba08]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push edx
call edi
mov eax, dword [esp + 0x58]
push eax
push 1
mov dword [esi + 0x48ba08], 0
mov ecx, dword [0x43c480]
push 0x400
push ecx
call edi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret