Function at 0x401600
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [0x428008]
xor eax, esp
mov dword [esp + 0x78], eax
movsd xmm0, qword [ebp + 0x20]
minsd xmm0, qword [ebp + 0x10]
movsd xmm3, qword [ebp + 0x30]
mov eax, dword [ebp + 8]
mov dword [esp + 0x74], eax
push ebx
subsd xmm0, xmm3
mov dword [esp + 0x14], ecx
push esi
push edi
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
cvttsd2si eax, xmm0
mov dword [esp + 0x7c], edx
movsd xmm0, qword [ebp + 0x28]
minsd xmm0, qword [ebp + 0x18]
mov dword [esp + 0x64], eax
subsd xmm0, xmm3
cvttsd2si eax, xmm0
movsd xmm0, qword [ebp + 0x10]
maxsd xmm0, qword [ebp + 0x20]
mov dword [esp + 0x68], eax
addsd xmm0, xmm3
cvttsd2si eax, xmm0
movsd xmm0, qword [ebp + 0x18]
maxsd xmm0, qword [ebp + 0x28]
mov dword [esp + 0x6c], eax
addsd xmm0, xmm3
cvttsd2si eax, xmm0
mov dword [esp + 0x70], eax
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40174d
mov esi, dword [esp + 0x5c]
sub esi, dword [esp + 0x54]
mov ebx, dword [esp + 0x60]
sub ebx, dword [esp + 0x58]
push 0x2c
mov dword [esp + 0x14], esi
call fcn.0040cc3b
mov edi, eax
add esp, 4
mov dword [esp + 0x3c], edi
push dword [esp + 0x1c]
mov dword [edi], 0x28
mov dword [edi + 4], esi
mov dword [edi + 8], ebx
mov dword [edi + 0xc], 0x200001
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
push 0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], eax
push ecx
push 0
push edi
push eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [esp + 0x34], eax
test eax, eax
jne 0x401761
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call fcn.0040cc20
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00409972
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x18]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push 0xcc0020
push dword [esp + 0x5c]
mov dword [esp + 0x40], eax
push dword [esp + 0x5c]
push dword [esp + 0x28]
push ebx
push esi
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
mov edi, dword [esp + 0x24]
mov esi, ebx
imul esi, dword [esp + 0x10]
shl esi, 2
push esi
call fcn.0040cc3b
add esp, 4
mov dword [esp + 0x20], eax
push esi
push edi
push eax
call fcn.0040c660
mov esi, dword [esp + 0x1c]
add esp, 8
mov ecx, dword [esp + 0x24]
mov edx, esi
push ebx
call fcn.00401040
mov eax, dword [esp + 0x2c]
xor ecx, ecx
add esp, 8
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], ecx
test esi, esi
jle 0x401969
mov edx, eax
mov dword [esp + 0x28], eax
xor edi, edi
test ebx, ebx
jle 0x401955
movsd xmm6, qword [ebp + 0x20]
mov esi, edx
movsd xmm0, qword [ebp + 0x10]
movsd xmm7, qword [ebp + 0x28]
subsd xmm6, xmm0
movsd xmm4, qword [ebp + 0x18]
mov eax, dword [esp + 0x20]
subsd xmm7, xmm4
sub eax, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
movsd qword [esp + 0x40], xmm6
movsd qword [esp + 0x48], xmm7
mov eax, dword [esp + 0x54]
add eax, ecx
movd xmm3, eax
mov eax, dword [esp + 0x58]
sub eax, edi
add eax, ebx
cvtdq2pd xmm3, xmm3
movd xmm5, eax
cvtdq2pd xmm5, xmm5
movaps xmm1, xmm3
subsd xmm1, xmm0
movaps xmm2, xmm5
subsd xmm2, xmm4
movaps xmm0, xmm6
movaps xmm4, xmm7
mulsd xmm0, xmm1
mulsd xmm4, xmm2
addsd xmm4, xmm0
movsd xmm0, qword [0x41f478]
comisd xmm0, xmm4
jbe 0x40187e
mulsd xmm2, xmm2
mulsd xmm1, xmm1
addsd xmm2, xmm1
jmp 0x4018f2
movaps xmm1, xmm7
movaps xmm0, xmm6
mulsd xmm1, xmm7
mulsd xmm0, xmm6
addsd xmm1, xmm0
comisd xmm4, xmm1
jae 0x4018d9
movsd xmm0, qword [0x41f478]
comisd xmm0, xmm1
ja 0x4018d9
divsd xmm4, xmm1
movaps xmm0, xmm7
movaps xmm2, xmm3
mulsd xmm0, xmm4
addsd xmm0, qword [ebp + 0x18]
subsd xmm5, xmm0
movaps xmm0, xmm6
mulsd xmm0, xmm4
mulsd xmm5, xmm5
addsd xmm0, qword [ebp + 0x10]
subsd xmm2, xmm0
mulsd xmm2, xmm2
addsd xmm2, xmm5
jmp 0x4018f2
subsd xmm3, qword [ebp + 0x20]
movaps xmm2, xmm5
subsd xmm2, qword [ebp + 0x28]
mulsd xmm3, xmm3
mulsd xmm2, xmm2
addsd xmm2, xmm3
xorps xmm1, xmm1
movaps xmm0, xmm2
ucomisd xmm1, xmm0
ja 0x401904
sqrtsd xmm0, xmm0
jmp 0x401909
call fcn.00417ca0
movsd xmm1, qword [ebp + 0x30]
comisd xmm1, xmm0
jb 0x40191d
mov eax, dword [esp + 0x30]
mov eax, dword [eax + esi]
mov dword [esi], eax
mov ecx, dword [esp + 0x10]
inc edi
movsd xmm6, qword [esp + 0x40]
movsd xmm7, qword [esp + 0x48]
movsd xmm0, qword [ebp + 0x10]
movsd xmm4, qword [ebp + 0x18]
lea eax, [ecx*4]
mov ecx, dword [esp + 0x14]
add esi, eax
cmp edi, ebx
jl 0x401824
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
inc ecx
add edx, 4
mov dword [esp + 0x14], ecx
mov dword [esp + 0x28], edx
cmp ecx, esi
jl 0x4017e4
mov edi, dword [esp + 0x18]
push 0xcc0020
push 0
push 0
push edi
push ebx
push esi
push dword [esp + 0x70]
push dword [esp + 0x70]
push dword [esp + 0x3c]
call dword [sym.imp.GDI32.dll_BitBlt]
push dword [esp + 0x34]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
call esi
push dword [esp + 0x38]
call esi
push edi
call esi
push dword [esp + 0x20]
call fcn.0040cc20
add esp, 4
push dword [esp + 0x3c]
call fcn.0040cc20
mov ecx, dword [esp + 0x88]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00409972
mov esp, ebp
pop ebp
ret