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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4da3b6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40c
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x18], esi
mov eax, dword [esi + 0x2d4]
test eax, eax
je 0x4922df
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
call sub.MFC42.DLL_CCmdTarget::BeginWaitCursor
mov ecx, dword [esi + 0x2d4]
call fcn.004b5af0
lea ecx, [eax + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x124], 0xf4240
mov dword [esp + 0x12c], 0xfff0bdc0
lea edx, [esp + 0x380]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 5
mov edi, edx
mov eax, 0xf4240
mov dword [edi], eax
mov eax, dword [esp + 0x124]
mov dword [edi + 4], eax
mov eax, 0xfff0bdc0
mov dword [edi + 8], eax
mov eax, dword [esp + 0x12c]
mov dword [edi + 0xc], eax
mov eax, dword [ecx - 4]
cmp eax, dword [ecx]
je 0x49183d
lea ebx, [edx + 4]
lea edi, [edx + 0xc]
mov ecx, dword [edx]
mov esi, dword [eax]
cmp ecx, esi
jl 0x4917fc
mov ecx, esi
mov dword [edx], ecx
mov ecx, dword [eax]
cmp dword [edx + 8], ecx
lea esi, [edx + 8]
jle 0x49180b
mov ecx, dword [edx + 8]
lea esi, [edx + 8]
mov dword [esi], ecx
mov ecx, dword [eax + 4]
cmp dword [ebx], ecx
jge 0x49181d
mov ecx, dword [edx + 4]
lea ebx, [edx + 4]
mov dword [ebx], ecx
mov ecx, dword [eax + 4]
cmp dword [edi], ecx
jle 0x49182c
mov ecx, dword [edx + 0xc]
lea edi, [edx + 0xc]
mov dword [edi], ecx
mov ecx, dword [esp + 0xc]
add eax, 8
cmp eax, dword [ecx]
jne 0x4917f2
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
add ecx, 0xc
add edx, 0x10
dec eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
jne 0x4917c0
xor edx, edx
mov ecx, 0x1e
mov dword [esp + 0xa8], edx
xor eax, eax
mov dword [esp + 0xac], edx
lea edi, [esp + 0x288]
mov dword [esp + 0x280], edx
mov dword [esp + 0x284], edx
rep stosd dword es:[edi], eax
mov ecx, 0x1e
lea edi, [esp + 0x308]
mov dword [esp + 0x300], eax
mov dword [esp + 0x304], eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x300]
mov dword [esp + 0xb0], edx
lea ecx, [esp + 0x280]
push eax
lea edx, [esp + 0xa8]
push ecx
mov ecx, dword [esi + 0x38]
xor ebx, ebx
push edx
push 0x61
mov dword [esp + 0xb4], ebx
call fcn.004457c0
push fcn.00426aa0
push fcn.00426a10
push 5
lea eax, [esp + 0x19c]
push 0xc
push eax
call fcn.004ce784
mov eax, dword [ebp + 8]
mov dword [esp + 0x420], ebx
cmp eax, ebx
je 0x491aaf
mov eax, dword [esi + 0x84]
cmp eax, ebx
je 0x4922be
mov ecx, dword [esi + 0x88]
sub ecx, eax
test ecx, 0xfffffff0
je 0x4922be
mov ecx, dword [esi + 0x88]
mov dword [esp + 0xc], eax
cmp eax, ecx
je 0x491b1c
mov ebx, dword [esp + 0x14]
xor esi, esi
lea edi, [esp + 0x380]
jmp 0x491946
mov eax, dword [esp + 0xc]
fld dword [eax]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
fstp qword [esp + 0x4c]
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], edx
fld dword [esp + 0x9c]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x54]
fstp qword [esp + 0x84]
fld dword [esp + 0xa0]
push eax
lea edx, [esp + 0x48]
fstp qword [esp + 0x20]
push ecx
lea eax, [esp + 0xac]
push edx
lea ecx, [esp + 0x30c]
push eax
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x290]
push ecx
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0xa0]
push eax
mov eax, dword [esp + 0xa0]
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x70]
push eax
push ecx
push edx
call sub.GLU32.dll_gluProject
fld qword [0x4e1438]
fld qword [esp + 0x44]
fcomp qword [0x4e00c0]
mov dword [esp + 0x10], eax
fnstsw ax
test ah, 1
je 0x4919ec
fstp st(0)
fld qword [0x4e1488]
fmul qword [0x4e19a8]
fadd qword [esp + 0x44]
call sub.MSVCRT.dll__ftol
fld qword [esp + 0x54]
fcomp qword [0x4e00c0]
mov dword [esp + 0x8c], eax
fnstsw ax
test ah, 1
jne 0x491a1b
fld qword [0x4e1438]
jmp 0x491a21
fld qword [0x4e1488]
fmul qword [0x4e19a8]
fadd qword [esp + 0x54]
call sub.MSVCRT.dll__ftol
mov ecx, eax
mov eax, dword [esp + 0xb0]
sub eax, ecx
mov ecx, dword [esp + 0x10]
dec eax
test ecx, ecx
sete cl
test cl, cl
jne 0x491a60
mov edx, dword [esp + 0x8c]
push eax
push edx
push edi
push ebx
call fcn.0043e620
add esp, 0x10
test al, al
jne 0x491a72
inc esi
add edi, 0x10
add ebx, 0xc
cmp esi, 5
jl 0x491942
jmp 0x491a90
lea eax, [esi + esi*2]
lea edx, [esp + 0xc]
push edx
push 1
lea ecx, [esp + eax*4 + 0x198]
mov eax, dword [esp + eax*4 + 0x19c]
push eax
call fcn.0043f580
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0xc]
add eax, 0x10
mov edx, dword [ecx + 0x88]
mov dword [esp + 0xc], eax
cmp eax, edx
jne 0x491933
jmp 0x491b18
cmp dword [esi + 0x238], ebx
je 0x4922be
mov eax, dword [esi + 0x234]
mov esi, dword [eax + 0xb0]
cmp esi, eax
je 0x491b18
mov al, byte [esi + 0x48]
test al, al
jne 0x491b06
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x190]
lea ecx, [esp + 0x380]
push eax
push ecx
lea eax, [esp + 0x308]
push edx
lea ecx, [esp + 0x28c]
push eax
lea edx, [esp + 0xb4]
push ecx
push edx
mov ecx, esi
call fcn.00425470
mov eax, dword [esp + 0x18]
mov esi, dword [esi + 0xb0]
cmp esi, dword [eax + 0x234]
jne 0x491acb
mov esi, dword [esp + 0x18]
push fcn.004011f0
push fcn.00426a10
push 3
lea ecx, [esp + 0x6c]
push 0xc
push ecx
call fcn.004ce784
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
lea ecx, [esp + 0x130]
mov byte [esp + 0x420], 2
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
call fcn.0040d1c0
mov dword [esp + 0x160], 0
mov dword [esp + 0x164], 0
mov dword [esp + 0x168], 0
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x10]
push eax
push ecx
lea ecx, [esp + 0x178]
mov byte [esp + 0x42c], 4
mov dword [esp + 0x20], 0x3f800000
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
call fcn.00405110
lea edx, [esp + 0x28]
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0x184]
mov byte [esp + 0x42c], 5
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0x3f800000
call fcn.00405110
lea edx, [esp + 0x54]
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x50]
push eax
push ecx
lea ecx, [esp + 0x190]
mov byte [esp + 0x42c], 6
mov dword [esp + 0x60], 0
mov dword [esp + 0x50], 0x3f800000
mov dword [esp + 0x58], 0
call fcn.00405110
mov dword [esp + 0x130], 0x4dffb0
mov dword [esp + 0x140], 3
mov ecx, dword [esi + 0x38]
lea edx, [esp + 0x114]
push edx
mov byte [esp + 0x424], 7
call fcn.00446320
lea ecx, [esp + 0x40]
mov byte [esp + 0x420], 8
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp + 0x18]
push 0x4fed50
push eax
mov byte [esp + 0x428], 9
call sub.MFC42.DLL_CString::Format
add esp, 8
xor ebx, ebx
mov dword [esp + 0x10], ebx
lea edi, [esp + 0x190]
mov dword [esp + 0xc], edi
mov eax, dword [edi]
test eax, eax
jne 0x491cb5
xor esi, esi
jmp 0x491cbd
mov esi, dword [edi + 4]
sub esi, eax
sar esi, 2
mov eax, dword [edi]
mov dword [esp + 0x14], esi
test eax, eax
mov dword [esp + 0x2c], eax
je 0x491fd6
cmp esi, 4
jl 0x491fd6
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xd4]
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0x4c], eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x4c]
mov dword [esp + 0x44], eax
mov dword [esp + 0x54], eax
lea edx, [esp + 0x44]
push ecx
lea eax, [esp + 0x58]
push edx
push eax
lea ecx, [esp + 0x208]
call fcn.00405110
lea ecx, [esp + 0x238]
push eax
push ecx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x428], 0xa
call fcn.004051b0
mov edi, dword [esp + 0x2c]
xor edx, edx
fld qword [0x4e00c0]
mov dword [esp + 0xbc], edx
mov byte [esp + 0x420], 9
mov dword [esp + 0xc0], edx
mov ecx, edi
mov dword [esp + 0xc4], edx
test esi, esi
mov dword [esp + 0xc8], edx
jle 0x491da7
fld qword [esp + 0xc4]
fld qword [esp + 0xbc]
mov edx, esi
mov eax, dword [ecx]
add ecx, 4
dec edx
fld dword [eax]
faddp st(3)
fadd dword [eax + 4]
fld dword [eax + 8]
faddp st(2)
jne 0x491d85
fstp qword [esp + 0xbc]
fstp qword [esp + 0xc4]
fild dword [esp + 0x14]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x2c]
fstp qword [esp + 0x20]
fdiv qword [esp + 0x20]
push ecx
push edx
lea ecx, [esp + 0x1e4]
fld qword [esp + 0xc8]
fdiv qword [esp + 0x28]
fst qword [esp + 0xc8]
fld qword [esp + 0xd0]
fdiv qword [esp + 0x28]
fst qword [esp + 0xd0]
fstp dword [esp + 0x38]
fstp dword [esp + 0x30]
fstp dword [esp + 0x34]
call fcn.00405110
push eax
lea eax, [esp + 0x1e8]
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x428], 0xb
call fcn.004051b0
test esi, esi
mov byte [esp + 0x420], 9
mov ecx, edi
jle 0x491ede
mov eax, dword [ecx]
add ecx, 4
dec esi
fld dword [eax]
fsub dword [esp + 0x34]
fld st(0)
fmul st(1)
fadd qword [esp + 0xcc]
fstp qword [esp + 0xcc]
fstp st(0)
fld dword [eax + 4]
fsub dword [esp + 0x38]
fld st(0)
fmul st(1)
fadd qword [esp + 0xec]
fstp qword [esp + 0xec]
fstp st(0)
fld dword [eax + 8]
fsub dword [esp + 0x3c]
fld st(0)
fmul st(1)
fadd qword [esp + 0x10c]
fstp qword [esp + 0x10c]
fstp st(0)
fld dword [eax + 4]
fsub dword [esp + 0x38]
fld dword [eax]
fsub dword [esp + 0x34]
fmulp st(1)
fadd qword [esp + 0xd4]
fstp qword [esp + 0xd4]
fld dword [eax + 8]
fsub dword [esp + 0x3c]
fld dword [eax]
fsub dword [esp + 0x34]
fmulp st(1)
fadd qword [esp + 0xdc]
fstp qword [esp + 0xdc]
fld dword [eax + 8]
fsub dword [esp + 0x3c]
fld dword [eax + 4]
fsub dword [esp + 0x38]
fmulp st(1)
fadd qword [esp + 0xf4]
fstp qword [esp + 0xf4]
jne 0x491e2a
mov ecx, dword [esp + 0xd4]
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + 0xdc]
mov dword [esp + 0xe4], ecx
mov ecx, dword [esp + 0xe0]
mov dword [esp + 0xe8], edx
mov edx, dword [esp + 0xf4]
mov dword [esp + 0x100], ecx
lea ecx, [esp + 0x3d0]
mov dword [esp + 0x104], edx
mov dword [esp + 0xfc], eax
mov eax, dword [esp + 0xf8]
push ecx
lea edx, [esp + 0xd0]
push 3
push edx
mov dword [esp + 0x114], eax
call fcn.00475860
fstp st(0)
add esp, 0xc
lea edi, [esp + 0x60]
lea esi, [esp + 0x3e8]
mov ebx, 3
fld qword [esi + 0x18]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x24]
fstp dword [esp + 0x2c]
fld qword [esi]
push eax
lea edx, [esp + 0x2c]
fstp dword [esp + 0x28]
fld qword [esi - 0x18]
push ecx
push edx
fstp dword [esp + 0x34]
lea ecx, [esp + 0x1d8]
call fcn.00405110
push eax
lea eax, [esp + 0x218]
push eax
mov ecx, edi
mov byte [esp + 0x428], 0xc
call fcn.004051b0
mov ecx, edi
mov byte [esp + 0x420], 9
call fcn.00405150
add esi, 8
add edi, 0xc
dec ebx
jne 0x491f5e
fld qword [esp + 0xcc]
fdiv qword [esp + 0x1c]
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
fsqrt
fstp qword [esp + 0x1c]
mov eax, dword [edi]
test eax, eax
je 0x491fef
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
lea ecx, [esp + 0x34]
lea edx, [esp + 0x22c]
push ecx
push edx
lea ecx, [esp + 0x168]
call fcn.004051b0
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
push esi
push eax
push ebx
lea ecx, [esp + 0x4c]
push 0x4fed40
push ecx
call sub.MFC42.DLL_CString::Format
mov ecx, dword [ebp + 0x18]
add esp, 0x14
lea edx, [esp + 0x40]
push edx
call sub.MFC42.DLL_CString::operator_1
fld dword [esp + 0x60]
fmul dword [esp + 0x114]
fld dword [esp + 0x118]
fmul dword [esp + 0x64]
faddp st(1)
fld dword [esp + 0x11c]
fmul dword [esp + 0x68]
faddp st(1)
fcomp qword [0x4e00c0]
fnstsw ax
test ah, 0x41
je 0x492097
lea eax, [esp + 0x8c]
lea ecx, [esp + 0x60]
push eax
lea edx, [esp + 0x278]
push ecx
push edx
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0xbff00000
call fcn.00405920
add esp, 0xc
lea eax, [esp + 0x60]
lea ecx, [esp + 0x244]
push eax
push ecx
lea ecx, [esp + 0x74]
call fcn.00417d60
lea edx, [esp + 0x1f0]
push eax
push edx
lea ecx, [esp + 0x80]
mov byte [esp + 0x428], 0xd
call fcn.004051b0
fld dword [esp + 0x7c]
fld dword [esp + 0x80]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
mov byte [esp + 0x420], 9
faddp st(1)
fld dword [esp + 0x78]
fmul dword [esp + 0x78]
faddp st(1)
fsqrt
fstp st(2)
fstp st(0)
fld st(0)
fabs
fcomp qword [0x4e00d0]
fnstsw ax
test ah, 0x41
je 0x492127
fstp st(0)
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
jmp 0x49214d
fld dword [esp + 0x78]
fdiv st(1)
fstp dword [esp + 0x78]
fld dword [esp + 0x7c]
fdiv st(1)
fstp dword [esp + 0x7c]
fld dword [esp + 0x80]
fdiv st(1)
fstp dword [esp + 0x80]
fstp st(0)
lea eax, [esp + 0x60]
lea ecx, [esp + 0x250]
push eax
push ecx
lea ecx, [esp + 0x174]
call fcn.004051b0
lea edx, [esp + 0x6c]
lea eax, [esp + 0x208]
push edx
push eax
lea ecx, [esp + 0x18c]
call fcn.004051b0
lea ecx, [esp + 0x78]
lea edx, [esp + 0x25c]
push ecx
push edx
lea ecx, [esp + 0x180]
call fcn.004051b0
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x49222a
fld qword [ebp + 0x10]
lea ecx, [esp + 0x98]
fstp dword [esp + 0x84]
call fcn.00426a10
lea eax, [esp + 0x16c]
lea ecx, [esp + 0x84]
push eax
lea edx, [esp + 0x224]
push ecx
push edx
mov byte [esp + 0x42c], 0xe
call fcn.00405860
add esp, 0xc
push eax
lea eax, [esp + 0x26c]
push eax
lea ecx, [esp + 0xa0]
mov byte [esp + 0x428], 0xf
call fcn.004051b0
lea ecx, [esp + 0x98]
lea edx, [esp + 0x120]
push ecx
push edx
lea ecx, [esp + 0x168]
mov byte [esp + 0x428], 0xe
call fcn.00405270
mov byte [esp + 0x420], 9
mov eax, dword [esp + 0x1c]
push esi
push eax
lea edx, [esp + 0x138]
sub esp, 0x60
mov ecx, esp
mov dword [esp + 0x94], esp
push edx
call fcn.00403f00
mov eax, dword [esp + 0x80]
push ebx
mov ecx, dword [eax + 0x2d4]
call fcn.004b2480
inc ebx
add edi, 0xc
cmp ebx, 5
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edi
jl 0x491cab
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
call sub.MFC42.DLL_CCmdTarget::EndWaitCursor
lea ecx, [esp + 0x40]
mov byte [esp + 0x420], 8
call fcn.004ce042
lea ecx, [esp + 0x130]
mov byte [esp + 0x420], 2
call fcn.00404070
push fcn.004011f0
push 3
lea ecx, [esp + 0x68]
push 0xc
push ecx
mov byte [esp + 0x430], 0
call fcn.004ce690
push fcn.00426aa0
push 5
lea edx, [esp + 0x198]
push 0xc
push edx
mov dword [esp + 0x430], 0xffffffff
call fcn.004ce690
mov ecx, dword [esp + 0x418]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x14