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

Disassembly:
push 0xffffffffffffffff
push 0x4d1920
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5b0
push ebx
mov ebx, ecx
push edi
lea ecx, [esp + 0x30]
call fcn.00480de0
push 0x874
mov dword [esp + 0x5c4], 0
call fcn.004bdcbb
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
mov byte [esp + 0x5c0], 1
je 0x4740c9
mov ecx, eax
call fcn.0045c090
jmp 0x4740cb
xor eax, eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x5c8]
lea edx, [esp + 0xa0]
mov byte [esp + 0x5c0], 0
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4740e7
lea edi, [esp + 0xa0]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x474100
mov eax, dword [str..ase]
mov cl, byte [0x4dc1d8]
mov dword [edi], eax
lea edx, [esp + 0xa0]
mov byte [edi + 4], cl
push edx
lea ecx, [esp + 0x34]
call fcn.00480f30
test al, al
lea ecx, [esp + 0x30]
jne 0x474148
mov dword [esp + 0x5c0], 0xffffffff
call fcn.00480df0
xor al, al
jmp 0x474e68
push ebp
push esi
push 1
mov byte [esp + 0x16], 0
mov byte [esp + 0x15], 0
mov byte [esp + 0x17], 0
call fcn.00480e20
test eax, eax
je 0x474d22
jmp 0x474170
push 0x4dc1d0
push eax
call fcn.004bf811
mov ebp, eax
add esp, 8
mov edi, str.MATERIAL_COUNT
mov esi, ebp
mov ecx, 0x10
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4741f9
push 0x4dc1d0
push eax
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be57e
push ebp
mov dword [ebx + 0x24], eax
call fcn.004be57e
mov esi, eax
lea ecx, [esi + esi*4]
shl ecx, 4
add ecx, 4
push ecx
call fcn.004bdcb6
add esp, 0x14
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x5c8], 2
je 0x4741ec
push fcn.0045b6f0
push fcn.0045b6c0
push esi
lea edi, [eax + 4]
push 0x50
push edi
mov dword [eax], esi
call fcn.004be699
jmp 0x4741ee
xor edi, edi
mov byte [esp + 0x5c8], 0
mov dword [ebx + 0x28], edi
mov edi, str.MATERIAL
mov esi, ebp
mov ecx, 0xa
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474234
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be57e
add esp, 0xc
mov dword [esp + 0x14], eax
mov byte [esp + 0x12], 1
mov byte [esp + 0x11], 1
mov byte [esp + 0x13], 1
mov edi, str.MATERIAL_AMBIENT
mov esi, ebp
mov ecx, 0x12
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4742b8
cmp byte [esp + 0x12], 1
jne 0x4742b8
push 0x4dc1d0
push 0
call fcn.004bf811
movsx ecx, word [esp + 0x1c]
lea esi, [ecx + ecx*4]
push eax
shl esi, 4
call fcn.004be4be
mov ecx, dword [ebx + 0x28]
push 0x4dc1d0
push 0
fstp dword [esi + ecx + 0x14]
call fcn.004bf811
push eax
call fcn.004be4be
mov edx, dword [ebx + 0x28]
push 0x4dc1d0
fstp dword [esi + edx + 0x18]
push 0
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
mov eax, dword [ebx + 0x28]
fstp dword [esi + eax + 0x1c]
mov ecx, dword [ebx + 0x28]
add esp, 0x24
mov dword [esi + ecx + 0x20], 0x3f800000
mov byte [esp + 0x12], 0
mov edi, str.MATERIAL_DIFFUSE
mov esi, ebp
mov ecx, 0x12
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x47433b
cmp byte [esp + 0x11], 1
jne 0x47433b
push 0x4dc1d0
push edx
call fcn.004bf811
movsx ecx, word [esp + 0x1c]
lea esi, [ecx + ecx*4]
push eax
shl esi, 4
call fcn.004be4be
mov eax, dword [ebx + 0x28]
push 0x4dc1d0
push 0
fstp dword [esi + eax + 4]
call fcn.004bf811
push eax
call fcn.004be4be
mov ecx, dword [ebx + 0x28]
push 0x4dc1d0
fstp dword [esi + ecx + 8]
push 0
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
mov edx, dword [ebx + 0x28]
fstp dword [esi + edx + 0xc]
mov eax, dword [ebx + 0x28]
add esp, 0x24
mov dword [esi + eax + 0x10], 0x3f800000
mov byte [esp + 0x11], 0
mov edi, str.MAP_REFLECT
mov esi, ebp
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474360
movsx eax, word [esp + 0x14]
mov ecx, dword [ebx + 0x28]
lea eax, [eax + eax*4]
shl eax, 4
mov byte [eax + ecx + 0x4d], 1
mov edi, str.MATERIAL_SPECULAR
mov esi, ebp
mov ecx, 0x13
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4743e3
cmp byte [esp + 0x13], 1
jne 0x4743e3
push 0x4dc1d0
push edx
call fcn.004bf811
movsx ecx, word [esp + 0x1c]
lea esi, [ecx + ecx*4]
push eax
shl esi, 4
call fcn.004be4be
mov eax, dword [ebx + 0x28]
push 0x4dc1d0
push 0
fstp dword [esi + eax + 0x24]
call fcn.004bf811
push eax
call fcn.004be4be
mov ecx, dword [ebx + 0x28]
push 0x4dc1d0
fstp dword [esi + ecx + 0x28]
push 0
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
mov edx, dword [ebx + 0x28]
fstp dword [esi + edx + 0x2c]
mov eax, dword [ebx + 0x28]
add esp, 0x24
mov dword [esi + eax + 0x30], 0x3f800000
mov byte [esp + 0x13], 0
mov edi, str.MATERIAL_REF
mov esi, ebp
mov ecx, 0xe
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474412
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be57e
mov ecx, dword [esp + 0x30]
add esp, 0xc
mov dword [ecx + 4], eax
mov edi, str.MATERIAL_SHINESTRENGTH
mov esi, ebp
mov ecx, 0x18
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474483
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
movsx eax, word [esp + 0x1c]
lea esi, [eax + eax*4]
mov eax, dword [ebx + 0x28]
shl esi, 4
push ebp
lea edi, [esi + eax + 0x24]
call fcn.004be4be
push ebp
fmul dword [edi]
fstp dword [edi]
mov ecx, dword [ebx + 0x28]
lea edi, [esi + ecx + 0x28]
call fcn.004be4be
fmul dword [edi]
push ebp
fstp dword [edi]
mov edx, dword [ebx + 0x28]
lea edi, [esi + edx + 0x2c]
call fcn.004be4be
fmul dword [edi]
push ebp
fstp dword [edi]
mov eax, dword [ebx + 0x28]
lea esi, [esi + eax + 0x30]
call fcn.004be4be
fmul dword [esi]
add esp, 0x18
fstp dword [esi]
mov edi, str.MATERIAL_SHINE
mov esi, ebp
mov ecx, 0x10
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4744c3
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
fmul dword [0x4d345c]
movsx eax, word [esp + 0x20]
mov ecx, dword [ebx + 0x28]
lea eax, [eax + eax*4]
add esp, 0xc
shl eax, 4
fstp dword [eax + ecx + 0x44]
mov edi, str.MATERIAL_TRANSPARENCY
mov esi, ebp
mov ecx, 0x17
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474565
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
movsx eax, word [esp + 0x1c]
lea esi, [eax + eax*4]
push ebp
shl esi, 4
call fcn.004be4be
mov eax, dword [ebx + 0x28]
fsubr dword [0x4d3310]
push ebp
fstp dword [esi + eax + 0x10]
call fcn.004be4be
fsubr dword [0x4d3310]
mov ecx, dword [ebx + 0x28]
push ebp
fstp dword [esi + ecx + 0x20]
call fcn.004be4be
fsubr dword [0x4d3310]
mov edx, dword [ebx + 0x28]
push ebp
fstp dword [esi + edx + 0x40]
call fcn.004be4be
fsubr dword [0x4d3310]
mov eax, dword [ebx + 0x28]
push ebp
fstp dword [esi + eax + 0x30]
call fcn.004be4be
fld dword [0x4d3310]
add esp, 0x1c
fsub st(1)
fcomp qword [0x4d33b0]
fnstsw ax
fstp st(0)
test ah, 0x44
jnp 0x474565
mov ecx, dword [ebx + 0x28]
mov byte [esi + ecx + 0x4c], 1
mov edi, str.BITMAP
mov esi, ebp
mov ecx, 8
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4745b7
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
inc ebp
push 0x2f22
push ebp
call fcn.004be400
add esp, 0x10
test eax, eax
je 0x47459a
mov byte [eax], 0
mov ecx, dword [ebx + 4]
push 1
push ebp
call fcn.00459370
movsx ecx, word [esp + 0x14]
mov edx, dword [ebx + 0x28]
lea ecx, [ecx + ecx*4]
shl ecx, 4
mov dword [ecx + edx + 0x48], eax
mov edi, str.GEOMOBJECT
mov esi, ebp
mov ecx, 0xc
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x474617
push 0x874
call fcn.004bdcbb
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0x5c8], 3
je 0x4745f1
mov ecx, eax
call fcn.0045c090
mov esi, eax
jmp 0x4745f3
xor esi, esi
lea ecx, [esi + 0xc]
mov byte [esp + 0x5c8], 0
mov dword [esp + 0x24], esi
call fcn.004569a0
push esi
lea ecx, [ebx + 0x2c]
mov byte [esi + 0x85c], 0
call fcn.00456ea0
mov edi, str.NODE_NAME
mov esi, ebp
mov ecx, 0xb
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474645
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
inc ebp
push 0x22
push ebp
call fcn.004be400
add esp, 0x10
mov byte [eax], 0
mov edi, str.TM_POS
mov esi, ebp
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4746a7
push 0x4dc1d0
push eax
call fcn.004bf811
push eax
call fcn.004be4be
mov esi, dword [esp + 0x30]
push 0x4dc1d0
fstp dword [esi + 0x868]
push 0
call fcn.004bf811
push eax
call fcn.004be4be
fstp dword [esi + 0x870]
push 0x4dc1d0
push 0
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
fstp dword [esi + 0x86c]
add esp, 0x24
mov edi, str.MESH_NUMVERTEX
mov esi, ebp
mov ecx, 0x10
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474704
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be57e
mov esi, eax
shl eax, 5
push eax
call fcn.004bdcb6
add esp, 0x10
test esi, esi
mov dword [esp + 0x2c], eax
jle 0x474704
add eax, 0x10
xor ecx, ecx
mov dword [eax - 4], ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax - 0x10], ecx
mov dword [eax - 0xc], ecx
mov dword [eax - 8], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
add eax, 0x20
dec esi
jne 0x4746e7
mov edi, str.MESH_NUMTVERTEX
mov esi, ebp
mov ecx, 0x11
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x47475c
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be57e
mov esi, eax
lea eax, [esi*8]
push eax
call fcn.004bdcb6
mov dword [esp + 0x38], eax
add esp, 0x10
xor eax, eax
test esi, esi
jle 0x47475c
mov ecx, dword [esp + 0x28]
xor edx, edx
jmp 0x474750
mov dword [ecx + eax*8], edx
mov dword [ecx + eax*8 + 4], edx
inc eax
cmp eax, esi
jl 0x474750
mov edi, str.MESH_VERTEX
mov esi, ebp
mov ecx, 0xd
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474875
push 0x4dc1d0
push edx
call fcn.004bf811
push eax
call fcn.004be57e
push 0x4dc1d0
push 0
mov esi, eax
call fcn.004bf811
push eax
call fcn.004be4be
fstp dword [esp + 0x38]
push 0x4dc1d0
push 0
call fcn.004bf811
push eax
call fcn.004be4be
fstp dword [esp + 0x3c]
push 0x4dc1d0
push 0
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x48]
shl esi, 5
add eax, esi
fst dword [eax + 4]
mov dword [eax], ecx
fld dword [esp + 0x50]
mov dword [eax + 8], edx
fcomp dword [ebx + 0x45c]
add esp, 0x30
fnstsw ax
test ah, 5
jp 0x4747fa
mov eax, ecx
mov dword [ebx + 0x45c], eax
fcom dword [ebx + 0x460]
fnstsw ax
test ah, 5
jp 0x47480d
fst dword [ebx + 0x460]
fld dword [esp + 0x18]
fcomp dword [ebx + 0x464]
fnstsw ax
test ah, 5
jp 0x474828
mov ecx, dword [esp + 0x18]
mov dword [ebx + 0x464], ecx
fld dword [esp + 0x20]
fcomp dword [ebx + 0x468]
fnstsw ax
test ah, 0x41
jne 0x474843
mov edx, dword [esp + 0x20]
mov dword [ebx + 0x468], edx
fcom dword [ebx + 0x46c]
fnstsw ax
test ah, 0x41
jne 0x474858
fstp dword [ebx + 0x46c]
jmp 0x47485a
fstp st(0)
fld dword [esp + 0x18]
fcomp dword [ebx + 0x470]
fnstsw ax
test ah, 0x41
jne 0x474875
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x470], eax
mov edi, str.MESH_NUMFACES
mov esi, ebp
mov ecx, 0xf
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4748c1
push 0x4dc1d0
push edx
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be57e
lea esi, [eax + eax*2]
shl esi, 5
push esi
call fcn.004bdcb6
mov ecx, esi
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [esp + 0x2c], edi
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 0x10
and ecx, 3
rep stosb byte es:[edi], al
mov edi, str.MESH_TVERT
mov esi, ebp
mov ecx, 0xc
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x474922
push 0x4dc1d0
push eax
call fcn.004bf811
push eax
call fcn.004be57e
push 0x4dc1d0
push 0
mov esi, eax
call fcn.004bf811
push eax
call fcn.004be4be
fstp dword [esp + 0x30]
push 0x4dc1d0
push 0
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
fld dword [esp + 0x3c]
mov eax, dword [esp + 0x4c]
fstp dword [eax + esi*8]
add esp, 0x24
fstp dword [eax + esi*8 + 4]
mov edi, str.MESH_FACE
mov esi, ebp
mov ecx, 0xb
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474a32
push 0x4dc1d0
push edx
call fcn.004bf811
push eax
call fcn.004be57e
push 0x4dc1d0
push 0
mov esi, eax
call fcn.004bf811
push 0x4dc1d0
push 0
call fcn.004bf811
push eax
call fcn.004be57e
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x3c]
shl eax, 5
add eax, edi
lea ecx, [esi + esi*2]
shl ecx, 5
lea esi, [ecx + edx]
mov ecx, dword [eax]
mov dword [esi], ecx
mov edx, dword [eax + 4]
mov dword [esi + 4], edx
mov ecx, dword [eax + 8]
mov dword [esi + 8], ecx
mov edx, dword [eax + 0x18]
mov dword [esi + 0x18], edx
mov eax, dword [eax + 0x1c]
push 0x4dc1d0
push 0
mov dword [esi + 0x1c], eax
call fcn.004bf811
push 0x4dc1d0
push 0
call fcn.004bf811
push eax
call fcn.004be57e
shl eax, 5
mov ecx, dword [eax + edi]
add eax, edi
mov dword [esi + 0x40], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0x44], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0x48], ecx
mov edx, dword [eax + 0x18]
mov dword [esi + 0x58], edx
mov eax, dword [eax + 0x1c]
push 0x4dc1d0
push 0
mov dword [esi + 0x5c], eax
call fcn.004bf811
push 0x4dc1d0
push 0
call fcn.004bf811
mov ebp, eax
add esp, 0x44
push ebp
call fcn.004be57e
shl eax, 5
mov ecx, dword [eax + edi]
add eax, edi
mov dword [esi + 0x20], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0x24], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0x28], ecx
mov edx, dword [eax + 0x18]
mov ecx, dword [esp + 0x28]
add esp, 4
mov dword [esi + 0x38], edx
mov eax, dword [eax + 0x1c]
push esi
add ecx, 0xc
mov dword [esi + 0x3c], eax
call fcn.00456ea0
mov edi, str.MESH_TFACE
mov esi, ebp
mov ecx, 0xc
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474ae0
push 0x4dc1d0
push edx
call fcn.004bf811
push eax
call fcn.004be57e
push 0x4dc1d0
push 0
mov esi, eax
call fcn.004bf811
push eax
call fcn.004be57e
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x40]
lea ecx, [esi + esi*2]
shl ecx, 5
lea esi, [ecx + edx]
mov ecx, dword [edi + eax*8]
mov dword [esi + 0x18], ecx
fld dword [edi + eax*8 + 4]
fsubr qword [0x4d33b0]
push 0x4dc1d0
push 0
fstp dword [esi + 0x1c]
call fcn.004bf811
push eax
call fcn.004be57e
mov edx, dword [edi + eax*8]
mov dword [esi + 0x58], edx
fld dword [edi + eax*8 + 4]
fsubr qword [0x4d33b0]
push 0x4dc1d0
push 0
fstp dword [esi + 0x5c]
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be57e
mov ecx, dword [edi + eax*8]
mov dword [esi + 0x38], ecx
fld dword [edi + eax*8 + 4]
fsubr qword [0x4d33b0]
add esp, 0x30
fstp dword [esi + 0x3c]
mov edi, str.MESH_FACENORMAL
mov esi, ebp
mov ecx, 0x11
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x474c3b
push 0x4dc1d0
push edx
call fcn.004bf811
push eax
call fcn.004be57e
mov edi, eax
push 0x4dc1d0
push 0
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], 0
call fcn.004bf811
mov esi, eax
push esi
call fcn.004be4be
fstp dword [esp + 0x9c]
push esi
call fcn.004be4be
fstp dword [esp + 0xac]
push esi
call fcn.004be4be
fstp dword [esp + 0xbc]
push 0x4dc1d0
push 0
call fcn.004bf811
mov esi, eax
push esi
call fcn.004be4be
fstp dword [esp + 0xb4]
push esi
call fcn.004be4be
fstp dword [esp + 0xc4]
push esi
call fcn.004be4be
fstp dword [esp + 0xd4]
push 0x4dc1d0
push 0
call fcn.004bf811
mov ebp, eax
push ebp
call fcn.004be4be
fstp dword [esp + 0xcc]
add esp, 0x40
push ebp
call fcn.004be4be
fstp dword [esp + 0x9c]
push ebp
call fcn.004be4be
fstp dword [esp + 0xac]
add esp, 8
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.0045d251
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.0045d251
lea ecx, [esp + 0x9c]
push ecx
lea edx, [esp + 0x70]
push edx
call fcn.0045d251
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x1c]
lea eax, [edi + edi*2]
shl eax, 5
add eax, ecx
mov dword [eax + 0xc], edx
mov ecx, dword [esp + 0x60]
mov dword [eax + 0x2c], ecx
mov edx, dword [esp + 0x6c]
mov dword [eax + 0x4c], edx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 0x10], ecx
mov edx, dword [esp + 0x68]
mov dword [eax + 0x30], edx
mov ecx, dword [esp + 0x74]
mov dword [eax + 0x50], ecx
mov edx, dword [esp + 0x58]
mov dword [eax + 0x14], edx
mov ecx, dword [esp + 0x64]
mov dword [eax + 0x34], ecx
mov edx, dword [esp + 0x70]
mov dword [eax + 0x54], edx
mov edi, str.MESH_VERTEXNORMAL
mov esi, ebp
mov ecx, 0x13
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x474d0f
push 0x4dc1d0
push eax
call fcn.004bf811
mov edi, dword [esp + 0x38]
add esp, 8
xor esi, esi
test di, di
je 0x474c82
cmp di, 1
jne 0x474c77
mov esi, 2
jmp 0x474c82
cmp di, 2
jne 0x474c82
mov esi, 1
push 0x4dc1d0
push 0
call fcn.004bf811
push eax
call fcn.004be4be
fstp dword [esp + 0x84]
push 0x4dc1d0
push 0
call fcn.004bf811
push eax
call fcn.004be4be
fstp dword [esp + 0x94]
push 0x4dc1d0
push 0
call fcn.004bf811
push eax
call fcn.004be4be
fstp dword [esp + 0xa4]
add esp, 0x24
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.0045d251
movsx eax, word [esp + 0x34]
mov edx, dword [esp + 0x1c]
movsx ecx, si
lea eax, [eax + eax*2]
add eax, ecx
mov ecx, dword [esp + 0x48]
shl eax, 5
add eax, edx
mov dword [eax + 0xc], ecx
mov edx, dword [esp + 0x50]
mov dword [eax + 0x10], edx
mov ecx, dword [esp + 0x4c]
inc edi
mov dword [eax + 0x14], ecx
mov dword [esp + 0x30], edi
push 1
lea ecx, [esp + 0x3c]
call fcn.00480e20
test eax, eax
jne 0x474170
mov edx, dword [esp + 0x2c]
push edx
call fcn.004be35a
mov eax, dword [esp + 0x2c]
push eax
call fcn.004be35a
mov al, byte [esp + 0x5dc]
add esp, 8
cmp al, 1
jne 0x474d50
mov ecx, ebx
call fcn.00473dc0
jmp 0x474e43
mov eax, dword [ebx + 0x30]
test eax, eax
mov dword [ebx + 0x34], 0
jg 0x474d62
xor ebp, ebp
jmp 0x474d71
mov ecx, dword [ebx + 0x438]
mov ebp, dword [ecx]
mov dword [ebx + 0x34], 1
test ebp, ebp
je 0x474e43
lea esp, [esp]
xor esi, esi
push esi
lea ecx, [esp + 0x1ac]
call fcn.00456930
lea ecx, [esp + 0x1a8]
mov byte [esp + 0x5c8], 4
call fcn.004569a0
mov eax, dword [ebp + 0x10]
add ebp, 0xc
cmp eax, esi
mov dword [ebp + 8], esi
jle 0x474dbf
mov edx, dword [ebp + 0x40c]
mov esi, dword [edx]
mov dword [ebp + 8], 1
test esi, esi
je 0x474dfc
push 0x60
call fcn.004bdcbb
mov edi, eax
add esp, 4
mov ecx, 0x18
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [esp + 0x1ac]
call fcn.00456ea0
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 4]
jge 0x474dfc
mov ecx, dword [ebp + 0x40c]
mov esi, dword [ecx + eax*4]
inc eax
test esi, esi
mov dword [ebp + 8], eax
jne 0x474dc3
mov ecx, ebp
call fcn.004569a0
lea edx, [esp + 0x1a8]
push edx
mov ecx, ebp
call fcn.00456f40
lea ecx, [esp + 0x1a8]
mov byte [esp + 0x5c8], 0
call fcn.00456970
mov eax, dword [ebx + 0x34]
cmp eax, dword [ebx + 0x30]
jge 0x474e43
mov ecx, dword [ebx + 0x438]
mov ebp, dword [ecx + eax*4]
inc eax
test ebp, ebp
mov dword [ebx + 0x34], eax
jne 0x474d80
mov edx, dword [esp + 0x1c]
push edx
call fcn.004be35a
add esp, 4
lea ecx, [esp + 0x38]
mov dword [esp + 0x5c8], 0xffffffff
call fcn.00480df0
pop esi
mov al, 1
pop ebp
mov ecx, dword [esp + 0x5b8]
pop edi
pop ebx
mov dword fs:[0], ecx
add esp, 0x5bc
ret 8