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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x7170ef
push eax
mov eax, dword [0x7b92a0]
mov dword fs:[0], esp
sub esp, 0xf4
test eax, eax
jne 0x4766c6
mov eax, dword [esp + 0x104]
push eax
call fcn.0046f900
jmp 0x47702b
mov ecx, dword [0x73f274]
mov edx, dword [0x73f270]
push ecx
push edx
call dword [0x73d38c]
mov eax, dword [0x78e670]
test eax, eax
je 0x47702e
mov eax, dword [0x78e614]
test eax, eax
je 0x47702e
mov eax, dword [0x7b92a0]
mov ecx, dword [eax + 0x80]
call fcn.004a28a0
push eax
lea ecx, [esp + 0x38]
call fcn.0046d250
mov eax, dword [esp + 0x38]
test eax, eax
mov dword [esp + 0xfc], 0
jne 0x476736
mov ecx, dword [esp + 0x104]
push ecx
call fcn.0046f900
add esp, 4
jmp 0x477012
mov edx, dword [0x78d44c]
push ebx
push ebp
push esi
push edi
push edx
call dword [0x73d37c]
mov ebx, dword [0x73d22c]
movzx ebp, al
mov eax, dword [0x78d44c]
push eax
mov dword [esp + 0x1c], ebp
call ebx
call fcn.0046eda0
test eax, eax
je 0x476dad
mov eax, dword [0x78e62c]
test eax, eax
je 0x476dad
push 0
push 0
push 0
push 0
push 0xd
call dword [0x7a47e0]
mov eax, dword [0x78e5ec]
add esp, 0x14
test eax, eax
je 0x476799
push 0x8620
jmp 0x4767a0
mov ecx, dword [0x78d46c]
push ecx
call ebx
mov edx, dword [esp + 0x114]
mov ecx, dword [edx + 8]
mov eax, dword [ecx]
call dword [eax + 0x2c]
mov ebp, eax
xor esi, esi
test ebp, ebp
je 0x4767bc
mov esi, dword [ebp + 4]
test byte [0x8301d4], 1
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
jne 0x476855
or dword [0x8301d4], 1
push 0x201c
mov byte [esp + 0x110], 1
call fcn.006fa7e6
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x10c], 2
je 0x476846
mov ecx, dword [0x78e5ec]
test ecx, ecx
mov ecx, str.__ARBvp1.0PARAM_mvMatrix_4____state.matrix.modelview_0____nPARAM_mvpMatrix_4____state.matrix.mvp___nTEMP_vReg10__vLength__vTemp__nTEMP_vReg0__vReg1__vReg2__vReg3__nALIAS_vNormalWorld__vLength__nALIAS_vFinalColour__vTemp__nPARAM_fogParams__state.fog.params__nDP4___result.position.x__mvpMatrix_0___vertex.position__nDP4___result.position.y__mvpMatrix_1___vertex.position__nDP4___result.position.z__mvpMatrix_2___vertex.position__nDP4___result.position.w__mvpMatrix_3___vertex.position__nSUB__vReg10__program.env_12___vertex.position__nDP3___vReg10.w__vReg10__vReg10__nRSQ___vLength.w__vReg10.w__nDST_vTemp__vReg10.wwww__vLength.wwww__nDP3_vTemp.w__vTemp__program.env_14___nRCP_vTemp.w__vTemp.w__nMOV___result.color.secondary__vTemp.wwww__nMUL___vReg10__vReg10__vLength.w__nDP3___result.texcoord_1_.x__vertex.attrib_12___vReg10__nDP3___result.texcoord_1_.y__vertex.attrib_13___vReg10__nDP3___result.texcoord_1_.z__vertex.attrib_14___vReg10__nMOV___result.texcoord_1_.w__1__nSUB_vTemp__program.env_13___vertex.position__nDP3___vTemp.w__vTemp__vTemp__nRSQ___vTemp.w__vTemp.w__nMUL___vTemp__vTemp__vTemp.w__nADD_vTemp__vTemp_vReg10__nDP3___result.texcoord_2_.x__vertex.attrib_12___vTemp__nDP3___result.texcoord_2_.y__vertex.attrib_13___vTemp__nDP3___result.texcoord_2_.z__vertex.attrib_14___vTemp__nMOV___result.texcoord_2_.w__1__nDP3___vNormalWorld.x__mvMatrix_0___vertex.normal__nDP3___vNormalWorld.y__mvMatrix_1___vertex.normal__nDP3___vNormalWorld.z__mvMatrix_2___vertex.normal__nMOV___result.texcoord_0___vertex.texcoord_0___nMOV___result.texcoord_3___vertex.texcoord_0___nDP4___vReg10.x__mvMatrix_0___vertex.position__nDP4___vReg10.y__mvMatrix_1___vertex.position__nDP4___vReg10.z__mvMatrix_2___vertex.position__nDP4___vReg10.w__mvMatrix_3___vertex.position__nDP3_tvReg0.x__vReg10__vReg10__nRSQ_tvReg0.x__vReg0.x__nRCP_tvReg0.x__vReg0.x__nMOV_result.fogcoord.x__vReg0.x__n
jne 0x476835
mov ecx, str.__VP1.0__This_is_the_vertex_program_for_transforming_light_halfangle_vectors_into_tangent_space._nDP4___o_HPOS_.x__c_0___v_OPOS__DP4___o_HPOS_.y__c_1___v_OPOS__DP4___o_HPOS_.z__c_2___v_OPOS__DP4___o_HPOS_.w__c_3___v_OPOS__ADD__R0__c_12____v_OPOS__DP3___R0.w__R0__R0_RSQ___R1.w__R0.w_DST_R2__R0.w__R1.w_DP3_R2.w__R2__c_14__RCP_R2.w__R2.w_MOV___R4.xyzw__R2.wwww_MUL___R0__R0__R1.w_MOV___R0.w__c_17_.x_DP3___R1.x__v_TEX4___R0_DP3___R1.y__v_TEX5___R0_DP3___R1.z__v_TEX6___R0_MOV___R1.w__c_17_.x_MOV___o_TEX1___R1_ADD_R2__c_13___v_OPOS__DP3___R2.w__R2__R2_RSQ___R2.w__R2.w_MUL___R2__R2__R2.w_MOV___R2.w__c_17_.x_ADD_R2__R2_R0_MOV___R2.w__c_17_.x_DP3___R1.x__v_TEX4___R2_DP3___R1.y__v_TEX5___R2_DP3___R1.z__v_TEX6___R2_MOV___R1.w__c_17_.x_MOV___o_TEX2___R1_DP4___R10.x__c_8___v_OPOS__DP4___R10.y__c_9___v_OPOS__DP4___R10.z__c_10___v_OPOS__DP4___R10.w__c_11___v_OPOS__DP3___R11.x__c_8___v_NRML__DP3___R11.y__c_9___v_NRML__DP3___R11.z__c_10___v_NRML__DP3___R1.w__R10__R10_RSQ___R1.w__R1.w_RCP___R1.w__R1.w_MOV___o_FOGC___R1.w_MOV___R9__v_COL0__MOV___o_TEX0___v_TEX0__MOV___o_TEX3___v_TEX0__MOV___o_COL1___R4_
mov edx, dword [0x830550]
push edx
push ecx
mov ecx, eax
call fcn.004a27d0
jmp 0x476848
xor eax, eax
mov dword [0x8301d0], eax
mov byte [esp + 0x10c], 0
mov eax, dword [0x78e5ec]
test eax, eax
je 0x476865
push 0x8620
jmp 0x47686b
mov eax, dword [0x78d46c]
push eax
call dword [0x73d390]
test esi, esi
je 0x4768b3
lea ecx, [esp + 0xc0]
push ecx
mov ecx, dword [ebp + 0x44]
call fcn.00471430
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x38], edx
mov edx, dword [eax + 8]
add esi, 0x8c
mov eax, dword [esi]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x40], edx
mov edx, dword [esi + 8]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov eax, dword [0x78e5ec]
test eax, eax
je 0x4768d6
push 0xc
call dword [0x7bb79c]
push 0xd
call dword [0x7bb79c]
push 0xe
call dword [0x7bb79c]
jmp 0x4768f6
mov eax, dword [0x73f3b8]
mov esi, dword [0x73d260]
push eax
call esi
mov ecx, dword [0x73f3bc]
push ecx
call esi
mov edx, dword [0x73f3c0]
push edx
call esi
mov eax, dword [ebp + 0x44]
mov edx, dword [eax]
mov ecx, dword [0x7b92a0]
mov ecx, dword [ecx + 0xa4]
mov eax, dword [eax + 0x10]
push edx
push ecx
push ecx
push eax
push 6
call dword [0x7a47e0]
mov eax, dword [0x7b92a0]
mov ecx, dword [eax + 0x60]
add esp, 0x14
test ecx, ecx
mov dword [esp + 0x10], 0x3f800000
jne 0x476935
mov dword [esp + 0x10], 0
mov edx, dword [esp + 0x10]
mov ecx, dword [eax + 0x68]
push 0x3f000000
push edx
mov edx, dword [eax + 0x64]
push ecx
push edx
push 0x10
call fcn.0044f820
push 0
push 0
push 0xbf800000
push 0x3f800000
push 0x11
call fcn.0044f820
add esp, 0x28
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x54]
mov dword [esp + 0x78], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0x3f800000
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov eax, dword [ebp]
push edx
mov ecx, ebp
call dword [eax + 0xc]
mov ecx, dword [0x7bb4e8]
lea eax, [esp + 0x50]
push eax
add ecx, 0x7c
push ecx
lea edx, [esp + 0xc8]
push edx
call fcn.00423bc0
add esp, 0xc
push eax
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0xe0]
push ecx
call fcn.004a9b50
add esp, 8
push eax
lea edx, [esp + 0x98]
push edx
call fcn.004a9bb0
mov eax, dword [esp + 0x54]
add esp, 0xc
xor edi, edi
test eax, eax
jle 0x476d27
jmp 0x476a10
mov eax, dword [0x7b92a0]
mov ecx, dword [eax + 0x80]
mov edx, dword [ecx]
call dword [edx + 0x2c]
mov ecx, dword [0x8301d0]
push 1
push ebp
call fcn.004a24d0
mov esi, dword [esp + 0x44]
mov eax, dword [esi + edi*4]
add eax, 0x94
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x28], eax
fld dword [esp + 0x28]
fsub dword [esp + 0x58]
mov dword [esp + 0x24], edx
fld dword [esp + 0x24]
mov dword [esp + 0x20], ecx
fsub dword [esp + 0x54]
lea ecx, [esp + 0x78]
fld dword [esp + 0x20]
push ecx
fsub dword [esp + 0x54]
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0xfc]
fstp dword [esp + 0x80]
push eax
fstp dword [esp + 0x88]
fstp dword [esp + 0x8c]
call fcn.004a9b50
add esp, 8
push eax
lea ecx, [esp + 0xf0]
push ecx
call fcn.004a9bb0
fld dword [esp + 0x40]
fmul dword [0x78e648]
mov edx, dword [eax + 4]
mov ecx, dword [ebp + 0x44]
mov ebx, dword [eax]
mov ecx, dword [ecx + 0x10]
fstp dword [esp + 0x28]
fld dword [esp + 0x3c]
mov eax, dword [eax + 8]
fmul dword [0x78e648]
mov esi, dword [esi + edi*4]
mov dword [esp + 0x30], edx
mov edx, dword [ecx]
fstp dword [esp + 0x20]
add esp, 0xc
fld dword [esp + 0x2c]
mov dword [esp + 0x28], eax
fmul dword [0x78e648]
add esi, 0x4c
fstp dword [esp + 0xcc]
call dword [edx + 0x84]
fstp dword [esp + 0x10]
lea eax, [esp + 0xb4]
fld dword [esp + 0x1c]
push eax
fmul dword [esp + 0x14]
lea ecx, [esp + 0x60]
fld dword [esp + 0x18]
push esi
fmul dword [esp + 0x18]
push ecx
fld dword [esp + 0xd8]
fmul dword [esp + 0x1c]
fstp dword [esp + 0xc0]
fstp dword [esp + 0xc4]
fstp dword [esp + 0xc8]
call fcn.004ab1e0
mov eax, dword [0x798b48]
add esp, 0xc
test eax, eax
push 0x3f800000
je 0x476b56
lea edx, [esp + 0x60]
push edx
jmp 0x476b7f
lea eax, [esp + 0xac]
mov dword [esp + 0xac], 0x3f800000
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], 0
push eax
call dword [0x7a47dc]
fld dword [esp + 0x48]
fmul dword [0x78e630]
mov ecx, dword [ebp + 0x44]
mov ecx, dword [ecx + 0x10]
mov edx, dword [ecx]
fstp dword [esp + 0x1c]
add esp, 8
fld dword [esp + 0x3c]
fmul dword [0x78e630]
fstp dword [esp + 0x1c]
fld dword [esp + 0x38]
fmul dword [0x78e630]
fstp dword [esp + 0xc0]
call dword [edx + 0x80]
mov esi, dword [esp + 0x44]
fstp dword [esp + 0x10]
fld dword [esp + 0x14]
lea eax, [esp + 0x9c]
fmul dword [esp + 0x10]
push eax
fld dword [esp + 0x20]
lea edx, [esp + 0xdc]
fmul dword [esp + 0x14]
fld dword [esp + 0xc4]
fmul dword [esp + 0x14]
fstp dword [esp + 0xa0]
fstp dword [esp + 0xa4]
fstp dword [esp + 0xa8]
mov ecx, dword [esi + edi*4]
add ecx, 0x4c
push ecx
push edx
call fcn.004ab1e0
mov ecx, dword [eax]
mov dword [esp + 0x68], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x6c], edx
mov eax, dword [eax + 8]
mov dword [esp + 0x70], eax
mov eax, dword [0x798b4c]
add esp, 0xc
test eax, eax
push 0x3f800000
je 0x476c43
lea ecx, [esp + 0x60]
push ecx
jmp 0x476c6c
lea edx, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0x3f800000
mov dword [esp + 0x90], 0
push edx
call dword [0x7a6820]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
add esp, 8
push 0x3f800000
push eax
push ecx
push ebx
push 0xc
call fcn.0044f820
mov edx, dword [esp + 0xac]
mov eax, dword [esp + 0xa8]
mov ecx, dword [esp + 0xa4]
push 0x3f800000
push edx
push eax
push ecx
push 0xd
call fcn.0044f820
mov edx, dword [esi + edi*4]
fld dword [edx + 0x58]
add esp, 0x28
fld st(0)
push 0x3f800000
fmul st(1)
push ecx
fadd st(0), st(0)
fdivr dword [0x742f00]
fstp dword [esp]
push 0
push 0x3f800000
push 0xe
fstp st(0)
call fcn.0044f820
mov eax, dword [esp + 0x128]
push eax
call fcn.0046f900
mov eax, dword [esp + 0x30]
add esp, 0x18
test eax, eax
je 0x476d03
mov ecx, dword [0x78d44c]
push ecx
call dword [0x73d390]
mov edx, dword [0x7b92a0]
mov ecx, dword [edx + 0x80]
mov eax, dword [ecx]
call dword [eax + 0x30]
mov eax, dword [esp + 0x48]
inc edi
cmp edi, eax
jl 0x476a10
mov ebx, dword [0x73d22c]
mov eax, dword [0x78e5ec]
test eax, eax
je 0x476d4a
push 0xc
call dword [0x7bb770]
push 0xd
call dword [0x7bb770]
push 0xe
call dword [0x7bb770]
jmp 0x476d6a
mov ecx, dword [0x73f3b8]
mov esi, dword [0x73d264]
push ecx
call esi
mov edx, dword [0x73f3bc]
push edx
call esi
mov eax, dword [0x73f3c0]
push eax
call esi
mov ecx, dword [0x7b92a0]
mov edx, dword [ecx]
call dword [edx + 0x124]
push 0
push 0
push 0
push 0
push 0xd
call dword [0x7a47e0]
mov eax, dword [0x78e5ec]
add esp, 0x14
test eax, eax
je 0x476da0
push 0x8620
call ebx
jmp 0x47700e
mov eax, dword [0x78d46c]
push eax
call ebx
jmp 0x47700e
mov ecx, dword [0x78d450]
push ecx
call ebx
mov eax, dword [0x78e5f8]
test eax, eax
mov esi, dword [esp + 0x114]
je 0x476dcf
push esi
call fcn.00475bb0
add esp, 4
test byte [0x8301d4], 2
jne 0x476e28
or dword [0x8301d4], 2
push 0x201c
mov byte [esp + 0x110], 3
call fcn.006fa7e6
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x10c], 4
je 0x476e19
mov edx, dword [0x830560]
push edx
push str.__VP1.0__This_is_the_standard_vertex_program._nDP4___o_HPOS_.x__c_0___v_OPOS__DP4___o_HPOS_.y__c_1___v_OPOS__DP4___o_HPOS_.z__c_2___v_OPOS__DP4___o_HPOS_.w__c_3___v_OPOS__DP4___R10.x__c_8___v_OPOS__DP4___R10.y__c_9___v_OPOS__DP4___R10.z__c_10___v_OPOS__DP4___R10.w__c_11___v_OPOS__DP3___R1.w__R10__R10_RSQ___R1.w__R1.w_RCP___R1.w__R1.w_MOV___o_FOGC___R1.w_DP3___R11.x__c_8___v_NRML__DP3___R11.y__c_9___v_NRML__DP3___R11.z__c_10___v_NRML__MOV_R9__c_15_.wwwz_MOV___o_TEX0___v_TEX0__MOV___o_TEX1___v_TEX1__MOV___o_TEX2___v_TEX2__MOV___o_TEX3___v_TEX3__MOV_o_COL0___c_15_.wwwz_
mov ecx, eax
call fcn.004a27d0
jmp 0x476e1b
xor eax, eax
mov dword [0x8301cc], eax
mov byte [esp + 0x10c], 0
mov eax, dword [0x78e600]
test eax, eax
mov edi, dword [0x73d390]
je 0x476e8c
mov eax, dword [0x7b92a0]
mov ecx, dword [eax + 0x80]
mov edx, dword [ecx]
call dword [edx + 0x2c]
mov eax, dword [esi + 8]
mov ecx, dword [0x8301cc]
push 1
push eax
call fcn.004a24d0
mov ecx, dword [0x78d46c]
push ecx
call edi
push 2
push 2
call fcn.00401670
push esi
call fcn.00470750
mov edx, dword [0x78d46c]
add esp, 0xc
push edx
call ebx
mov eax, dword [0x7b92a0]
mov ecx, dword [eax + 0x80]
mov edx, dword [ecx]
call dword [edx + 0x30]
mov eax, dword [0x78e604]
test eax, eax
je 0x476eca
mov eax, dword [esi + 8]
mov ecx, dword [0x8301cc]
push 1
push eax
call fcn.004a24d0
mov ecx, dword [0x78d46c]
push ecx
call edi
push 3
push 5
call fcn.00401670
push esi
call fcn.004707a0
mov edx, dword [0x78d46c]
add esp, 0xc
push edx
call ebx
mov eax, dword [0x78e5f4]
test eax, eax
je 0x476edc
push esi
call fcn.004760d0
add esp, 4
mov ecx, dword [0x7b92a0]
mov eax, dword [ecx]
call dword [eax + 0x124]
mov edx, dword [0x73f268]
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [0x73d244]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x476fe7
test byte [0x8301d4], 4
jne 0x476f61
or dword [0x8301d4], 4
push 0x201c
mov byte [esp + 0x110], 5
call fcn.006fa7e6
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x10c], 6
je 0x476f52
mov ecx, dword [0x830574]
push ecx
push str.__VP1.0__This_is_the_fog_output_vertex_program._nDP4___o_HPOS_.x__c_0___v_OPOS__DP4___o_HPOS_.y__c_1___v_OPOS__DP4___o_HPOS_.z__c_2___v_OPOS__DP4___o_HPOS_.w__c_3___v_OPOS__DP4___R1.x__c_8___v_OPOS__DP4___R1.y__c_9___v_OPOS__DP4___R1.z__c_10___v_OPOS__DP4___R1.w__c_11___v_OPOS__DP3___R1.w__R1__R1_RSQ___R1.w__R1.w_RCP___R1.w__R1.w_ADD___R2.x__c_20_.y___c_20_.x_ADD___R2.y__c_20_.y___R1.w_RCP___R2.z__R2.x_MUL___R2.w__R2.y__R2.z_MIN___R2.w__R2.w__c_22_.x_MAX___R2.w__R2.w__c_22_.y_ADD___R2.w__c_22_.x___R2.w_MUL___R3__c_21___R2.w_MOV___R3.w__R2.w_MOV___o_COL0___R3_MOV___o_FOGC_.x__c_22_.y_
mov ecx, eax
call fcn.004a27d0
jmp 0x476f54
xor eax, eax
mov dword [0x8301c8], eax
mov byte [esp + 0x10c], 0
mov edx, dword [esi + 8]
mov ecx, dword [0x8301c8]
push 0
push edx
call fcn.004a24d0
mov eax, dword [0x78d46c]
push eax
call edi
mov eax, dword [0x7b92a0]
fild dword [eax + 0x6c]
mov edx, dword [eax + 0x64]
push 0x3f800000
push ecx
mov ecx, dword [eax + 0x68]
fstp dword [esp]
push ecx
push edx
push 0x14
call fcn.0044f820
mov eax, dword [0x7b92a0]
mov ecx, dword [eax + 0x7c]
mov edx, dword [eax + 0x78]
mov eax, dword [eax + 0x74]
push 0x3f800000
push ecx
push edx
push eax
push 0x15
call fcn.0044f820
push 0
push 0
push 0
push 0x3f800000
push 0x16
call fcn.0044f820
push 1
push 0
call fcn.00401670
add esp, 0x44
push esi
call fcn.00470750
mov ecx, dword [0x78d46c]
add esp, 4
push ecx
call ebx
test ebp, ebp
je 0x476ff4
mov edx, dword [0x78d44c]
push edx
call edi
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x44]
mov eax, dword [ecx]
push 0
push 0
push 0
push eax
push 0
call dword [0x7a47e0]
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
mov eax, dword [esp + 0x34]
test eax, eax
mov dword [esp + 0xfc], 0xffffffff
je 0x47702e
push eax
call fcn.006fa390
add esp, 4
mov ecx, dword [esp + 0xf4]
mov dword fs:[0], ecx
add esp, 0x100
ret