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

Disassembly:
sub esp, 0xb0
push ebx
push ebp
push esi
mov si, word [esp + 0xcc]
push edi
test si, si
jge 0x40e999
mov eax, dword [0x4897a0]
movzx eax, word [eax]
mov ecx, 0x300
cmp ax, cx
je 0x40e999
mov ecx, 0x301
cmp ax, cx
je 0x40e999
mov ecx, 0x302
cmp ax, cx
je 0x40e999
mov eax, edx
test edx, edx
jg 0x40e905
neg eax
mov ecx, dword [esp + 0xcc]
cvtsi2sd xmm3, eax
mov eax, ecx
test ecx, ecx
jg 0x40e918
neg eax
cvtsi2sd xmm2, eax
movapd xmm0, xmm2
mulsd xmm0, xmm2
movapd xmm1, xmm3
mulsd xmm1, xmm3
addsd xmm0, xmm1
sqrtsd xmm1, xmm0
movsd xmm0, qword [0x4628f8]
movsx eax, si
divsd xmm0, xmm1
cvtsi2sd xmm4, eax
movapd xmm1, xmm0
mulsd xmm1, xmm4
mulsd xmm1, xmm2
movsd xmm2, qword [0x462898]
test ecx, ecx
jne 0x40e964
movzx ecx, ax
jmp 0x40e977
mulsd xmm0, xmm4
mulsd xmm0, xmm3
subsd xmm0, xmm2
cvttsd2si ecx, xmm0
movzx ecx, cx
mov dword [esp + 0x20], ecx
test edx, edx
jne 0x40e988
movzx eax, ax
mov dword [esp + 0x28], eax
jmp 0x40e9a7
subsd xmm1, xmm2
cvttsd2si ecx, xmm1
movzx eax, cx
mov dword [esp + 0x28], eax
jmp 0x40e9a7
movzx ecx, si
movzx eax, si
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xc4]
mov ecx, dword [esp + 0xd4]
mov ebx, eax
imul ebx, ebx, 0x332
push ecx
mov ecx, dword [0x47eff8]
lea esi, [ebx + ecx]
mov ecx, dword [esp + 0x24]
push ecx
push edx
push eax
lea edi, [esp + 0x40]
call fcn.0040e1f0
mov eax, dword [esp + 0xd8]
mov edx, dword [esp + 0xe4]
mov ecx, dword [0x47eff8]
mov ebp, eax
imul ebp, ebp, 0x332
push edx
mov edx, dword [esp + 0x3c]
lea esi, [ecx + ebp]
mov ecx, dword [esp + 0xe0]
push edx
push ecx
push eax
lea edi, [esp + 0x84]
call fcn.0040e1f0
mov edx, dword [esp + 0x50]
xor edi, edi
add esp, 0x20
mov dword [esp + 0x10], edi
cmp edx, edi
je 0x40ea57
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x42]
push ecx
lea eax, [esp + 0x44]
push eax
mov eax, dword [esp + 0x4a]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x4c]
push eax
push ecx
push edx
call fcn.0040ff90
mov edx, dword [esp + 0x54]
add esp, 0x24
mov eax, dword [esp + 0x64]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], esi
cmp eax, edi
je 0x40eab4
lea edx, [esp + 0x6c]
push edx
lea ecx, [esp + 0x76]
push ecx
lea edx, [esp + 0x78]
push edx
mov edx, dword [esp + 0x7e]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x80]
push edx
mov edx, dword [esp + 0x80]
push ecx
mov ecx, dword [esp + 0x80]
push edx
push ecx
push eax
call fcn.0040ff90
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x54]
add esp, 0x24
mov edi, dword [esp + 0x10]
mov dword [esp + 0x1c], edi
test edx, edx
je 0x40ef0b
test eax, eax
je 0x40ee9f
test edx, edx
jge 0x40eada
mov ecx, edx
neg ecx
mov dword [esp + 0x10], ecx
jmp 0x40eade
mov dword [esp + 0x10], edx
mov ecx, eax
test eax, eax
jge 0x40eae6
neg ecx
cmp esi, edi
jge 0x40ec61
cmp word [esp + 0xd0], 0
mov esi, dword [esp + 0xc4]
mov ebp, dword [esp + 0xc8]
jl 0x40ec52
mov eax, dword [esp + 0x10]
cmp eax, dword [esi*4 + 0x47dbe0]
jle 0x40edf7
cmp ecx, dword [ebp*4 + 0x47dbe0]
jle 0x40edf7
movzx eax, word [esp + 0x3c]
movzx ecx, word [esp + 0x3e]
lea edi, [esp + 0x38]
push edi
lea edi, [esp + 0x42]
push edi
lea edi, [esp + 0x44]
push edi
mov edi, dword [esp + 0x28]
push edi
push ecx
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push eax
push edx
call fcn.00410170
mov ecx, dword [0x47eff8]
mov dx, word [ebx + ecx + 0x52]
mov eax, 0x1000
and dx, ax
mov ecx, eax
add esp, 0x24
cmp dx, cx
jne 0x40edf7
mov edi, dword [esp + 0x28]
mov eax, dword [ebp*4 + 0x47d6e0]
movsx edx, di
cvtsi2sd xmm0, edx
mulsd xmm0, qword [0x4628a0]
lea edx, [esp + 0xac]
push edx
mov dword [esp + 0xb0], eax
mov eax, dword [ebp*4 + 0x47e7f8]
lea ecx, [esp + 0x2c]
push 0x633
push eax
movsd qword [esp + 0x34], xmm0
mov dword [esp + 0xbc], ecx
call fcn.0041a6e0
mov edx, dword [esp + 0x70]
lea ecx, [esp + 0x28]
push ecx
push edi
push edx
lea eax, [ebp + 1]
push eax
call fcn.0040e020
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x2c]
push ecx
push edx
lea edi, [esi + 1]
push eax
mov edx, edi
call fcn.0040c390
mov ecx, dword [esi*4 + 0x47d6e0]
movsd xmm0, qword [esp + 0x38]
lea eax, [esp + 0xd4]
push eax
mov dword [esp + 0xd8], ecx
mov ecx, dword [esi*4 + 0x47e7f8]
lea edx, [esp + 0x3c]
push 0x633
push ecx
movsd qword [esp + 0x84], xmm0
mov dword [esp + 0xe4], edx
call fcn.0041a6e0
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x4c]
push edx
push eax
push ecx
push edi
call fcn.0040e020
add esp, 0x44
jmp 0x40edf7
movzx eax, word [esp + 0x70]
movzx ecx, word [esp + 0x72]
jmp 0x40eb33
jle 0x40ede9
cmp word [esp + 0xd0], 0
jl 0x40edda
mov edx, dword [esp + 0xc8]
cmp ecx, dword [edx*4 + 0x47dbe0]
jle 0x40ede9
mov ecx, dword [esp + 0xc4]
mov edx, dword [esp + 0x10]
cmp edx, dword [ecx*4 + 0x47dbe0]
jle 0x40ede9
movzx ecx, word [esp + 0x70]
movzx edx, word [esp + 0x72]
lea edi, [esp + 0x6c]
push edi
lea edi, [esp + 0x76]
push edi
lea edi, [esp + 0x78]
push edi
push esi
push edx
mov edx, dword [esp + 0x7c]
push ecx
mov ecx, dword [esp + 0x84]
push ecx
push edx
push eax
call fcn.00410170
mov eax, dword [0x47eff8]
mov cx, word [eax + ebp + 0x52]
mov edx, 0x1000
and cx, dx
mov eax, edx
add esp, 0x24
cmp cx, ax
jne 0x40ede9
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0xc4]
mov edx, dword [esi*4 + 0x47d6e0]
movsx ecx, di
cvtsi2sd xmm0, ecx
mulsd xmm0, qword [0x4628a0]
lea ecx, [esp + 0xac]
push ecx
mov dword [esp + 0xb0], edx
mov edx, dword [esi*4 + 0x47e7f8]
lea eax, [esp + 0x24]
push 0x633
push edx
movsd qword [esp + 0x2c], xmm0
mov dword [esp + 0xbc], eax
call fcn.0041a6e0
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x24]
push eax
push edi
push ecx
inc esi
push esi
call fcn.0040e020
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0xe4]
mov ecx, dword [esp + 0x80]
lea edx, [esp + 0x2c]
push edx
push eax
lea edi, [esi + 1]
push ecx
mov edx, edi
call fcn.0040c390
mov edx, dword [esi*4 + 0x47d6e0]
movsd xmm0, qword [esp + 0x38]
lea ecx, [esp + 0xd4]
push ecx
mov dword [esp + 0xd8], edx
mov edx, dword [esi*4 + 0x47e7f8]
lea eax, [esp + 0x3c]
push 0x633
push edx
movsd qword [esp + 0xb8], xmm0
mov dword [esp + 0xe4], eax
call fcn.0041a6e0
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x98]
lea eax, [esp + 0x50]
push eax
push ecx
push edx
push edi
call fcn.0040e020
add esp, 0x44
mov ebp, esi
jmp 0x40edf0
movzx ecx, word [esp + 0x3c]
movzx edx, word [esp + 0x3e]
jmp 0x40ecac
mov ebp, dword [esp + 0xc8]
mov esi, dword [esp + 0xc4]
mov eax, dword [esi*4 + 0x47d6e0]
lea edx, [esp + 0x98]
push edx
mov dword [esp + 0x9c], eax
mov eax, dword [esi*4 + 0x47e7f8]
lea ecx, [esp + 0x34]
push 0x601
push eax
mov dword [esp + 0xa8], ecx
call fcn.0041a6e0
add esp, 0xc
test eax, eax
jne 0x40eef0
mov ecx, dword [ebp*4 + 0x47d6e0]
lea eax, [esp + 0x98]
push eax
mov dword [esp + 0x9c], ecx
mov ecx, dword [ebp*4 + 0x47e7f8]
lea edx, [esp + 0x68]
push 0x601
push ecx
mov dword [esp + 0xa8], edx
call fcn.0041a6e0
add esp, 0xc
cmp eax, 0x100209
jne 0x40ee87
pop edi
pop esi
mov eax, 0x100219
pop ebp
or eax, 0x80000000
pop ebx
add esp, 0xb0
ret
test eax, eax
je 0x40ef81
pop edi
pop esi
pop ebp
or eax, 0x80000000
pop ebx
add esp, 0xb0
ret
mov eax, dword [esp + 0xc4]
mov edx, dword [eax*4 + 0x47d6e0]
mov eax, dword [eax*4 + 0x47e7f8]
mov dword [esp + 0x98], edx
lea edx, [esp + 0x98]
push edx
lea ecx, [esp + 0x34]
push 0x601
push eax
mov dword [esp + 0xa8], ecx
call fcn.0041a6e0
add esp, 0xc
test eax, eax
jne 0x40eef0
pop edi
pop esi
pop ebp
mov eax, 0x100211
pop ebx
add esp, 0xb0
ret
cmp eax, 0x100209
jne 0x40ef81
pop edi
pop esi
pop ebp
mov eax, 0x100218
pop ebx
add esp, 0xb0
ret
test eax, eax
je 0x40ef7c
mov eax, dword [esp + 0xc8]
mov ecx, dword [eax*4 + 0x47d6e0]
mov dword [esp + 0x98], ecx
lea ecx, [esp + 0x98]
lea edx, [esp + 0x64]
push ecx
mov dword [esp + 0xa0], edx
mov edx, dword [eax*4 + 0x47e7f8]
push 0x601
push edx
call fcn.0041a6e0
add esp, 0xc
test eax, eax
jne 0x40ef60
pop edi
pop esi
pop ebp
mov eax, 0x100210
pop ebx
add esp, 0xb0
ret
cmp eax, 0x100209
jne 0x40ef6c
mov eax, 0x100219
pop edi
pop esi
pop ebp
or eax, 0x80000000
pop ebx
add esp, 0xb0
ret
mov eax, 0x100212
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb0
ret