Function at 0x415160
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x450
mov eax, dword [edi + 0x10cc07c]
mov ecx, dword [eax + 0xe0]
push ebx
push ebp
mov ebp, dword [eax + 0xe4]
mov eax, dword [edi + 0x10cc080]
mov edx, dword [eax + 0xe0]
mov eax, dword [eax + 0xe4]
cmp ebp, eax
lea ebx, [edi + 0x10969f8]
push esi
mov dword [esp + 0x44], ebx
jg 0x4151b3
jl 0x4151a1
cmp ecx, edx
jae 0x4151b3
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
jmp 0x4151cf
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], ecx
mov ebp, eax
mov eax, dword [esp + 0x1c]
mov edx, ecx
mov ecx, dword [esp + 0x20]
cmp ecx, edx
jne 0x4151db
cmp ebp, eax
je 0x415462
sub edx, ecx
mov ecx, dword [edi + 0x10cbbb4]
mov dword [esp + 0x10], edx
mov edx, dword [0x43c548]
sbb eax, ebp
push pe_nt_image_headers32
shl edx, 9
mov dword [esp + 0x18], eax
fild qword [esp + 0x14]
mov eax, dword [0x43b4b0]
add edx, 0x43b548
push edx
lea esi, [edi + 0x10cbbb4]
fstp qword [esp + 0x40]
push 0xcc
push eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], ecx
call dword [sym.imp.USER32.dll_LoadStringW]
mov eax, dword [0x43c548]
lea ecx, [eax + 1]
and ecx, 0x80000007
jns 0x415242
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, dword [edi + 0x1097a10]
shl eax, 9
add eax, 0x43b548
push eax
push 2
push 0x400
push edx
mov dword [0x43c548], ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
mov eax, esi
mov esi, dword [edi + 0x10cc078]
push ebx
call fcn.004037f0
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 + 0x48], ebx
jne 0x4152c0
mov eax, dword [edi + 0x1097a10]
push 0x64
push 1
push 0x400
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [edi + 0x1097a10], 0
pop esi
pop ebp
pop ebx
add esp, 0x450
ret
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebp
jg 0x415411
jl 0x4152ef
cmp eax, dword [esp + 0x18]
jae 0x415411
fld qword [0x433c28]
fdiv qword [esp + 0x38]
fstp qword [esp + 0x50]
lea ecx, [ecx]
mov eax, dword [esp + 0x2c]
xor esi, esi
test eax, eax
jle 0x415374
lea ebx, [edi + 0x10b7c34]
lea ebp, [edi + 0x10cbc38]
jmp 0x415320
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp]
mov edx, dword [esp + 0x10]
push ecx
mov ecx, dword [edi + 0x10cc078]
dec eax
push edx
call fcn.00402e60
fstp dword [esp + 0x34]
cmp dword [ebx], 0
jne 0x415348
fld dword [esp + 0x34]
jmp 0x415356
mov eax, dword [esp + 0x34]
push eax
mov eax, esi
mov ecx, edi
call fcn.00414dc0
mov eax, dword [esp + 0x2c]
fstp dword [esp + esi*4 + 0x58]
inc esi
add ebx, 0xa0c
add ebp, 4
cmp esi, eax
jl 0x415320
mov ebp, dword [esp + 0x24]
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x2c]
push 0
lea ecx, [esp + 0x50]
push ecx
shl eax, 2
push eax
lea edx, [esp + 0x64]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
sub eax, esi
sbb ecx, ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
fild qword [esp + 0x38]
fmul qword [esp + 0x50]
fmul qword [0x433cc0]
call fcn.0041d6e4
mov esi, eax
cmp esi, dword [esp + 0x30]
je 0x4153db
mov edx, dword [edi + 0x1097a10]
push esi
push 1
push 0x400
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
add esi, 1
adc eax, 0
cmp eax, ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
jl 0x415300
jg 0x41540d
mov eax, dword [esp + 0x18]
mov ecx, esi
cmp ecx, eax
jb 0x415300
mov eax, dword [esp + 0x20]
push ebp
push eax
push ebx
mov ecx, edi
call fcn.00415470
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0x1097a10]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push ecx
mov dword [edi + 0x1097a30], 1
call esi
mov edx, dword [esp + 0x44]
mov eax, dword [0x43b528]
push edx
push 1
push 0x400
push eax
mov dword [edi + 0x1097a10], 0
call esi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret