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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5cb69d
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1034
call fcn.005a0860
push ebx
push esi
push edi
mov eax, dword [0x61a654]
xor eax, esp
push eax
lea eax, [esp + 0x1048]
mov dword fs:[0], eax
mov dword [esp + 0x40], ecx
xor edx, edx
cmp dword [ecx + 0x28], edx
mov dword [esp + 0x50], edx
mov dword [esp + 0x60], edx
jle 0x4afbb0
mov esi, dword [ebp + 0x2c]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
jmp 0x4aec24
mov ecx, edx
xor edx, edx
mov eax, dword [ecx + 0x24]
cmp eax, edx
mov dword [esp + 0x54], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x14], eax
jle 0x4afb53
mov ecx, dword [edi + 4]
add ecx, dword [esp + 0x50]
mov edx, dword [edi + 8]
mov eax, dword [edi]
add eax, dword [esp + 0x54]
mov dword [esp + 0xb0], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0xb4], edx
sub dword [esp + 0xb4], ecx
mov edx, dword [edi + 0xc]
mov dword [esp + 0xb8], edx
mov ecx, edx
mov edx, dword [esi]
sub ecx, dword [esp + 0x50]
mov dword [esp + 0x124], edx
mov edx, dword [esi + 4]
mov dword [esp + 0x128], edx
mov edx, dword [esp + 0xb4]
add edx, eax
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xb0]
mov dword [esp + 0xb8], ecx
add ecx, edx
mov edx, dword [esp + 0x124]
mov dword [esp + 0x48], ecx
mov ecx, dword [esi + 8]
add ecx, edx
mov edx, dword [esp + 0x128]
mov dword [esp + 0x98], ecx
mov ecx, dword [esi + 0xc]
add ecx, edx
cmp eax, dword [esp + 0x24]
mov dword [esp + 0xac], eax
mov dword [esp + 0xbc], ecx
jge 0x4afb37
mov eax, dword [esp + 0x48]
cmp dword [esp + 0xb0], eax
jge 0x4afb37
mov eax, dword [esp + 0x98]
cmp dword [esp + 0x124], eax
jge 0x4afb37
cmp edx, ecx
jge 0x4afb37
mov edi, dword [esp + 0x40]
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
mov esi, dword [esp + 0x14]
imul esi, dword [esp + 0x60]
add esi, dword [esp + 0x6c]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp esi, ecx
jb 0x4aed3c
call fcn.0059ec50
fild dword [esp + 0xb8]
mov eax, dword [edi + 0xc]
lea edx, [esi + esi*2]
mov ecx, dword [eax + edx*4]
fstp dword [esp + 0x110]
lea eax, [eax + edx*4]
fild dword [esp + 0xb4]
mov edx, dword [esp + 0x128]
mov dword [esp + 0x10c], eax
mov dword [esp + 0xa8], ecx
fstp dword [esp + 0x114]
mov dword [esp + 0x68], edx
mov dword [esp + 0x94], 0
jmp 0x4aed90
mov ecx, dword [esp + 0xbc]
sub ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x94]
sub edx, dword [esp + 0x50]
mov eax, dword [esp + 0x124]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
mov dword [esp + 0x70], eax
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], ecx
fstp dword [esp + 0xc4]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x98]
sub ecx, eax
mov dword [esp + 0x9c], ecx
lea edx, [esp + 0x118]
push edx
lea ecx, [esp + 0x10c]
push ecx
lea edx, [esp + 0xd0]
push edx
lea ecx, [esp + 0xcc]
push ecx
lea edx, [esp + 0xa0]
push edx
mov edx, dword [esp + 0x7c]
lea ecx, [esp + 0xb0]
push ecx
mov ecx, dword [ebp + 0x28]
push edx
push eax
call fcn.004981f0
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x8c]
sub eax, dword [esp + 0x54]
push 1
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
lea ecx, [esp + 0x198]
fstp dword [esp + 0x50]
fld dword [esp + 0x50]
fst dword [esp + 0x158]
fld dword [esp + 0xc8]
fst dword [esp + 0x15c]
fild dword [esp + 0x94]
fstp dword [esp + 0x68]
fld dword [esp + 0x68]
fadd st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fst dword [esp + 0x18]
fxch st(2)
fst dword [esp + 0x160]
fld dword [esp + 0x18]
fstp dword [esp + 0x164]
fild dword [esp + 0xa0]
fstp dword [esp + 0x1c]
fadd dword [esp + 0x1c]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fst dword [esp + 0x18]
fxch st(2)
fstp dword [esp + 0x28]
fld dword [esp + 0x18]
fstp dword [esp + 0x168]
fld dword [esp + 0x28]
fstp dword [esp + 0x16c]
fxch st(1)
fstp dword [esp + 0x170]
fstp dword [esp + 0x174]
fldz
fst dword [esp + 0xe8]
fst dword [esp + 0xec]
fst dword [esp + 0xf0]
fst dword [esp + 0xf4]
fst dword [esp + 0xf8]
fst dword [esp + 0xfc]
fst dword [esp + 0x100]
fstp dword [esp + 0x104]
call fcn.004680d0
mov eax, dword [ebp + 0x30]
fild dword [eax + 4]
sub esp, 8
fsub dword [ebp + 0x20]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fstp dword [esp + 4]
fild dword [eax]
fsub dword [ebp + 0x1c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fstp dword [esp]
lea ecx, [esp + 0x19c]
call fcn.00468110
mov esi, dword [ebp + 0x34]
xor edi, edi
jmp 0x4aef60
lea ecx, [esp + edi + 0x154]
push ecx
lea edx, [esp + 0x190]
push edx
lea eax, [esp + 0x19c]
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x20c]
push ecx
push esi
lea edx, [esp + 0x1f0]
push edx
push eax
lea ecx, [esp + 0x1d4]
push ecx
call fcn.00485980
add esp, 8
mov ecx, eax
call fcn.00467fc0
mov ecx, eax
call fcn.00467fc0
mov ecx, eax
call fcn.00468030
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + edi + 0xe4], edx
mov dword [esp + edi + 0xe8], eax
add edi, 8
cmp edi, 0x20
jl 0x4aef60
push 4
call fcn.0059e72d
xor esi, esi
add esp, 4
cmp eax, esi
je 0x4aefe5
lea ecx, [esp + 0x28]
mov dword [eax], ecx
jmp 0x4aefe7
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
fld dword [esp + 0x110]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0xe8]
push eax
sub esp, 8
fstp dword [esp + 4]
mov dword [esp + 0x1060], 1
fld dword [esp + 0x124]
fstp dword [esp]
call fcn.004ae440
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
add esp, 0x10
sar eax, 3
push eax
lea ecx, [esp + 0xd0]
call fcn.004ad550
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x34]
lea ecx, [esp + 0x13c]
sar eax, 3
push eax
mov byte [esp + 0x1054], 2
call fcn.004ad550
mov ecx, dword [esp + 0x14c]
sub ecx, dword [esp + 0x148]
mov byte [esp + 0x1050], 3
sar ecx, 3
test ecx, ecx
ja 0x4af089
call fcn.0059ec50
mov edx, dword [esp + 0x148]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x38]
mov eax, edx
sub eax, ecx
sar eax, 3
cmp eax, esi
jbe 0x4af356
fild dword [esp + 0xac]
mov edx, dword [esp + 0x10c]
lea edi, [edx + 4]
add edx, 8
fstp dword [esp + 0xa0]
mov dword [esp + 0x58], edi
fild dword [esp + 0xb0]
mov dword [esp + 0x44], edx
fstp dword [esp + 0x5c]
fld dword [esp + 0x108]
fsub dword [esp + 0xc0]
fstp qword [esp + 0x174]
fld dword [esp + 0x118]
fsub dword [esp + 0xc8]
fstp qword [esp + 0x17c]
fild dword [esp + 0x54]
fstp dword [esp + 0x48]
fild dword [esp + 0x50]
fstp dword [esp + 0x24]
cmp esi, eax
jb 0x4af120
call fcn.0059ec50
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0xdc]
sub eax, dword [esp + 0xd8]
lea edi, [ecx + esi*8]
sar eax, 3
cmp esi, eax
jb 0x4af13d
call fcn.0059ec50
fld dword [esp + 0xa0]
mov ecx, dword [esp + 0x58]
fadd dword [edi]
mov edx, dword [esp + 0xd8]
fsub dword [esp + 0x48]
fidiv dword [ecx]
fstp dword [edx + esi*8]
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x34]
sar eax, 3
cmp esi, eax
jb 0x4af16e
call fcn.0059ec50
mov edx, dword [esp + 0xdc]
sub edx, dword [esp + 0xd8]
mov ecx, dword [esp + 0x34]
sar edx, 3
lea edi, [ecx + esi*8]
cmp esi, edx
jb 0x4af18f
call fcn.0059ec50
fld dword [edi + 4]
mov eax, dword [esp + 0x44]
fadd dword [esp + 0x5c]
mov ecx, dword [esp + 0xd8]
fsub dword [esp + 0x24]
fidiv dword [eax]
fstp dword [ecx + esi*8 + 4]
mov edx, dword [esp + 0x38]
sub edx, dword [esp + 0x34]
sar edx, 3
cmp esi, edx
jb 0x4af1bf
call fcn.0059ec50
mov eax, dword [esp + 0x34]
lea eax, [eax + esi*8]
push eax
lea ecx, [esp + 0x138]
push ecx
mov ecx, dword [ebp + 0x34]
lea edx, [esp + 0x19c]
push edx
lea eax, [esp + 0x1c4]
push eax
mov eax, dword [ebp + 0xc]
push ecx
lea edx, [esp + 0x1f0]
push edx
push eax
lea ecx, [esp + 0x21c]
push ecx
call fcn.00485980
add esp, 8
mov ecx, eax
call fcn.00467fc0
mov ecx, eax
call fcn.00467fc0
push eax
lea edx, [esp + 0xf0]
push edx
call fcn.00485980
add esp, 8
mov ecx, eax
call fcn.00468030
fld dword [esp + 0x134]
fsub dword [esp + 0x4c]
mov eax, dword [esp + 0x14]
fmul qword [esp + 0x174]
fdiv dword [esp + 0x18]
fadd dword [esp + 0xc0]
fstp dword [eax + esi*8]
fld dword [esp + 0x138]
fsub dword [esp + 0xc4]
fmul qword [esp + 0x17c]
fdiv dword [esp + 0x64]
fadd dword [esp + 0xc8]
fstp dword [eax + esi*8 + 4]
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x34]
fld dword [esp + 0x48]
fstp dword [esp + 0x11c]
fld dword [esp + 0x24]
sar eax, 3
fstp dword [esp + 0x120]
cmp esi, eax
jb 0x4af297
call fcn.0059ec50
mov ecx, dword [esp + 0x34]
fld dword [esp + 0x11c]
fadd dword [ecx + esi*8]
lea eax, [ecx + esi*8]
fstp dword [eax]
fld dword [esp + 0x120]
fadd dword [eax + 4]
fstp dword [eax + 4]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov edx, eax
sub edx, ecx
sar edx, 3
cmp esi, edx
jb 0x4af2d7
call fcn.0059ec50
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
sub eax, ecx
sar eax, 3
lea edx, [ecx + esi*8]
mov dword [esp + 0x20], edx
cmp esi, eax
jb 0x4af2f0
call fcn.0059ec50
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edi, [ecx + esi*8]
push eax
lea ecx, [esp + 0x188]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00468030
mov edx, dword [eax]
mov dword [edi], edx
mov eax, dword [eax + 4]
mov dword [edi + 4], eax
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x34]
sar ecx, 3
cmp esi, ecx
jb 0x4af326
call fcn.0059ec50
mov edx, dword [esp + 0x34]
fld dword [edx + esi*8]
lea eax, [edx + esi*8]
fadd dword [ebp + 0x1c]
inc esi
fstp dword [eax]
fld dword [ebp + 0x20]
fadd dword [eax + 4]
fstp dword [eax + 4]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov eax, edx
sub eax, ecx
sar eax, 3
cmp esi, eax
jb 0x4af120
mov eax, dword [ebp + 0x18]
mov byte [esp + 0x1f], 0
test eax, eax
je 0x4af454
mov esi, dword [eax]
mov edi, dword [eax + 8]
add edi, esi
mov dword [esp + 0x20], esi
mov esi, dword [eax + 4]
mov eax, dword [eax + 0xc]
add eax, esi
mov dword [esp + 0x58], eax
mov eax, edx
sub eax, ecx
mov dword [esp + 0x5c], esi
sar eax, 3
xor esi, esi
mov dword [esp + 0x44], edi
test eax, eax
jbe 0x4af454
fild dword [esp + 0x20]
fstp dword [esp + 0x20]
cmp esi, eax
jb 0x4af3af
call fcn.0059ec50
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
fld dword [ecx + esi*8]
fld dword [esp + 0x20]
fcompp
fnstsw ax
test ah, 0x41
je 0x4af44f
mov eax, edx
sub eax, ecx
sar eax, 3
cmp esi, eax
jb 0x4af3db
call fcn.0059ec50
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
fld dword [ecx + esi*8]
fild dword [esp + 0x44]
fcompp
fnstsw ax
test ah, 0x41
jnp 0x4af44f
mov eax, edx
sub eax, ecx
sar eax, 3
cmp esi, eax
jb 0x4af403
call fcn.0059ec50
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
fld dword [ecx + esi*8 + 4]
fild dword [esp + 0x5c]
fcompp
fnstsw ax
test ah, 0x41
je 0x4af44f
mov eax, edx
sub eax, ecx
sar eax, 3
cmp esi, eax
jb 0x4af42c
call fcn.0059ec50
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
fld dword [ecx + esi*8 + 4]
fild dword [esp + 0x58]
fcompp
fnstsw ax
test ah, 0x41
jnp 0x4af44f
mov eax, edx
sub eax, ecx
inc esi
sar eax, 3
cmp esi, eax
jb 0x4af3af
jmp 0x4af454
mov byte [esp + 0x1f], 1
mov esi, dword [ebp + 0x14]
mov eax, dword [esi + 0xc]
shl eax, 8
or eax, dword [esi]
sub edx, ecx
shl eax, 8
or eax, dword [esi + 4]
sar edx, 3
shl eax, 8
or eax, dword [esi + 8]
push 4
mov dword [esp + 0xa4], eax
mov esi, edx
call fcn.0059e72d
add esp, 4
test eax, eax
je 0x4af48f
lea ecx, [esp + 0x74]
mov dword [eax], ecx
jmp 0x4af491
xor eax, eax
mov dword [esp + 0x74], eax
lea edx, [esp + 0x1b8]
push edx
push esi
lea ecx, [esp + 0x7c]
mov byte [esp + 0x1058], 4
call fcn.004ac550
mov ecx, dword [esp + 0x84]
mov esi, dword [esp + 0x80]
mov edx, ecx
sub edx, esi
mov eax, 0x38e38e39
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [esp + 0x1050], 5
mov dword [esp + 0x18], 0
je 0x4af6ab
mov dword [esp + 0x24], 0
mov eax, dword [esp + 0xdc]
mov edx, dword [esp + 0xd8]
mov esi, dword [esp + 0x18]
mov edi, eax
sub edi, edx
sar edi, 3
cmp esi, edi
jb 0x4af527
call fcn.0059ec50
mov eax, dword [esp + 0xdc]
mov edx, dword [esp + 0xd8]
mov ecx, dword [esp + 0x84]
sub eax, edx
sar eax, 3
lea edi, [edx + esi*8]
mov dword [esp + 0x44], edi
cmp esi, eax
jb 0x4af54a
call fcn.0059ec50
mov edx, dword [esp + 0xd8]
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x34]
lea edx, [edx + esi*8]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x38]
mov edi, edx
sub edi, eax
sar edi, 3
cmp esi, edi
jb 0x4af578
call fcn.0059ec50
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x84]
sub edx, eax
sar edx, 3
lea edi, [eax + esi*8]
cmp esi, edx
jb 0x4af594
call fcn.0059ec50
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x84]
fld dword [eax + esi*8]
mov eax, dword [esp + 0x20]
fld qword [0x5d4fc0]
mov edx, dword [esp + 0x44]
fsub st(1), st(0)
sub ecx, dword [esp + 0x80]
fxch st(1)
fstp dword [esp + 0x5c]
fsubr dword [edi + 4]
fstp dword [esp + 0x58]
fld dword [eax]
mov eax, dword [esp + 0x14]
fstp dword [esp + 0x20]
fld dword [edx + 4]
fstp dword [esp + 0x44]
fld dword [eax + esi*8]
fstp dword [esp + 0x48]
fld dword [eax + esi*8 + 4]
mov eax, dword [esp + 0xa0]
fstp dword [esp + 0x64]
mov dword [esp + 0xf4], eax
fld dword [esp + 0x5c]
mov eax, 0x38e38e39
fstp dword [esp + 0xe4]
imul ecx
fld dword [esp + 0x58]
fstp dword [esp + 0xe8]
fldz
fstp dword [esp + 0xec]
fld1
fstp dword [esp + 0xf0]
fld dword [esp + 0x20]
fstp dword [esp + 0xf8]
sar edx, 3
fld dword [esp + 0x44]
mov ecx, edx
fstp dword [esp + 0xfc]
shr ecx, 0x1f
fld dword [esp + 0x48]
add ecx, edx
fstp dword [esp + 0x100]
fld dword [esp + 0x64]
fstp dword [esp + 0x104]
cmp esi, ecx
jb 0x4af657
call fcn.0059ec50
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x80]
lea edi, [edx + eax]
inc dword [esp + 0x18]
add eax, 0x24
mov ecx, 9
lea esi, [esp + 0xe4]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x84]
mov esi, dword [esp + 0x80]
mov dword [esp + 0x24], eax
mov edx, ecx
sub edx, esi
mov eax, 0x38e38e39
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x18], eax
jb 0x4af4f0
sub ecx, esi
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 3
jb 0x4af9b1
mov eax, dword [esp + 0xa4]
mov edx, dword [ebx]
mov ecx, dword [edx + 0x8c]
push str.SetTexture_gTexture
push eax
xor edi, edi
push edi
push ebx
call ecx
push eax
call fcn.004a44c0
mov edx, dword [ebx]
mov eax, dword [edx + 0x94]
add esp, 8
push 1
push 0xb
push edi
push ebx
call eax
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x94]
push 4
push 4
push edi
push ebx
call edx
mov eax, dword [ebx]
mov ecx, dword [eax + 0x94]
push 1
push 5
push edi
push ebx
call ecx
mov edx, dword [ebx]
mov eax, dword [edx + 0x94]
push 2
push 6
push edi
push ebx
call eax
mov edx, dword [esp + 0xa8]
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x8c]
push str.SetTexture_gTexture
push edx
push 1
push ebx
call eax
push eax
call fcn.004a44c0
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x94]
add esp, 8
push edi
push 0xb
push 1
push ebx
call edx
mov eax, dword [ebx]
mov ecx, dword [eax + 0x94]
push 4
push 1
push 1
push ebx
call ecx
mov edx, dword [ebx]
mov eax, dword [edx + 0x94]
push 2
push 2
push 1
push ebx
call eax
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x94]
push edi
push 3
push 1
push ebx
call edx
mov eax, dword [ebx]
push 4
mov ecx, dword [eax + 0x94]
push 4
push 1
push ebx
call ecx
mov edx, dword [ebx]
mov eax, dword [edx + 0x94]
push 1
push 5
push 1
push ebx
call eax
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x94]
push 2
push 6
push 1
push ebx
call edx
cmp byte [esp + 0x1f], 0
jne 0x4af81c
mov ecx, dword [esp + 0x84]
sub ecx, dword [esp + 0x80]
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x4af7f0
call fcn.0059ec50
mov ecx, dword [esp + 0x80]
mov eax, dword [ebx]
mov edx, dword [eax + 0x64]
push 0x5e06b8
push edi
push esi
push ecx
push 0x244
push 6
push ebx
call edx
push eax
call fcn.004a44c0
add esp, 8
jmp 0x4af9b3
lea eax, [esp + 0x224]
mov esi, 0x64
mov dword [esp + 0x1034], eax
mov dword [esp + 0x1038], edi
mov dword [esp + 0x103c], esi
mov ecx, dword [esp + 0x84]
sub ecx, dword [esp + 0x80]
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [esp + 0x1050], 6
mov dword [esp + 0x18], edi
je 0x4af980
mov dword [esp + 0x4c], edi
jmp 0x4af887
mov esi, dword [esp + 0x103c]
cmp dword [esp + 0x18], eax
jb 0x4af899
call fcn.0059ec50
mov esi, dword [esp + 0x103c]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x80]
add edx, ecx
mov dword [esp + 0xa4], edx
cmp dword [esp + 0x1038], esi
jne 0x4af920
lea edi, [esi + esi]
cmp esi, edi
jge 0x4af920
xor ecx, ecx
mov eax, edi
mov edx, 0x24
mul edx
seto cl
mov dword [esp + 0x103c], edi
neg ecx
or ecx, eax
push ecx
call fcn.0059d93d
mov ecx, dword [esp + 0x1038]
mov esi, eax
mov eax, dword [esp + 0x103c]
lea eax, [eax + eax*8]
add eax, eax
add eax, eax
push eax
push ecx
push esi
call fcn.005a2be0
mov eax, dword [esp + 0x1044]
lea edx, [esp + 0x234]
add esp, 0x10
cmp eax, edx
je 0x4af919
push eax
call fcn.0059e6bb
add esp, 4
mov dword [esp + 0x1034], esi
mov eax, dword [esp + 0x1038]
mov ecx, dword [esp + 0x1034]
mov esi, dword [esp + 0xa4]
lea eax, [eax + eax*8]
lea edi, [ecx + eax*4]
add dword [esp + 0x4c], 0x24
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x84]
sub ecx, dword [esp + 0x80]
mov eax, 1
add dword [esp + 0x1038], eax
add dword [esp + 0x18], eax
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x18], eax
jb 0x4af880
mov esi, dword [ebp + 0x18]
push ebx
lea edi, [esp + 0x228]
call fcn.004a51b0
mov eax, dword [esp + 0x1038]
mov edx, edi
add esp, 4
mov byte [esp + 0x1050], 5
cmp eax, edx
je 0x4af9b1
push eax
call fcn.0059e6bb
add esp, 4
xor edi, edi
mov eax, dword [ebx]
mov ecx, dword [eax + 0x8c]
push str.SetTexture_gTexture
push edi
push 1
push ebx
call ecx
push eax
call fcn.004a44c0
mov eax, dword [esp + 0xa4]
add dword [esp + 0x78], eax
add dword [esp + 0x94], eax
mov eax, dword [esp + 0x88]
add esp, 8
cmp eax, edi
je 0x4af9f5
push eax
call fcn.0059e6bb
add esp, 4
mov edx, dword [esp + 0x74]
push edx
mov dword [esp + 0x84], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], edi
call fcn.0059e6bb
mov eax, dword [esp + 0x14c]
add esp, 4
cmp eax, edi
je 0x4afa2b
push eax
call fcn.0059e6bb
add esp, 4
mov eax, dword [esp + 0x13c]
push eax
mov dword [esp + 0x14c], edi
mov dword [esp + 0x150], edi
mov dword [esp + 0x154], edi
call fcn.0059e6bb
mov eax, dword [esp + 0xdc]
add esp, 4
cmp eax, edi
je 0x4afa64
push eax
call fcn.0059e6bb
add esp, 4
mov ecx, dword [esp + 0xcc]
push ecx
mov dword [esp + 0xdc], edi
mov dword [esp + 0xe0], edi
mov dword [esp + 0xe4], edi
call fcn.0059e6bb
mov eax, dword [esp + 0x38]
add esp, 4
mov dword [esp + 0x1050], 0xffffffff
cmp eax, edi
je 0x4afaa5
push eax
call fcn.0059e6bb
add esp, 4
mov edx, dword [esp + 0x28]
push edx
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
call fcn.0059e6bb
mov eax, dword [esp + 0x74]
add esp, 4
cmp eax, dword [esp + 0x98]
jl 0x4aedd2
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x68]
add dword [esp + 0x94], eax
add ecx, eax
cmp ecx, dword [esp + 0xbc]
mov dword [esp + 0x68], ecx
jl 0x4aed90
mov edi, dword [esp + 0x40]
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
mov esi, dword [edi + 0x24]
imul esi, dword [esp + 0x60]
add esi, dword [esp + 0x6c]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp esi, ecx
jb 0x4afb23
call fcn.0059ec50
mov eax, dword [edi + 0xc]
mov edi, dword [ebp + 0x10]
lea edx, [esi + esi*2]
mov ecx, dword [eax + edx*4 + 4]
add dword [esp + 0x54], ecx
mov esi, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x40]
mov eax, dword [edx + 0x24]
inc ecx
cmp ecx, eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x14], eax
jl 0x4aec3b
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x10]
sub edx, dword [eax + 0xc]
mov ecx, dword [eax + 0x24]
imul ecx, dword [esp + 0x60]
mov eax, 0x2aaaaaab
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0xa8], ecx
cmp ecx, eax
jb 0x4afb8c
call fcn.0059ec50
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0x40]
mov eax, dword [edx + 0xc]
lea ecx, [ecx + ecx*2]
mov ecx, dword [eax + ecx*4 + 8]
mov eax, dword [esp + 0x60]
add dword [esp + 0x50], ecx
inc eax
cmp eax, dword [edx + 0x28]
mov dword [esp + 0x60], eax
jl 0x4aec20
mov ecx, dword [esp + 0x1048]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x30