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

Disassembly:
sub esp, 0x6c
xor eax, eax
mov dword [esp + 0xd], eax
mov dword [esp + 0x11], eax
mov dword [esp + 0x15], eax
mov dword [esp + 0x19], eax
mov dword [esp + 0x1d], eax
mov dword [esp + 0x21], eax
push ebx
mov dword [esp + 0x29], eax
mov word [esp + 0x2d], ax
push ebp
mov ebx, ecx
mov byte [esp + 0x33], al
mov eax, dword [ebx + 0x2c]
test eax, eax
push esi
push edi
mov edi, dword [esp + 0x80]
mov byte [esp + 0x1c], 0
je 0x5076d0
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [ebx + 0x3d8]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0xa8], esp
push 0x5d9d94
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [ebx + 0x2c]
call fcn.004984c0
test eax, eax
jl 0x507748
push edi
push edi
call sub.d3dx9_35.dll_D3DXVec3Normalize
lea ecx, [esp + 0x10]
push ecx
mov edx, ecx
push edx
call sub.d3dx9_35.dll_D3DXVec3Normalize
lea eax, [esp + 0x1c]
mov edx, 0x5d9d94
mov ecx, eax
mov esi, 0x20
sub edx, ecx
mov cl, byte [edx + eax]
test cl, cl
je 0x507740
mov byte [eax], cl
inc eax
dec esi
jne 0x5076c1
jmp 0x507744
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x507748
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x14]
push eax
lea ecx, [ebx + 0x3d8]
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0xa8], esp
push 0x5d9d94
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [ebx + 0x30]
call fcn.0046d810
test eax, eax
jl 0x507748
push edi
push edi
call sub.d3dx9_35.dll_D3DXVec3Normalize
lea edx, [esp + 0x10]
push edx
mov eax, edx
push eax
call sub.d3dx9_35.dll_D3DXVec3Normalize
lea eax, [esp + 0x1c]
mov edx, 0x5d9d94
mov ecx, eax
mov esi, 0x20
sub edx, ecx
mov cl, byte [edx + eax]
test cl, cl
je 0x507740
mov byte [eax], cl
inc eax
dec esi
jne 0x507731
jmp 0x507744
test esi, esi
jne 0x507745
dec eax
mov byte [eax], 0
lea edx, [esp + 0x3c]
push edx
push 0
mov eax, edx
push eax
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
call sub.d3dx9_35.dll_D3DXMatrixInverse
lea ecx, [esp + 0x3c]
push ecx
push edi
push edi
call sub.d3dx9_35.dll_D3DXVec3TransformNormal
push 0x3c
call sub.MFC71.DLL_operator_new_1
add esp, 4
test eax, eax
je 0x5077b2
mov dword [eax + 0x38], 0
xor edx, edx
mov ecx, eax
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x14], edx
mov dword [ecx + 0x18], edx
mov dword [ecx + 0x1c], edx
mov esi, eax
jmp 0x5077b4
xor esi, esi
lea edx, [esp + 0x1c]
mov ebp, 0x20
mov eax, esi
sub edx, esi
mov cl, byte [edx + eax]
test cl, cl
je 0x5077d0
mov byte [eax], cl
inc eax
dec ebp
jne 0x5077c1
jmp 0x5077d4
test ebp, ebp
jne 0x5077d5
dec eax
mov byte [eax], 0
mov eax, dword [edi]
lea edx, [esi + 0x20]
mov dword [edx], eax
mov ecx, dword [edi + 4]
mov dword [edx + 4], ecx
mov eax, dword [edi + 8]
mov edi, dword [sym.imp.MSVCR71.dll_rand]
mov dword [edx + 8], eax
mov ecx, dword [ebx + 0x470]
mov dword [esi + 0x2c], ecx
test byte [ebx + 0x88], 0x40
je 0x507826
call edi
cdq
mov ecx, 0x24
idiv ecx
mov dword [esp + 0x80], edx
fild dword [esp + 0x80]
fmul dword [0x5d4bc0]
fstp dword [esi + 0x30]
jmp 0x50782d
mov dword [esi + 0x30], 0
call edi
cdq
mov ecx, 0x64
idiv ecx
pop edi
sub edx, 0x32
mov dword [esp + 0x7c], edx
fild dword [esp + 0x7c]
xor eax, eax
fmul dword [0x5d3808]
fsub dword [0x5d4a58]
fmul dword [0x5e2ba4]
fstp dword [esi + 0x34]
mov edx, dword [ebx + 0x4b4]
mov dword [esi + 0x38], edx
mov dword [ebx + 0x4b4], esi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 4