Function at 0x413770
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 + 0x10cc07c]
mov ecx, dword [esi + 0x10cc080]
mov edx, dword [eax + 0xe0]
mov eax, dword [eax + 0xe4]
push edi
mov edi, dword [ecx + 0xe0]
mov ecx, dword [ecx + 0xe4]
cmp eax, ecx
lea ebx, [esi + 0x10969f8]
mov dword [esp + 0x44], ebx
jg 0x4137cc
jl 0x4137ba
cmp edx, edi
jae 0x4137cc
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ecx
jmp 0x4137e8
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ecx
mov edx, edi
mov edi, dword [esp + 0x28]
mov eax, ecx
mov ecx, dword [esp + 0x2c]
cmp edx, edi
jne 0x4137f4
cmp eax, ecx
je 0x413b70
xor ebp, ebp
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 + 0x40], ebp
fstp qword [esp + 0x5c]
call fcn.00416f80
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
add esp, 4
push eax
mov eax, dword [esi + 0x1097a10]
push 2
push 0x400
push eax
call edi
mov ecx, dword [esi + 0x10cc078]
push ebp
push ebp
push ebp
push 1
push ebx
call fcn.00401c90
push ebp
push 0x20
push 3
push ebp
push ebp
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x30], ebx
jne 0x413881
mov ecx, dword [esi + 0x1097a10]
push 0x64
push 1
push 0x400
push ecx
call edi
mov dword [esi + 0x1097a10], ebp
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push ebp
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi + 0x10cc078]
mov edi, dword [edx + 0x2c]
imul edi, dword [esi + 0x10975fc]
add edi, edi
add edi, edi
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x44], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push edi
push ebp
push eax
mov dword [esp + 0x40], eax
call fcn.004238f0
mov eax, dword [esi + 0x10cc078]
add esp, 0xc
cmp dword [esi + 0x10975fc], 0
mov dword [esp + 0x38], ebp
mov ebp, dword [eax + 0x2c]
mov dword [esp + 0x14], 0
jbe 0x413950
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], ecx
xor edi, edi
test ebp, ebp
jle 0x413932
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 0x10975fc]
mov ecx, dword [esp + 0x14]
cdq
sub eax, edx
sar eax, 1
cdq
sub ecx, eax
mov eax, 0
sbb eax, edx
add ecx, dword [esp + 0x20]
push edi
adc eax, dword [esp + 0x28]
push eax
push ecx
mov ecx, dword [esi + 0x10cc078]
call fcn.004018f0
fstp dword [ebx]
add edi, 1
add ebx, 4
cmp edi, ebp
jl 0x4138f3
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
add ecx, 1
lea eax, [ebp*4]
add dword [esp + 0x10], eax
cmp ecx, dword [esi + 0x10975fc]
mov dword [esp + 0x14], ecx
jb 0x4138e9
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 0x413b12
jl 0x413988
cmp eax, dword [esp + 0x28]
jae 0x413b12
jmp 0x413988
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 + 0x50], edx
mov dword [esp + 0x54], eax
fild qword [esp + 0x50]
fdiv qword [esp + 0x58]
fmul qword [0x43d7d0]
call fcn.00423f00
mov ebx, eax
cmp ebx, dword [esp + 0x3c]
je 0x4139d0
mov ecx, dword [esi + 0x1097a10]
push ebx
push 1
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x3c], ebx
xor ebx, ebx
test ebp, ebp
mov dword [esp + 0x14], ebx
jle 0x413aa8
mov eax, dword [esp + 0x34]
lea edi, [esp + 0x68]
mov ecx, edi
lea edx, [esi + 0x10971f8]
sub eax, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x4c], eax
jmp 0x413a00
mov edx, dword [esp + 0x10]
cmp dword [edx], 0
jne 0x413a19
mov eax, dword [esi + 0x10cc078]
cmp dword [eax + 0x30], 1
je 0x413a95
mov eax, dword [esi + 0x10975fc]
mov ecx, dword [esi + 0x10cc078]
cdq
sub eax, edx
sar eax, 1
cdq
add eax, dword [esp + 0x18]
push ebx
adc edx, dword [esp + 0x20]
push edx
push eax
call fcn.004018f0
mov edx, dword [esp + 0x34]
mov ecx, ebp
imul ecx, dword [esp + 0x38]
add ecx, ebx
fstp dword [edx + ecx*4]
mov eax, dword [esi + 0x10975fc]
test eax, eax
fldz
fstp dword [edi]
mov dword [esp + 0x48], eax
jle 0x413a7d
mov eax, dword [esp + 0x4c]
mov ecx, dword [esi + 0x10975fc]
lea edx, [ebp*4]
add eax, edi
fld dword [edi]
fadd dword [eax]
add eax, edx
sub ecx, 1
fstp dword [edi]
jne 0x413a70
fld dword [edi]
mov eax, dword [esp + 0x14]
fidiv dword [esp + 0x48]
add eax, 1
mov dword [esp + 0x14], eax
fstp dword [esp + eax*4 + 0x464]
add dword [esp + 0x10], 4
add ebx, 1
add edi, 4
cmp ebx, ebp
jl 0x413a00
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x68]
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 + 0x38]
add eax, 1
cdq
idiv dword [esi + 0x10975fc]
add dword [esp + 0x18], 1
mov eax, dword [esp + 0x1c]
adc eax, 0
cmp eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], edx
jl 0x413980
jg 0x413b0a
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x28]
jb 0x413980
mov ebx, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x40]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x20]
push edi
push ecx
push ebx
mov ecx, esi
call fcn.004130e0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi + 0x1097a10]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push edx
call edi
mov eax, dword [esp + 0x44]
push eax
push 1
mov dword [esi + 0x1097a10], 0
mov ecx, dword [0x454174]
push 0x400
push ecx
call edi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret