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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4546a0
push eax
mov dword fs:[0], esp
mov eax, dword [esi + 0x84]
sub esp, 0x3c
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
je 0x40e94f
mov ecx, dword [esi + 0x88]
cmp ecx, ebx
je 0x40e741
mov eax, dword [ecx]
mov edx, dword [eax + 0x80]
call edx
test eax, eax
jle 0x40e7f2
mov ecx, dword [esi + 0x88]
mov eax, dword [ecx]
mov edx, dword [eax + 0x84]
push ebx
call edx
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov edi, eax
test edi, edi
je 0x40e6da
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 4]
lea eax, [edx + edi + 4]
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0x1c]
mov ecx, edi
call eax
test eax, eax
je 0x40e6ff
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea eax, [edx + eax + 4]
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c4]
call eax
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 4]
mov eax, dword [edx + edi + 4]
lea ecx, [edx + edi + 4]
mov edx, dword [eax]
push 1
call edx
mov ecx, dword [esi + 0x88]
mov eax, dword [ecx]
mov edx, dword [eax + 0x80]
add ebx, 1
call edx
cmp ebx, eax
jl 0x40e6b0
jmp 0x40e7f0
mov ecx, dword [esi + 0x8c]
cmp ecx, ebx
je 0x40e7f2
mov eax, dword [ecx]
mov edx, dword [eax + 0x68]
call edx
test eax, eax
jle 0x40e7f2
mov edi, edi
mov ecx, dword [esi + 0x8c]
mov eax, dword [ecx]
mov edx, dword [eax + 0x6c]
push ebx
call edx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 8]
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
mov edi, eax
test edi, edi
je 0x40e7d8
mov eax, dword [edi + 4]
mov ecx, dword [eax + 4]
lea eax, [ecx + edi + 4]
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0x1c]
mov ecx, edi
call eax
test eax, eax
je 0x40e7b4
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea eax, [edx + eax + 4]
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c4]
call eax
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 4]
mov eax, dword [edx + edi + 4]
lea edi, [edx + edi + 4]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov ecx, dword [esi + 0x8c]
mov eax, dword [ecx]
mov edx, dword [eax + 0x68]
add ebx, 1
call edx
cmp ebx, eax
jl 0x40e760
xor ebx, ebx
mov ecx, dword [esi + 0x8c]
cmp ecx, ebx
je 0x40e82b
mov eax, dword [esi + 0xb4]
cmp eax, ebx
je 0x40e82b
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x78]
push str.walk
call eax
mov ecx, dword [esi + 0xb4]
cmp ecx, ebx
je 0x40e825
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [esi + 0xb4], ebx
mov eax, dword [esi + 0x84]
cmp eax, ebx
jne 0x40e839
xor eax, eax
jmp 0x40e843
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea eax, [edx + eax + 4]
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c4]
call eax
mov ecx, dword [esi + 0x84]
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
call eax
cmp eax, ebx
jne 0x40e866
xor eax, eax
jmp 0x40e870
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea eax, [edx + eax + 4]
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x1c4]
call eax
mov eax, dword [esi + 0x84]
cmp eax, ebx
je 0x40e89f
mov dword [esi + 0x84], ebx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, dword [esi + 0x88]
cmp eax, ebx
je 0x40e8c0
mov dword [esi + 0x88], ebx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, dword [esi + 0x8c]
cmp eax, ebx
je 0x40e8e1
mov dword [esi + 0x8c], ebx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, dword [esi + 0x90]
cmp eax, ebx
je 0x40e902
mov dword [esi + 0x90], ebx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, dword [esi + 0x94]
cmp eax, ebx
je 0x40e923
mov dword [esi + 0x94], ebx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
fldz
mov dword [esi + 0x98], ebx
fst dword [esi + 0xb0]
mov dword [esi + 0x9c], ebx
fst dword [esi + 0xac]
mov dword [esi + 0xa0], ebx
fstp dword [esi + 0xa8]
mov dword [esi + 0xa4], ebx
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov edi, dword [ebp + 8]
push eax
push edi
push str.Loading_model__s_from_vfs_dir__s_n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 0xc
call dword [sym.imp.MSVCR80.dll___iob_func]
add eax, 0x20
push eax
call dword [sym.imp.MSVCR80.dll_fflush]
mov ecx, dword [esi + 0x30]
mov eax, dword [ecx]
mov edx, dword [eax + 0x130]
add esp, 4
push str.viewmesh_region
call edx
mov ecx, dword [esi + 0x34]
push 0
push 0
push 0
push 1
mov ebx, eax
mov eax, dword [ecx]
mov eax, dword [eax + 0x4c]
push 0
push ebx
lea edx, [esp + 0x2c]
push edx
push edi
mov dword [esp + 0x30], ebx
call eax
test al, al
je 0x40ee51
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 0x4c], eax
mov edi, dword [esp + 0x14]
cmp edi, eax
jne 0x40ea77
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 0x12c]
call eax
mov edi, eax
mov edx, dword [edi]
mov eax, dword [edx]
mov ecx, edi
mov dword [esp + 0xc], 0
call eax
test eax, eax
jle 0x40ee51
jmp 0x40ea04
mov ebx, dword [esp + 0x10]
mov edx, dword [edi]
mov eax, dword [esp + 0xc]
mov edx, dword [edx + 4]
push eax
mov ecx, edi
call edx
mov edx, dword [eax]
mov ebx, dword [ebx]
mov dword [esp + 0x18], eax
mov ecx, eax
mov eax, dword [edx]
add ebx, 0x3c
call eax
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx]
push eax
call edx
test al, al
jne 0x40ea5a
mov ebx, dword [esp + 0xc]
mov eax, dword [edi]
mov edx, dword [eax]
add ebx, 1
mov ecx, edi
mov dword [esp + 0xc], ebx
call edx
cmp ebx, eax
jl 0x40ea00
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea ecx, [edx + eax + 4]
mov edi, eax
mov eax, dword [ecx]
mov edx, dword [eax + 4]
mov dword [esp + 8], edi
call edx
jmp 0x40eac0
cmp dword [0x471dc4], 0xffffffff
jne 0x40eaa5
mov ecx, dword [0x471e04]
mov eax, dword [ecx]
mov edx, dword [eax + 0x54]
push str.iMeshFactoryWrapper
call edx
push 0x4011f0
mov dword [0x471dc4], eax
call dword [0x471d78]
add esp, 4
mov ecx, dword [0x471dc4]
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
push 0x2000000
push ecx
mov ecx, edi
call edx
mov dword [esp + 8], eax
mov edi, eax
test edi, edi
je 0x40ee51
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov ecx, edi
call edx
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x18], ebx
je 0x40eaee
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + ebx + 4]
mov eax, dword [edx + 4]
lea ecx, [ecx + ebx + 4]
call eax
test ebx, ebx
mov byte [esp + 0x4c], 1
je 0x40ed3c
fldz
mov ecx, dword [esi + 0x30]
lea eax, [esp + 0x1c]
fst dword [esp + 0x1c]
push eax
fst dword [esp + 0x24]
mov eax, dword [esi + 0x54]
fstp dword [esp + 0x28]
mov edx, dword [ecx]
mov edx, dword [edx + 0xec]
push eax
push str.MySprite
push edi
lea eax, [esp + 0x20]
push eax
call edx
mov ecx, dword [esi + 0x84]
test ecx, ecx
mov edx, dword [eax]
mov dword [esi + 0x84], edx
mov dword [eax], 0xffffffff
je 0x40eb55
mov eax, dword [ecx + 4]
mov edx, dword [eax + 4]
mov eax, dword [edx + ecx + 4]
lea ecx, [edx + ecx + 4]
mov edx, dword [eax + 8]
call edx
push ecx
mov dword [esp + 0x14], esp
mov eax, esp
mov dword [eax], ebx
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + ebx + 4]
mov eax, dword [edx + 4]
lea ecx, [ecx + ebx + 4]
call eax
lea edi, [esp + 0x14]
call fcn.004158a0
mov ecx, dword [esi + 0x8c]
mov edx, dword [eax]
add esp, 4
test ecx, ecx
mov dword [esi + 0x8c], edx
mov dword [eax], 0xffffffff
je 0x40eba8
mov eax, dword [ecx + 4]
mov edx, dword [eax + 4]
mov eax, dword [edx + ecx + 4]
lea ecx, [edx + ecx + 4]
mov edx, dword [eax + 8]
call edx
push ecx
mov dword [esp + 0x14], esp
mov eax, esp
mov dword [eax], ebx
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + ebx + 4]
mov eax, dword [edx + 4]
lea ecx, [ecx + ebx + 4]
call eax
lea edi, [esp + 0x14]
call fcn.00415940
mov ecx, dword [esi + 0x88]
mov edx, dword [eax]
add esp, 4
test ecx, ecx
mov dword [esi + 0x88], edx
mov dword [eax], 0xffffffff
je 0x40ebfb
mov eax, dword [ecx + 4]
mov edx, dword [eax + 4]
mov eax, dword [edx + ecx + 4]
lea ecx, [edx + ecx + 4]
mov edx, dword [eax + 8]
call edx
cmp dword [esi + 0x8c], 0
jne 0x40ec11
cmp dword [esi + 0x88], 0
je 0x40ecfe
mov ecx, dword [esi + 0x84]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
cmp dword [0x471dd0], 0xffffffff
mov edi, eax
jne 0x40ec4e
mov ecx, dword [0x471e04]
mov eax, dword [ecx]
mov edx, dword [eax + 0x54]
push str.iSpriteCal3DState
call edx
push 0x401220
mov dword [0x471dd0], eax
call dword [0x471d78]
add esp, 4
mov eax, dword [edi + 4]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + edi + 4]
mov eax, dword [0x471dd0]
mov edx, dword [edx + 0x10]
lea ecx, [ecx + edi + 4]
push 0x2000000
push eax
call edx
mov ecx, dword [esi + 0x94]
test ecx, ecx
mov dword [esi + 0x94], eax
je 0x40ec8f
mov eax, dword [ecx + 4]
mov edx, dword [eax + 4]
mov eax, dword [edx + ecx + 4]
lea ecx, [edx + ecx + 4]
mov edx, dword [eax + 8]
call edx
cmp dword [0x471dd4], 0xffffffff
jne 0x40ecbd
mov ecx, dword [0x471e04]
mov eax, dword [ecx]
mov edx, dword [eax + 0x54]
push str.iSprite3DState
call edx
push 0x401230
mov dword [0x471dd4], eax
call dword [0x471d78]
add esp, 4
mov eax, dword [edi + 4]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + edi + 4]
mov eax, dword [0x471dd4]
mov edx, dword [edx + 0x10]
lea ecx, [ecx + edi + 4]
push 0x1000000
push eax
call edx
mov ecx, dword [esi + 0x90]
test ecx, ecx
mov dword [esi + 0x90], eax
je 0x40ecfe
mov eax, dword [ecx + 4]
mov edx, dword [eax + 4]
mov eax, dword [edx + ecx + 4]
lea ecx, [edx + ecx + 4]
mov edx, dword [eax + 8]
call edx
cmp dword [esi + 0x94], 0
je 0x40ed3c
push 4
call fcn.00407a16
add esp, 4
test eax, eax
je 0x40ed1d
mov dword [eax], 0x461e60
jmp 0x40ed1f
xor eax, eax
mov ecx, dword [esi + 0x8c]
fld dword [0x461f04]
mov edx, dword [ecx]
push ecx
fstp dword [esp]
push eax
mov eax, dword [edx + 0x74]
push str.walk
call eax
test ebx, ebx
mov byte [esp + 0x4c], 0
je 0x40ed58
mov ecx, dword [ebx + 4]
mov edx, dword [ecx + 4]
mov eax, dword [edx + ebx + 4]
lea ecx, [edx + ebx + 4]
mov edx, dword [eax + 8]
call edx
fld dword [esi + 0x7c]
push ecx
mov edi, esi
fstp dword [esp]
call fcn.00410fb0
mov ecx, dword [esi + 0x84]
test ecx, ecx
je 0x40ee22
mov eax, dword [ecx]
mov edx, dword [eax + 0x8c]
call edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x38], ecx
fld dword [esp + 0x38]
fadd dword [esp + 0x2c]
mov ecx, dword [esi + 0x4c]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0x14]
mov eax, dword [ecx]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
mov dword [esp + 0x3c], edx
fmul qword [0x461ef8]
mov edx, dword [eax + 8]
fstp dword [esp + 0x18]
call edx
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x2c]
call eax
fld dword [eax + 0x28]
mov ecx, dword [esi + 0x4c]
fstp dword [esp + 0x1c]
fld dword [eax + 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
fstp dword [esp + 0x24]
call eax
fld dword [esp + 0x1c]
fstp dword [esp + 0x28]
mov ecx, eax
fld dword [esp + 0x18]
fstp dword [esp + 0x2c]
fld dword [esp + 0x24]
fstp dword [esp + 0x30]
mov edx, dword [eax]
mov eax, dword [edx + 0x2c]
call eax
mov edx, dword [eax]
mov edx, dword [edx + 8]
lea ecx, [esp + 0x28]
push ecx
mov ecx, eax
call edx
mov dword [esi + 0x6c], 2
push esi
call fcn.0040fa20
push esi
call fcn.0040fee0
push esi
call fcn.00410470
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 8]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 4]
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov ecx, dword [esp + 0x44]
pop edi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4