Function at 0x40dd40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc48
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x4930b8]
mov ecx, dword [ebx + 0x4930bc]
mov edx, dword [ecx + 0xb8]
mov ecx, dword [ecx + 0xbc]
push ebp
mov ebp, dword [eax + 0xb8]
mov eax, dword [eax + 0xbc]
cmp eax, ecx
push esi
lea esi, [ebx + 0x489ff0]
push edi
mov dword [esp + 0x44], esi
jg 0x40dd9c
jl 0x40dd8a
cmp ebp, edx
jae 0x40dd9c
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
jmp 0x40ddb8
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], eax
mov ebp, edx
mov edx, dword [esp + 0x18]
mov ecx, eax
mov eax, dword [esp + 0x14]
cmp ebp, edx
jne 0x40ddc4
cmp eax, ecx
je 0x40e045
sub edx, ebp
sbb ecx, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
fild qword [esp + 0x20]
push 0xcc
mov dword [esp + 0x38], 0
fstp qword [esp + 0x3c]
call fcn.004060c0
mov edx, dword [ebx + 0x48b008]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
add esp, 4
push eax
push 2
push 0x400
push edx
call edi
mov eax, dword [0x42f978]
push 0
lea ecx, [eax + 0xa68]
push ecx
mov ecx, dword [ebx + 0x4930b4]
add eax, 0x668
push eax
push 1
push esi
call fcn.00401630
push 0
push 0x20
push 3
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x2c], eax
jne 0x40de69
mov edx, dword [ebx + 0x48b008]
push 0x64
push 1
push 0x400
push edx
call edi
mov dword [ebx + 0x48b008], 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 eax, dword [0x42f978]
lea esi, [eax + 0x668]
mov ecx, 0x100
lea edi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
lea esi, [eax + 0xa68]
mov eax, dword [ebx + 0x4930b4]
mov edx, dword [eax + 0x30]
mov ecx, 0x100
lea edi, [esp + 0x458]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0x2c]
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x1c]
mov eax, ebp
cmp eax, ecx
mov dword [esp + 0x40], edx
jg 0x40dfe7
jl 0x40deda
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x18]
jae 0x40dfe7
fld qword [0x428428]
fdiv qword [esp + 0x38]
fstp qword [esp + 0x48]
mov eax, dword [esp + 0x30]
xor edi, edi
xor esi, esi
test eax, eax
jle 0x40df6f
lea edx, [ebx + 0x48a7f0]
mov dword [esp + 0x28], edx
mov edi, edi
mov eax, dword [esp + 0x28]
cmp dword [eax], 0
jne 0x40df10
cmp dword [esp + 0x40], 1
je 0x40df35
mov ecx, dword [esp + 0x20]
push esi
push ebp
push ecx
mov ecx, dword [ebx + 0x4930b4]
call fcn.004014c0
fmul dword [esp + esi*4 + 0x58]
inc edi
fadd dword [esp + esi*4 + 0x458]
fstp dword [esp + edi*4 + 0x854]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
inc esi
add ecx, 4
cmp esi, eax
mov dword [esp + 0x28], ecx
jl 0x40df00
test edi, edi
jle 0x40df6f
push 0
lea edx, [esp + 0x58]
push edx
mov edx, dword [esp + 0x34]
lea eax, [edi*4]
push eax
lea ecx, [esp + 0x864]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
sub eax, esi
mov ecx, ebp
sbb ecx, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
fild qword [esp + 0x38]
fmul qword [esp + 0x48]
fmul qword [0x4276c0]
call fcn.00412e7c
mov esi, eax
cmp esi, dword [esp + 0x34]
je 0x40dfbd
mov edx, dword [ebx + 0x48b008]
push esi
push 1
push 0x400
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x34], esi
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add edx, 1
adc ebp, 0
cmp ebp, eax
mov dword [esp + 0x20], edx
jl 0x40dee8
jg 0x40dfe7
mov eax, dword [esp + 0x18]
mov ecx, edx
cmp ecx, eax
jb 0x40dee8
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
push ecx
push edx
push esi
mov ecx, ebx
call fcn.0040ce30
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x48b008]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push eax
mov dword [ebx + 0x48b028], 1
call esi
mov ecx, dword [esp + 0x44]
push ecx
push 1
mov dword [ebx + 0x48b008], 0
mov edx, dword [0x42f9e0]
push 0x400
push edx
call esi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret