Function at 0x412c70
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1488
call fcn.0041b460
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x10cc07c]
mov ecx, dword [ebx + 0x10cc080]
mov edx, dword [eax + 0xe0]
mov eax, dword [eax + 0xe4]
push ebp
push esi
mov esi, dword [ecx + 0xe0]
mov ecx, dword [ecx + 0xe4]
cmp eax, ecx
push edi
lea edi, [ebx + 0x10969f8]
mov dword [esp + 0x5c], edi
jg 0x412cd2
jl 0x412cbe
cmp edx, esi
jae 0x412cd2
mov ebp, esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ecx
jmp 0x412cee
mov dword [esp + 0x20], edx
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ecx
mov eax, ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x10], esi
mov edx, esi
cmp edx, ebp
jne 0x412cfa
cmp eax, ecx
je 0x413183
sub ebp, edx
sbb ecx, eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], ebp
fild qword [esp + 0x30]
push 0xcc
mov dword [esp + 0x40], 0
fstp qword [esp + 0x54]
call fcn.004159d0
mov edx, dword [ebx + 0x1097a10]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
add esp, 4
push eax
push 2
push 0x400
push edx
call esi
mov ecx, dword [ebx + 0x10cc078]
lea ebp, [ebx + 0x10cc074]
push ebp
push 0
push 0
push 1
push edi
call fcn.00401850
push 0
push 0x20
push 3
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x40], eax
jne 0x412d96
mov eax, dword [ebx + 0x1097a10]
push 0x64
push 1
push 0x400
push eax
call esi
mov dword [ebx + 0x1097a10], 0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebx + 0x10cc078]
mov edx, dword [ecx + 0x2c]
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0x498]
xor esi, esi
test edx, edx
mov dword [esp + 0x2c], edx
rep stosd dword es:[edi], eax
jle 0x412e06
jmp 0x412de0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x10cc078]
push esi
push edx
push eax
call fcn.004014c0
fstp dword [esp + esi*4 + 0x498]
mov eax, dword [esp + 0x2c]
inc esi
cmp esi, eax
jl 0x412de0
fld qword [0x42f9e0]
mov ecx, dword [ebx + 0x10cc078]
mov edx, dword [esp + 0x24]
fstp qword [esp + 0x60]
fld dword [ecx + 0x4ff0]
xor eax, eax
mov ecx, 0x100
fstp qword [esp + 0x68]
fld qword [0x42f9e0]
lea edi, [esp + 0x898]
rep stosd dword es:[edi], eax
fstp qword [esp + 0x30]
fld dword [ebp]
fstp qword [esp + 0x70]
mov ecx, 0x100
lea edi, [esp + 0x1098]
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0xc98]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
cmp eax, edx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
jg 0x413138
jl 0x412e85
cmp ecx, dword [esp + 0x20]
jae 0x413138
fld qword [0x4307c8]
fdiv qword [esp + 0x50]
fstp qword [esp + 0x88]
fld qword [0x4307c8]
fdiv qword [esp + 0x68]
fstp qword [esp + 0x78]
fld qword [0x4307c8]
fdiv qword [esp + 0x70]
fstp qword [esp + 0x90]
jmp 0x412ec0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
nop
mov edx, dword [esp + 0x18]
sub edx, ecx
mov ecx, dword [esp + 0x1c]
sbb ecx, eax
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], ecx
fild qword [esp + 0x50]
fmul qword [esp + 0x88]
fmul qword [0x42f6f0]
call fcn.0041a7f8
mov esi, eax
cmp esi, dword [esp + 0x3c]
je 0x412f0b
mov edx, dword [ebx + 0x1097a10]
push esi
push 1
push 0x400
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x3c], esi
mov eax, dword [esp + 0x2c]
xor ebp, ebp
xor edi, edi
xor esi, esi
cmp eax, ebp
jle 0x4130a3
lea eax, [ebx + 0x10971f8]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x28]
cmp dword [ecx], ebp
jne 0x412f3f
mov edx, dword [ebx + 0x10cc078]
cmp dword [edx + 0x30], 1
je 0x41308b
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push esi
push eax
push ecx
mov ecx, dword [ebx + 0x10cc078]
call fcn.004014c0
fld dword [esp + esi*4 + 0xc98]
fld st(0)
fmulp st(1)
fld st(1)
fmul st(2)
fld st(2)
fcomp dword [0x432af8]
fnstsw ax
test ah, 0x41
jne 0x412f7a
mov edx, 1
jmp 0x412f90
fld st(2)
fcomp dword [0x432af8]
fnstsw ax
test ah, 5
jp 0x412f8e
or edx, 0xffffffff
jmp 0x412f90
xor edx, edx
cmp edx, dword [esp + esi*4 + 0x1098]
jle 0x41304d
cmp edx, ebp
jle 0x41304d
mov ecx, dword [esp + esi*4 + 0x898]
mov dword [esp + 0x4c], ecx
fild dword [esp + 0x4c]
fld qword [esp + 0x68]
fmul qword [0x430870]
fld qword [esp + 0x70]
fmul qword [0x430868]
fdivp st(1)
fcompp
fnstsw ax
test ah, 5
jp 0x41304d
cmp ecx, ebp
fld dword [esp + esi*4 + 0xc98]
fabs
fld st(3)
fabs
fst dword [esp + 0x48]
fadd st(1)
fld dword [0x43050c]
fdiv st(1)
fstp dword [esp + 0x44]
fstp st(0)
fld st(2)
fmul dword [0x430864]
fmulp st(1)
fmul dword [esp + 0x44]
fadd dword [esp + esi*4 + 0x98]
fst dword [esp + 0x38]
fstp dword [esp + esi*4 + 0x98]
jle 0x413024
fild dword [esp + 0x4c]
fdivr dword [esp + 0x38]
fsqrt
jmp 0x413028
fld dword [esp + 0x38]
fstp dword [esp + edi*4 + 0x498]
mov dword [esp + esi*4 + 0x898], ebp
fld dword [0x430864]
fmul st(1)
fmul dword [esp + 0x44]
fmul dword [esp + 0x48]
fstp dword [esp + esi*4 + 0x98]
mov eax, dword [esp + esi*4 + 0x898]
cmp eax, ebp
jle 0x413070
fadd st(1)
fmul dword [0x430864]
fadd dword [esp + esi*4 + 0x98]
fstp dword [esp + esi*4 + 0x98]
jmp 0x413072
fstp st(0)
inc eax
fstp st(0)
fstp dword [esp + esi*4 + 0xc98]
mov dword [esp + esi*4 + 0x1098], edx
mov dword [esp + esi*4 + 0x898], eax
inc edi
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
inc esi
add ecx, 4
cmp esi, eax
mov dword [esp + 0x28], ecx
jl 0x412f27
fld qword [esp + 0x60]
fadd qword [0x4307c8]
fstp qword [esp + 0x60]
fld qword [esp + 0x78]
fmul qword [esp + 0x60]
fld qword [esp + 0x90]
fmul qword [esp + 0x30]
fcompp
fnstsw ax
test ah, 0x41
jp 0x4130ff
fld qword [esp + 0x30]
push ebp
fadd qword [0x4307c8]
lea edx, [esp + 0x88]
push edx
mov edx, dword [esp + 0x48]
lea eax, [edi*4]
fstp qword [esp + 0x38]
push eax
lea ecx, [esp + 0x4a4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
add esi, 1
adc eax, ebp
cmp eax, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
jl 0x412eb7
jg 0x413130
mov eax, dword [esp + 0x20]
mov ecx, esi
cmp ecx, eax
jb 0x412eb7
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x40]
push eax
push ecx
push esi
mov ecx, ebx
call fcn.00411a40
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x1097a10]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push ecx
call esi
mov edx, dword [esp + 0x5c]
push edx
push 1
mov dword [ebx + 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