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

Disassembly:
push 0xffffffffffffffff
push 0x668974
mov eax, dword fs:[0]
push eax
sub esp, 0x174
mov eax, dword [0x70903c]
xor eax, esp
mov dword [esp + 0x170], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x70903c]
xor eax, esp
push eax
lea eax, [esp + 0x188]
mov dword fs:[0], eax
mov dword [esp + 0x38], ecx
jmp 0x5865d4
call fcn.00585d50
lea eax, [esp + 0x17]
push eax
lea ecx, [esp + 0x1b]
push ecx
lea ecx, [esp + 0x4c]
call fcn.004b87f0
mov esi, dword [esp + 0x198]
lea edx, [esp + 0x44]
push edx
xor ebp, ebp
push esi
mov dword [esp + 0x198], ebp
call fcn.00565240
add esp, 8
test al, al
jne 0x586637
push esi
push str.TextureSet::Load_:_cannot_load__s
call fcn.00587390
add esp, 8
lea ecx, [esp + 0x44]
mov dword [esp + 0x190], 0xffffffff
call fcn.004b75c0
xor al, al
jmp 0x587045
push 0xa
push str.textureset
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebp
mov byte [esp + 0x24], 0
call fcn.00417040
mov ebx, dword [esp + 0x5c]
mov esi, dword [esp + 0x44]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x6c]
push ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x198], 1
call fcn.004b7620
mov edi, eax
cmp esi, ebp
je 0x586685
cmp esi, dword [edi]
je 0x58668a
call fcn.00615e0c
cmp ebx, dword [edi + 4]
mov ebp, 0x10
sete bl
mov byte [esp + 0x190], 0
cmp dword [esp + 0x30], ebp
jb 0x5866b0
mov edx, dword [esp + 0x1c]
push edx
call fcn.00613a18
add esp, 4
test bl, bl
je 0x5866c6
mov eax, dword [esp + 0x198]
push eax
push str.TextureSet::Load_:_syntax_error__TextureSet__filename:__s_
jmp 0x586614
push 0xc
push str.texturecount
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], 0
mov byte [esp + 0x24], 0
call fcn.00417040
mov ebx, dword [esp + 0x5c]
mov esi, dword [esp + 0x44]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x6c]
push edx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x198], 2
call fcn.004b7620
mov edi, eax
test esi, esi
je 0x586718
cmp esi, dword [edi]
je 0x58671d
call fcn.00615e0c
cmp ebx, dword [edi + 4]
mov byte [esp + 0x190], 0
sete bl
cmp dword [esp + 0x30], ebp
jb 0x58673e
mov eax, dword [esp + 0x1c]
push eax
call fcn.00613a18
add esp, 4
test bl, bl
je 0x586754
mov ecx, dword [esp + 0x198]
push ecx
push str.TextureSet::Load_:_syntax_error__TextureCount__filename:__s_
jmp 0x586614
mov edi, dword [esp + 0x38]
mov ecx, edi
call fcn.00586560
push str.texturecount
lea ecx, [esp + 0x1c]
call fcn.00417170
push 0
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x198], 3
call fcn.004b7490
mov ecx, eax
call fcn.004b6a10
mov esi, eax
mov byte [esp + 0x190], 0
cmp dword [esp + 0x30], ebp
jb 0x5867a9
mov eax, dword [esp + 0x1c]
push eax
call fcn.00613a18
add esp, 4
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], 0
mov byte [esp + 0x1c], 0
cmp dword [esi + 0x18], ebp
jb 0x5867c8
mov esi, dword [esi + 4]
jmp 0x5867cb
add esi, 4
push esi
call fcn.006165cb
mov esi, eax
add esp, 4
lea ecx, [esi + 1]
push ecx
lea ecx, [edi + 4]
call fcn.005863e0
test esi, esi
jle 0x587000
mov dword [esp + 0x34], 1
mov dword [esp + 0x40], esi
mov edx, dword [esp + 0x34]
push edx
push str.texture_03d
lea eax, [esp + 0x168]
push 0x21
push eax
call fcn.00616b2e
lea eax, [esp + 0x170]
add esp, 0x10
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], 0
mov byte [esp + 0x1c], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x586831
sub eax, edx
push eax
lea ecx, [esp + 0x164]
push ecx
lea ecx, [esp + 0x20]
call fcn.00417040
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x44]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x7c]
push eax
lea ecx, [esp + 0x4c]
mov byte [esp + 0x198], 4
call fcn.004b7620
mov edi, eax
test esi, esi
je 0x586879
cmp esi, dword [edi]
je 0x58687e
call fcn.00615e0c
cmp ebp, dword [edi + 4]
mov byte [esp + 0x190], 0
sete bl
cmp dword [esp + 0x30], 0x10
jb 0x5868a0
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00613a18
add esp, 4
test bl, bl
jne 0x586fed
lea eax, [esp + 0x160]
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], 0
mov byte [esp + 0x1c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5868c6
sub eax, edx
push eax
lea edx, [esp + 0x164]
push edx
lea ecx, [esp + 0x20]
call fcn.00417040
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x194], 5
call fcn.004b7490
mov ebp, 0x10
mov esi, eax
mov byte [esp + 0x190], 0
cmp dword [esp + 0x30], ebp
jb 0x586919
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00613a18
add esp, 4
xor ebx, ebx
mov edi, 0xf
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x58694c
call fcn.00615e0c
mov eax, dword [esi + 0xc]
cmp dword [eax + 0x18], ebp
jb 0x586959
mov ecx, dword [eax + 4]
jmp 0x58695c
lea ecx, [eax + 4]
mov eax, ecx
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], 0
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x586977
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x88]
call fcn.00417040
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov byte [esp + 0x190], 6
cmp ecx, 1
ja 0x5869b9
call fcn.00615e0c
mov eax, dword [esi + 0xc]
add eax, 0x1c
cmp dword [eax + 0x18], ebp
jb 0x5869c9
mov ecx, dword [eax + 4]
jmp 0x5869cc
lea ecx, [eax + 4]
mov eax, ecx
mov dword [esp + 0xd0], 0xf
mov dword [esp + 0xcc], ebx
mov byte [esp + 0xbc], 0
lea edi, [eax + 1]
jmp 0x5869f0
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x5869f0
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0xc0]
call fcn.00417040
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [esp + 0x190], 7
cmp eax, 2
ja 0x586a32
call fcn.00615e0c
mov eax, dword [esi + 0xc]
add eax, 0x38
cmp dword [eax + 0x18], ebp
jb 0x586a42
mov ecx, dword [eax + 4]
jmp 0x586a45
lea ecx, [eax + 4]
mov eax, ecx
mov dword [esp + 0xb4], 0xf
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], 0
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x586a64
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0xa4]
call fcn.00417040
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov byte [esp + 0x190], 8
cmp ecx, 3
ja 0x586aa6
call fcn.00615e0c
mov eax, dword [esi + 0xc]
add eax, 0x54
cmp dword [eax + 0x18], ebp
jb 0x586ab6
mov ecx, dword [eax + 4]
jmp 0x586ab9
lea ecx, [eax + 4]
mov eax, ecx
mov dword [esp + 0x15c], 0xf
mov dword [esp + 0x158], ebx
mov byte [esp + 0x148], 0
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x586ad8
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x14c]
call fcn.00417040
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [esp + 0x190], 9
cmp eax, 4
ja 0x586b1a
call fcn.00615e0c
mov eax, dword [esi + 0xc]
add eax, 0x70
cmp dword [eax + 0x18], ebp
jb 0x586b2a
mov ecx, dword [eax + 4]
jmp 0x586b2d
lea ecx, [eax + 4]
mov eax, ecx
mov dword [esp + 0xec], 0xf
mov dword [esp + 0xe8], ebx
mov byte [esp + 0xd8], 0
lea edi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x586b50
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0xdc]
call fcn.00417040
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov byte [esp + 0x190], 0xa
cmp ecx, 5
ja 0x586b92
call fcn.00615e0c
mov eax, dword [esi + 0xc]
add eax, 0x8c
cmp dword [eax + 0x18], ebp
jb 0x586ba4
mov ecx, dword [eax + 4]
jmp 0x586ba7
lea ecx, [eax + 4]
mov eax, ecx
mov dword [esp + 0x124], 0xf
mov dword [esp + 0x120], ebx
mov byte [esp + 0x110], 0
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x586bc6
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x114]
call fcn.00417040
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [esp + 0x190], 0xb
cmp eax, 6
ja 0x586c08
call fcn.00615e0c
mov eax, dword [esi + 0xc]
add eax, 0xa8
cmp dword [eax + 0x18], ebp
jb 0x586c1a
mov ecx, dword [eax + 4]
jmp 0x586c1d
lea ecx, [eax + 4]
mov eax, ecx
mov dword [esp + 0x140], 0xf
mov dword [esp + 0x13c], ebx
mov byte [esp + 0x12c], 0
lea edi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x586c40
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x130]
call fcn.00417040
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov byte [esp + 0x190], 0xc
cmp ecx, 7
ja 0x586c82
call fcn.00615e0c
mov esi, dword [esi + 0xc]
add esi, 0xc4
cmp dword [esi + 0x18], ebp
jb 0x586c95
mov esi, dword [esi + 4]
jmp 0x586c98
add esi, 4
mov edi, 0xf
mov eax, esi
mov dword [esp + 0x108], edi
mov dword [esp + 0x104], ebx
mov byte [esp + 0xf4], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x586cb8
sub eax, edx
push eax
push esi
lea ecx, [esp + 0xf8]
call fcn.00417040
mov eax, dword [esp + 0xbc]
mov byte [esp + 0x190], 0xd
cmp dword [esp + 0xd0], ebp
jae 0x586cee
lea eax, [esp + 0xbc]
push eax
call fcn.00616e3f
fstp dword [esp + 0x6c]
mov eax, dword [esp + 0xa4]
add esp, 4
cmp dword [esp + 0xb4], ebp
jae 0x586d12
lea eax, [esp + 0xa0]
push eax
call fcn.00616e3f
fstp dword [esp + 0x74]
mov eax, dword [esp + 0x14c]
add esp, 4
cmp dword [esp + 0x15c], ebp
jae 0x586d36
lea eax, [esp + 0x148]
push eax
call fcn.00616e3f
fstp dword [esp + 0x78]
mov eax, dword [esp + 0xdc]
add esp, 4
cmp dword [esp + 0xec], ebp
jae 0x586d5a
lea eax, [esp + 0xd8]
push eax
call fcn.00616e3f
fstp dword [esp + 0x68]
mov eax, dword [esp + 0x114]
add esp, 4
cmp dword [esp + 0x124], ebp
jae 0x586d7e
lea eax, [esp + 0x110]
push eax
call fcn.006165e1
add esp, 4
cmp eax, ebx
jne 0x586d8f
cmp edx, ebx
je 0x586d96
mov byte [esp + 0x3c], 1
jmp 0x586d9b
mov byte [esp + 0x3c], 0
mov eax, dword [esp + 0x12c]
cmp dword [esp + 0x140], ebp
jae 0x586db2
lea eax, [esp + 0x12c]
push eax
call fcn.006165e1
add esp, 4
movzx esi, ax
mov eax, dword [esp + 0xf4]
cmp dword [esp + 0x108], ebp
jae 0x586dd5
lea eax, [esp + 0xf4]
push eax
call fcn.006165e1
add esp, 4
movzx ecx, ax
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], ebp
jae 0x586df8
lea eax, [esp + 0x84]
fld dword [esp + 0x19c]
mov edx, dword [esp + 0x3c]
push ecx
fstp dword [esp]
push ecx
fld dword [esp + 0x6c]
mov ecx, dword [esp + 0x40]
push esi
push edx
sub esp, 0x10
fstp dword [esp + 0xc]
fld dword [esp + 0x94]
fstp dword [esp + 8]
fld dword [esp + 0x90]
fstp dword [esp + 4]
fld dword [esp + 0x88]
fstp dword [esp]
push eax
mov eax, dword [esp + 0x58]
push eax
call fcn.00585420
test al, al
jne 0x586e6d
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x98], ebp
jae 0x586e5f
lea eax, [esp + 0x84]
push eax
push str.CTextureSet::Load_:_SetTexture_failed_:_Filename:__s
call fcn.00587390
add esp, 8
cmp dword [esp + 0x108], ebp
jb 0x586e86
mov ecx, dword [esp + 0xf4]
push ecx
call fcn.00613a18
add esp, 4
mov dword [esp + 0x108], edi
mov dword [esp + 0x104], ebx
mov byte [esp + 0xf4], 0
cmp dword [esp + 0x140], ebp
jb 0x586eb5
mov edx, dword [esp + 0x12c]
push edx
call fcn.00613a18
add esp, 4
mov dword [esp + 0x140], edi
mov dword [esp + 0x13c], ebx
mov byte [esp + 0x12c], 0
cmp dword [esp + 0x124], ebp
jb 0x586ee4
mov eax, dword [esp + 0x110]
push eax
call fcn.00613a18
add esp, 4
mov dword [esp + 0x124], edi
mov dword [esp + 0x120], ebx
mov byte [esp + 0x110], 0
cmp dword [esp + 0xec], ebp
jb 0x586f13
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.00613a18
add esp, 4
mov dword [esp + 0xec], edi
mov dword [esp + 0xe8], ebx
mov byte [esp + 0xd8], 0
cmp dword [esp + 0x15c], ebp
jb 0x586f42
mov edx, dword [esp + 0x148]
push edx
call fcn.00613a18
add esp, 4
mov dword [esp + 0x15c], edi
mov dword [esp + 0x158], ebx
mov byte [esp + 0x148], 0
cmp dword [esp + 0xb4], ebp
jb 0x586f71
mov eax, dword [esp + 0xa0]
push eax
call fcn.00613a18
add esp, 4
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], 0
cmp dword [esp + 0xd0], ebp
jb 0x586fa0
mov ecx, dword [esp + 0xbc]
push ecx
call fcn.00613a18
add esp, 4
mov dword [esp + 0xd0], edi
mov dword [esp + 0xcc], ebx
mov byte [esp + 0xbc], 0
mov byte [esp + 0x190], 0
cmp dword [esp + 0x98], ebp
jb 0x586fd7
mov edx, dword [esp + 0x84]
push edx
call fcn.00613a18
add esp, 4
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], 0
mov eax, 1
add dword [esp + 0x34], eax
sub dword [esp + 0x40], eax
jne 0x5867f6
mov esi, dword [esp + 0x198]
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x587010
mov ecx, dword [esp + 0x38]
sub eax, edx
push eax
push esi
add ecx, 0xb4
call fcn.00417040
jmp 0x58702f
lea ecx, [esp + 0x44]
mov dword [esp + 0x190], 0xffffffff
call fcn.004b75c0
mov al, 1
mov ecx, dword [esp + 0x188]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x170]
xor ecx, esp
call fcn.00613e6e
add esp, 0x180
ret 8