Function at 0x413920
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x860
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
lea ebp, [ebx + 0x10969f8]
push edi
mov dword [esp + 0x58], ebp
jg 0x413973
jl 0x413961
cmp edx, esi
jae 0x413973
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ecx
jmp 0x41398f
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ecx
mov edx, esi
mov esi, dword [esp + 0x28]
mov eax, ecx
mov ecx, dword [esp + 0x2c]
cmp edx, esi
jne 0x41399b
cmp eax, ecx
je 0x413d84
sub esi, edx
mov edx, dword [0x43c548]
sbb ecx, eax
mov eax, dword [0x43b4b0]
push pe_nt_image_headers32
shl edx, 9
add edx, 0x43b548
mov dword [esp + 0x20], ecx
push edx
mov dword [esp + 0x20], esi
fild qword [esp + 0x20]
push 0xcf
push eax
mov dword [esp + 0x48], 0
fstp qword [esp + 0x50]
call dword [sym.imp.USER32.dll_LoadStringW]
mov eax, dword [0x43c548]
lea ecx, [eax + 1]
and ecx, 0x80000007
jns 0x4139f2
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, dword [ebx + 0x1097a10]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
shl eax, 9
add eax, 0x43b548
push eax
push 2
push 0x400
push edx
mov dword [0x43c548], ecx
call edi
mov esi, dword [ebx + 0x10cc078]
push 0
push 0
push 1
push ebp
xor eax, eax
call fcn.004031e0
push 0
push 0x20
push 3
push 0
push 0
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x30], ebp
jne 0x413a72
mov eax, dword [ebx + 0x1097a10]
push 0x64
push 1
push 0x400
push eax
call edi
mov dword [ebx + 0x1097a10], 0
pop edi
pop esi
pop ebp
add esp, 0x860
ret
push 2
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebx + 0x10cc078]
mov esi, dword [ecx + 0x2c]
imul esi, dword [ebx + 0x10975fc]
shl esi, 2
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x50], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
mov ecx, esi
shr ecx, 2
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebx + 0x10cc078]
mov edi, dword [ecx + 0x2c]
mov ecx, dword [ebx + 0x10975fc]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x10], eax
jbe 0x413b53
mov dword [esp + 0x14], edx
nop
xor esi, esi
test edi, edi
jle 0x413b2f
mov ebp, edx
jmp 0x413af0
mov eax, dword [ebx + 0x10975fc]
mov ecx, dword [esp + 0x10]
cdq
sub eax, edx
sar eax, 1
cdq
sub ecx, eax
mov eax, 0
sbb eax, edx
add ecx, dword [esp + 0x20]
adc eax, dword [esp + 0x24]
push eax
push ecx
mov ecx, dword [ebx + 0x10cc078]
mov eax, esi
call fcn.00402e60
inc esi
fstp dword [ebp]
add ebp, 4
cmp esi, edi
jl 0x413af0
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
lea eax, [edi*4]
add edx, eax
mov eax, dword [ebx + 0x10975fc]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
jb 0x413ae0
mov esi, dword [esp + 0x24]
cmp esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
jg 0x413d26
jl 0x413b79
cmp eax, dword [esp + 0x28]
jae 0x413d26
fld qword [0x433c28]
fdiv qword [esp + 0x40]
fstp qword [esp + 0x60]
jmp 0x413b91
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
sub edx, eax
mov eax, dword [esp + 0x1c]
sbb eax, esi
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
fild qword [esp + 0x40]
fmul qword [esp + 0x60]
fmul qword [0x433cc0]
call fcn.0041d6e4
mov ebp, eax
cmp ebp, dword [esp + 0x38]
je 0x413bd9
mov ecx, dword [ebx + 0x1097a10]
push ebp
push 1
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x38], ebp
xor ebp, ebp
test edi, edi
mov dword [esp + 0x14], ebp
jle 0x413cb6
mov eax, dword [esp + 0x3c]
lea esi, [esp + 0x68]
mov ecx, esi
lea edx, [ebx + 0x10971f8]
sub eax, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x10]
cmp dword [edx], 0
jne 0x413c1a
mov eax, dword [ebx + 0x10cc078]
cmp dword [eax + 0x30], 1
je 0x413c9f
mov eax, dword [ebx + 0x10975fc]
mov ecx, dword [esp + 0x18]
cdq
sub eax, edx
sar eax, 1
cdq
add eax, ecx
adc edx, dword [esp + 0x1c]
mov ecx, dword [ebx + 0x10cc078]
push edx
push eax
mov eax, ebp
call fcn.00402e60
mov edx, dword [esp + 0x3c]
mov ecx, edi
imul ecx, dword [esp + 0x34]
add ecx, ebp
mov dword [esi], 0
fstp dword [edx + ecx*4]
mov eax, dword [ebx + 0x10975fc]
test eax, eax
mov dword [esp + 0x54], eax
jle 0x413c89
mov eax, dword [esp + 0x50]
fld dword [0x433c88]
mov ecx, dword [ebx + 0x10975fc]
lea edx, [edi*4]
add eax, esi
lea esp, [esp]
fadd dword [eax]
add eax, edx
dec ecx
jne 0x413c80
fstp dword [esi]
fild dword [esp + 0x54]
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
fdivr dword [esi]
fstp dword [esp + eax*4 + 0x464]
mov edx, dword [esp + 0x10]
inc ebp
add edx, 4
add esi, 4
cmp ebp, edi
mov dword [esp + 0x10], edx
jl 0x413c01
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x60]
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 + 0x34]
inc eax
cdq
idiv dword [ebx + 0x10975fc]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
add esi, 1
adc eax, 0
cmp eax, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], edx
jl 0x413b89
jg 0x413d1e
mov ecx, dword [esp + 0x28]
mov eax, esi
cmp eax, ecx
jb 0x413b89
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x4c]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x20]
push esi
push ecx
push ebp
mov ecx, ebx
call fcn.00415470
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebx + 0x1097a10]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x64
push 1
push 0x400
push edx
call esi
mov eax, dword [esp + 0x58]
mov ecx, dword [0x43b528]
push eax
push 1
push 0x400
push ecx
mov dword [ebx + 0x1097a10], 0
call esi
pop edi
pop esi
pop ebp
add esp, 0x860
ret