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

Disassembly:
sub esp, 0x8c
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esi + 0x4d]
mov dword [esp + 0x54], eax
mov byte [eax], 0
lea eax, [esi + 0x55]
mov dword [esp + 0x1c], eax
mov byte [eax], 1
lea eax, [esi + 0x54]
push edi
mov dword [esi + 8], 0
mov dword [esp + 0x48], eax
mov byte [eax], 1
mov eax, dword [0x5153c0]
lea ebx, [esi + 0x58]
push eax
push 0
mov ecx, ebx
mov dword [esp + 0x2c], ebx
call fcn.00406d50
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.0048e0b0
mov ecx, eax
call fcn.0048e1a0
mov edi, eax
test edi, edi
jne 0x4805e0
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 4
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x4805ec
mov eax, 0x5153a8
mov ebp, str.Model
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [ebp]
jne 0x480616
test cl, cl
je 0x480612
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [ebp + 1]
jne 0x480616
add eax, 2
add ebp, 2
test cl, cl
jne 0x4805f1
xor eax, eax
jmp 0x48061b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x48067b
mov eax, dword [esp + 0xa0]
mov eax, dword [eax + 4]
test eax, eax
mov esi, 0x5153a8
je 0x480634
mov esi, eax
mov eax, dword [0x5530d4]
test eax, eax
jne 0x48065b
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x480654
mov ecx, eax
call fcn.0044eab0
jmp 0x480656
xor eax, eax
mov dword [0x5530d4], eax
push esi
push str.Failed_to_create_Model_by_XML:__s____tag_name_must_be__Model_.
push 1
push eax
call fcn.0044ef30
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 4
push ebx
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.Name
call fcn.00401aa0
mov ecx, edi
call fcn.0048aae0
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x90]
mov byte [esp + 0x90], al
call fcn.00401b60
lea ecx, [esp + 0x8c]
push ecx
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.FileName
call fcn.00401aa0
mov ecx, edi
call fcn.0048aa20
mov ebx, dword [esp + 0x58]
push ebx
sub esp, 0x10
mov ecx, esp
lea eax, [esp + 0x27]
push eax
push str.bUseAlpha
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
mov cl, byte [esp + 0x13]
mov byte [esp + 0x6c], cl
push 0
lea ecx, [esp + 0x70]
mov dword [esi + 0x50], 0
call fcn.00401b60
lea edx, [esp + 0x6c]
push edx
sub esp, 0x10
mov ecx, esp
lea eax, [esp + 0x27]
push eax
push str.sAlphaFunction
call fcn.00401aa0
mov ecx, edi
call fcn.0048aa20
test al, al
je 0x480757
mov eax, dword [esp + 0x70]
test eax, eax
jne 0x48073e
mov eax, 0x5153a8
push 0x538954
push eax
call fcn.005010c0
add esp, 8
test eax, eax
jne 0x480757
mov dword [esi + 0x50], 1
mov cl, byte [esp + 0x13]
mov byte [esp + 0x5c], cl
push 0
lea ecx, [esp + 0x60]
call fcn.00401b60
lea edx, [esp + 0x5c]
push edx
sub esp, 0x10
mov ecx, esp
lea eax, [esp + 0x27]
push eax
push str.sCullMode
call fcn.00401aa0
mov ecx, edi
call fcn.0048aa20
test al, al
je 0x48080d
mov eax, dword [esp + 0x60]
test eax, eax
jne 0x48079b
mov eax, 0x5153a8
push 0x538944
push eax
call fcn.005010c0
add esp, 8
test eax, eax
jne 0x4807b9
mov dword [esi + 0x124], 3
jmp 0x48080d
mov eax, dword [esp + 0x60]
test eax, eax
jne 0x4807c6
mov eax, 0x5153a8
push 0x538940
push eax
call fcn.005010c0
add esp, 8
test eax, eax
jne 0x4807e4
mov dword [esi + 0x124], 2
jmp 0x48080d
mov eax, dword [esp + 0x60]
test eax, eax
jne 0x4807f1
mov eax, 0x5153a8
push str.NONE
push eax
call fcn.005010c0
add esp, 8
test eax, eax
jne 0x48080d
mov dword [esi + 0x124], 1
cmp byte [ebx], 0
je 0x480819
mov ecx, dword [esp + 0x48]
mov byte [ecx], 0
mov edx, dword [esp + 0x20]
push edx
sub esp, 0x10
mov ecx, esp
lea eax, [esp + 0x27]
push eax
push str.bZBufferEnable
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
mov ecx, dword [esp + 0x48]
push ecx
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.bZWriteEnable
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
lea eax, [esi + 0x10c]
push eax
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.bEnableLighting
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
lea eax, [esi + 0x10d]
push eax
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.bEnableDynamicLighting
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
lea eax, [esi + 0x10e]
push eax
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.bCastShadow
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
lea eax, [esi + 0x10f]
push eax
sub esp, 0x10
mov ecx, esp
lea eax, [esp + 0x27]
push eax
push str.bEnableSpecular
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
lea ecx, [esi + 0x110]
push ecx
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.p3SpecularColor
call fcn.00401aa0
mov ecx, edi
call fcn.0048ae50
lea eax, [esi + 0x11c]
push eax
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.fSpecularPower
call fcn.00401aa0
mov ecx, edi
call fcn.0048a620
lea eax, [esi + 0x6c]
push eax
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push 0x5388b0
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
lea ebx, [esi + 4]
push ebx
sub esp, 0x10
mov ecx, esp
lea eax, [esp + 0x27]
push eax
push str.bCachable
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
lea ecx, [esi + 0x6d]
push ecx
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.bDeferrable
call fcn.00401aa0
mov ecx, edi
call fcn.0048a240
mov eax, dword [esp + 0xa0]
mov cl, byte [eax]
sub esp, 0x10
mov ebp, esp
mov byte [ebp], cl
push 0
mov ecx, ebp
call fcn.00401b60
mov edx, dword [0x5153c0]
mov eax, dword [esp + 0xb0]
push edx
push 0
push eax
mov ecx, ebp
call fcn.00403390
sub esp, 0x10
lea edx, [esp + 0xac]
mov ecx, esp
push edx
call fcn.00403270
lea eax, [esp + 0x9c]
push eax
call fcn.00488ad0
xor ecx, ecx
mov cl, byte [ebx]
add esp, 0x24
lea edx, [esp + 0x7c]
push ecx
push edx
call fcn.00483580
mov ecx, eax
call fcn.004835b0
xor ebx, ebx
cmp eax, ebx
mov dword [esi + 8], eax
jne 0x480a5d
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x48]
mov byte [ecx], 1
mov ecx, dword [esp + 0x24]
mov dword [esi + 8], ebx
mov byte [eax], bl
mov byte [edx], 1
mov eax, dword [0x5153c0]
push eax
push ebx
call fcn.00406d50
push 1
lea ecx, [esp + 0x80]
call fcn.00401b60
push 1
lea ecx, [esp + 0x60]
call fcn.00401b60
push 1
lea ecx, [esp + 0x70]
call fcn.00401b60
push 1
lea ecx, [esp + 0x90]
call fcn.00401b60
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 4
lea ecx, [esp + 0x3c]
push ecx
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.p3Position
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x68], 0x3f800000
mov dword [esp + 0x6c], 0x3f800000
mov dword [esp + 0x70], 0x3f800000
call fcn.00401aa0
mov ecx, edi
call fcn.0048ae50
lea eax, [esp + 0x14]
push eax
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.p3Rotation
call fcn.00401aa0
mov ecx, edi
call fcn.0048ae50
lea eax, [esp + 0x4c]
push eax
sub esp, 0x10
mov ecx, esp
lea edx, [esp + 0x27]
push edx
push str.p3Scale
call fcn.00401aa0
mov ecx, edi
call fcn.0048ae50
fld dword [esp + 0x3c]
fmul dword [esp + 0x3c]
fld dword [esp + 0x44]
fmul dword [esp + 0x44]
faddp st(1)
fld dword [esp + 0x40]
fmul dword [esp + 0x40]
faddp st(1)
fcomp dword [0x51581c]
fnstsw ax
test ah, 0x41
je 0x480b9c
fld dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x18]
fmul dword [esp + 0x18]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fcomp dword [0x51581c]
fnstsw ax
test ah, 0x41
je 0x480b9c
fld dword [esp + 0x4c]
fsub dword [0x515370]
fld dword [esp + 0x50]
fsub dword [0x515370]
fld dword [esp + 0x54]
fsub dword [0x515370]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld st(3)
fmul st(4)
faddp st(1)
fcomp dword [0x51581c]
fstp st(0)
fnstsw ax
fstp st(0)
test ah, 0x41
fstp st(0)
jne 0x480cc6
fld dword [esp + 0x14]
lea ecx, [esi + 0xc]
fmul dword [0x515c4c]
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov dword [ecx + 0x30], eax
fmul qword [0x515a08]
mov eax, dword [esp + 0x44]
mov dword [ecx + 0x34], edx
mov dword [ecx + 0x38], eax
fstp dword [esp + 0x14]
mov dword [ecx + 0x2c], ebx
fld dword [esp + 0x18]
mov dword [ecx + 0x1c], ebx
fmul dword [0x515c4c]
fmul qword [0x515a08]
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fmul dword [0x515c4c]
fmul qword [0x515a08]
fstp dword [esp + 0x1c]
fld dword [esp + 0x14]
fsin
fld dword [esp + 0x18]
fsin
fld dword [esp + 0x1c]
fsin
fld dword [esp + 0x14]
fcos
fstp dword [esp + 0x24]
fld dword [esp + 0x18]
fcos
fstp dword [esp + 0x28]
fld dword [esp + 0x1c]
fcos
fst dword [esp + 0x2c]
fmul dword [esp + 0x28]
fstp dword [ecx]
fld st(0)
fmul dword [esp + 0x24]
fstp dword [esp + 0x20]
fld st(1)
fmul st(3)
fmul dword [esp + 0x2c]
fsub dword [esp + 0x20]
fstp dword [ecx + 0x10]
fld dword [esp + 0x24]
fmul st(2)
fmul dword [esp + 0x2c]
fld st(1)
fmul st(4)
faddp st(1)
fstp dword [ecx + 0x20]
fld st(0)
fmul dword [esp + 0x28]
fstp dword [ecx + 4]
fmul st(1)
fmul st(2)
fld dword [esp + 0x24]
fmul dword [esp + 0x2c]
faddp st(1)
fstp dword [ecx + 0x14]
fld st(0)
fmul dword [esp + 0x20]
fld st(2)
fmul dword [esp + 0x2c]
fsubp st(1)
fstp dword [ecx + 0x24]
fchs
fstp dword [ecx + 8]
fmul dword [esp + 0x28]
fstp dword [ecx + 0x18]
fld dword [esp + 0x24]
fmul dword [esp + 0x28]
fstp dword [ecx + 0x28]
mov edx, dword [esp + 0x4c]
sub esp, 0xc
mov eax, esp
mov dword [ecx + 0xc], ebx
mov dword [ecx + 0x3c], 0x3f800000
mov dword [eax], edx
mov edx, dword [esp + 0x5c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x60]
mov dword [eax + 8], edx
call fcn.0042f450
mov byte [esi + 0x4c], 1
cmp dword [esi + 8], ebx
je 0x480d1d
push ebx
sub esp, 0x40
mov ecx, esp
push 0x552f60
call fcn.00424a60
mov ecx, dword [esi + 8]
lea eax, [esp + 0x68]
push eax
call fcn.00446090
mov ecx, dword [eax]
mov dword [esi + 0xf0], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0xf4], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0xf8], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0xfc], edx
mov ecx, dword [eax + 0x10]
mov dword [esi + 0x100], ecx
mov edx, dword [eax + 0x14]
mov dword [esi + 0x104], edx
fld dword [esi + 0x104]
fabs
fld dword [esi + 0xf8]
fabs
fst qword [esp + 0x24]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x480d40
fstp st(0)
fld qword [esp + 0x24]
fld dword [esi + 0xf4]
fabs
fld dword [esi + 0x100]
fabs
fstp qword [esp + 0x24]
fcom qword [esp + 0x24]
fnstsw ax
test ah, 0x41
je 0x480d65
fstp st(0)
fld qword [esp + 0x24]
fld dword [esi + 0xf0]
fabs
fld dword [esi + 0xfc]
fabs
fstp qword [esp + 0x24]
fcom qword [esp + 0x24]
fnstsw ax
test ah, 0x41
je 0x480d8a
fstp st(0)
fld qword [esp + 0x24]
fstp dword [esp + 0x24]
mov al, byte [esi + 0x10f]
test al, al
fstp dword [esp + 0x28]
fld st(0)
fmulp st(1)
fld dword [esp + 0x28]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x24]
fmul dword [esp + 0x24]
faddp st(1)
fsqrt
fstp dword [esi + 0x108]
je 0x480dce
mov ecx, dword [esi + 8]
cmp ecx, ebx
je 0x480dce
push esi
push 0x480eb0
call fcn.00442950
mov ecx, dword [esp + 0x80]
cmp ecx, ebx
je 0x480df5
mov al, byte [ecx - 1]
test al, al
je 0x480deb
cmp al, 0xff
je 0x480deb
dec al
mov byte [ecx - 1], al
jmp 0x480df5
dec ecx
push ecx
call fcn.004ef70e
add esp, 4
mov ecx, dword [esp + 0x60]
cmp ecx, ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
je 0x480e2e
mov al, byte [ecx - 1]
test al, al
je 0x480e24
cmp al, 0xff
je 0x480e24
dec al
mov byte [ecx - 1], al
jmp 0x480e2e
dec ecx
push ecx
call fcn.004ef70e
add esp, 4
mov ecx, dword [esp + 0x70]
cmp ecx, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
je 0x480e5e
mov al, byte [ecx - 1]
test al, al
je 0x480e54
cmp al, 0xff
je 0x480e54
dec al
mov byte [ecx - 1], al
jmp 0x480e5e
dec ecx
push ecx
call fcn.004ef70e
add esp, 4
mov ecx, dword [esp + 0x90]
cmp ecx, ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
je 0x480e9e
mov al, byte [ecx - 1]
test al, al
je 0x480e94
cmp al, 0xff
je 0x480e94
dec al
mov byte [ecx - 1], al
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 4
dec ecx
push ecx
call fcn.004ef70e
add esp, 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x8c
ret 4