Function at 0x412000
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x440
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esi + 0x4a7f38]
mov edx, dword [esi + 0x4a7f3c]
push edi
mov edi, dword [ecx + 0xb8]
mov ebp, dword [ecx + 0xbc]
mov ecx, dword [edx + 0xb8]
lea eax, [esi + 0x48a9f0]
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 0xbc]
cmp ebp, eax
jg 0x41205c
jl 0x41204a
cmp edi, ecx
jae 0x41205c
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
jmp 0x412078
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
mov ebp, eax
mov eax, dword [esp + 0x1c]
mov edi, ecx
mov ecx, dword [esp + 0x18]
cmp edi, ecx
jne 0x412084
cmp ebp, eax
je 0x4122c2
sub ecx, edi
sbb eax, ebp
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x4a7bac]
mov dword [esp + 0x10], ecx
fild qword [esp + 0x10]
lea ebx, [esi + 0x4a7bac]
push 0xcc
mov dword [esp + 0x38], 0
fstp qword [esp + 0x3c]
mov dword [esp + 0x2c], eax
call fcn.004124e0
mov ecx, dword [esi + 0x48ba08]
add esp, 4
push eax
push 2
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esi + 0x4a7f34]
push ebx
mov ebx, dword [esp + 0x30]
push ebx
call fcn.00401c50
push 0
push 0x20
push 3
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x40], ebx
jne 0x41212c
mov edx, dword [esi + 0x48ba08]
push 0x64
push 1
push 0x400
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esi + 0x48ba08], 0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp ebp, dword [esp + 0x1c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebp
jg 0x412271
jl 0x412157
cmp edi, dword [esp + 0x18]
jae 0x412271
fld qword [0x42c5b8]
fdiv qword [esp + 0x38]
fstp qword [esp + 0x48]
mov eax, dword [esp + 0x28]
xor edi, edi
test eax, eax
jle 0x4121d4
lea ebx, [esi + 0x493c2c]
lea ebp, [esi + 0x4a7c30]
jmp 0x412180
mov eax, dword [ebp]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
dec eax
push eax
push ecx
mov ecx, dword [esi + 0x4a7f34]
push edx
call fcn.004014c0
fstp dword [esp + 0x30]
cmp dword [ebx], 0
jne 0x4121a9
fld dword [esp + 0x30]
jmp 0x4121b6
mov eax, dword [esp + 0x30]
push eax
push edi
mov ecx, esi
call fcn.004102a0
mov eax, dword [esp + 0x28]
fstp dword [esp + edi*4 + 0x50]
inc edi
add ebx, 0xa0c
add ebp, 4
cmp edi, eax
jl 0x412180
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x48]
push ecx
shl eax, 2
push eax
lea edx, [esp + 0x5c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
sub eax, edi
sbb ecx, ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
fild qword [esp + 0x38]
fmul qword [esp + 0x48]
fmul qword [0x42b6c0]
call fcn.00416c6c
mov edi, eax
cmp edi, dword [esp + 0x34]
je 0x41223b
mov edx, dword [esi + 0x48ba08]
push edi
push 1
push 0x400
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
add edi, 1
adc eax, 0
cmp eax, ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
jl 0x412165
jg 0x41226d
mov eax, dword [esp + 0x18]
mov ecx, edi
cmp ecx, eax
jb 0x412165
mov edi, dword [esp + 0x20]
push ebp
push edi
push ebx
mov ecx, esi
call fcn.004103b0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x48ba08]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push ecx
mov dword [esi + 0x48ba28], 1
call edi
mov edx, dword [esp + 0x2c]
push edx
push 1
mov dword [esi + 0x48ba08], 0
mov eax, dword [0x43c480]
push 0x400
push eax
call edi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret