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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4dc89a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x35c
push ebx
mov ebx, ecx
push esi
push edi
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
xor edi, edi
lea ecx, [esp + 0x24]
mov dword [esp + 0x370], edi
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x370], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x370], 2
call sub.MFC42.DLL_CString::CString
push 0x4ff2f4
lea ecx, [esp + 0x24]
mov byte [esp + 0x374], 3
call sub.MFC42.DLL_CString::CString_1
mov esi, dword [ebp + 8]
mov ecx, dword [esp + 0x20]
push edi
push ecx
mov eax, dword [esi]
push 6
push eax
push 0x4fe7d8
push edi
lea ecx, [esp + 0x184]
mov byte [esp + 0x388], 4
call fcn.004ce0c6
mov eax, dword [esi]
lea ecx, [esp + 0x16c]
mov byte [esp + 0x370], 5
mov dword [esp + 0x1f8], eax
call sub.MFC42.DLL_CFileDialog::DoModal
cmp eax, 2
jne 0x4b5250
mov byte [esp + 0x370], 6
jmp 0x4b5371
lea edx, [esp + 0x10]
lea ecx, [esp + 0x16c]
push edx
call sub.MFC42.DLL_CFileDialog::GetPathName
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x374], 7
call fcn.004ce0b4
lea ecx, [esp + 0x10]
mov byte [esp + 0x370], 5
call fcn.004ce042
lea eax, [esp + 0x10]
lea ecx, [esp + 0x16c]
push eax
call sub.MFC42.DLL_CFileDialog::GetFileName
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x374], 8
call fcn.004ce0b4
lea ecx, [esp + 0x10]
mov byte [esp + 0x370], 5
call fcn.004ce042
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x170]
call sub.MFC42.DLL_CFileDialog::GetFileTitle
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x374], 9
call fcn.004ce0b4
lea ecx, [esp + 0x10]
mov byte [esp + 0x370], 5
call fcn.004ce042
lea edx, [esp + 0x10]
lea ecx, [esp + 0x16c]
push edx
call sub.MFC42.DLL_CFileDialog::GetFileExt
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x374], 0xa
call fcn.004ce0b4
lea ecx, [esp + 0x10]
mov byte [esp + 0x370], 5
call fcn.004ce042
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::MakeUpper
mov eax, dword [esp + 0x18]
push 0x4fe6f0
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x4b534a
mov byte [esp + 0x370], 0xb
jmp 0x4b5371
mov ecx, dword [esp + 0x14]
push 0x4fd444
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, edi
mov dword [esp + 0x10], eax
jne 0x4b5402
mov byte [esp + 0x370], 0xc
lea ecx, [esp + 0x21c]
call fcn.004ce042
lea ecx, [esp + 0x16c]
mov byte [esp + 0x370], 4
call fcn.004ce09c
lea ecx, [esp + 0x20]
mov byte [esp + 0x370], 3
call fcn.004ce042
lea ecx, [esp + 0x18]
mov byte [esp + 0x370], 2
call fcn.004ce042
lea ecx, [esp + 0x1c]
mov byte [esp + 0x370], 1
call fcn.004ce042
lea ecx, [esp + 0x24]
mov byte [esp + 0x370], 0
call fcn.004ce042
lea ecx, [esp + 0x14]
mov dword [esp + 0x370], 0xffffffff
call fcn.004ce042
xor al, al
mov ecx, dword [esp + 0x368]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea edx, [esp + 0x14]
mov ecx, esi
push edx
call fcn.004ce0b4
xor eax, eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], eax
mov ecx, 0x1e
mov dword [esp + 0x44], eax
lea edi, [esp + 0xf4]
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], eax
rep stosd dword es:[edi], eax
mov ecx, 0x1e
lea edi, [esp + 0x74]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x6c]
mov dword [esp + 0x48], eax
lea edx, [esp + 0xec]
push ecx
mov ecx, dword [ebx + 0x4f8]
lea eax, [esp + 0x40]
push edx
push eax
push 0x61
call fcn.004457c0
mov edi, dword [sym.imp.OPENGL32.dll_glReadPixels]
lea esi, [ebx + 0x474]
mov ebx, 8
mov eax, dword [esp + 0x48]
mov edx, dword [esi + 4]
mov ecx, dword [esi]
sub eax, edx
lea edx, [esp + 0x28]
dec eax
push edx
push 0x1406
push 0x1902
push 1
push 1
push eax
push ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x48], eax
call edi
fld dword [esp + 0x28]
fsub qword [0x4e1438]
fabs
fcomp qword [0x4e00d0]
fnstsw ax
test ah, 1
jne 0x4b5560
fild dword [esp + 0x34]
lea eax, [esp + 0x54]
lea ecx, [esp + 0x64]
push eax
lea edx, [esp + 0x60]
fstp qword [esp + 0x50]
fild dword [esp + 0x30]
push ecx
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x78]
fstp qword [esp + 0x40]
fld dword [esp + 0x34]
push eax
lea edx, [esp + 0xfc]
fstp qword [esp + 0x3c]
mov eax, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push edx
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x70]
push eax
push ecx
push edx
call sub.GLU32.dll_gluUnProject
fld qword [esp + 0x5c]
fld qword [esp + 0x64]
fld qword [esp + 0x54]
test eax, eax
je 0x4b555a
sub esp, 8
mov eax, dword [esp + 0x18]
fstp qword [esp]
sub esp, 8
fstp qword [esp]
sub esp, 8
fstp qword [esp]
push str._f___f___f_n
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x20
jmp 0x4b5560
fstp st(0)
fstp st(0)
fstp st(0)
add esi, 8
dec ebx
jne 0x4b547f
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x21c]
mov byte [esp + 0x370], 0xd
call fcn.004ce042
lea ecx, [esp + 0x16c]
mov byte [esp + 0x370], 4
call fcn.004ce09c
lea ecx, [esp + 0x20]
mov byte [esp + 0x370], 3
call fcn.004ce042
lea ecx, [esp + 0x18]
mov byte [esp + 0x370], 2
call fcn.004ce042
lea ecx, [esp + 0x1c]
mov byte [esp + 0x370], 1
call fcn.004ce042
lea ecx, [esp + 0x24]
mov byte [esp + 0x370], 0
call fcn.004ce042
lea ecx, [esp + 0x14]
mov dword [esp + 0x370], 0xffffffff
call fcn.004ce042
mov ecx, dword [esp + 0x368]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4