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

Disassembly:
mov eax, 0x1e44
call fcn.0051d590
mov eax, dword [esp + 0x1e50]
push esi
mov esi, dword [esp + 0x1e4c]
push eax
lea eax, [esp + 0x2c]
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
push ecx
push edx
mov edx, dword [esi]
lea ecx, [esp + 0x234]
push eax
push ecx
lea eax, [esp + 0x48]
push edx
push eax
call fcn.00518e30
mov edx, dword [esp + 0x224]
add esp, 0x1c
test edx, edx
jne 0x511174
mov ecx, dword [esi]
push ecx
push str._Model__s_has_no_skelmodel_n
call fcn.0044cca0
add esp, 8
xor eax, eax
pop esi
add esp, 0x1e44
ret
push ebx
push ebp
mov ebp, dword [esp + 0x1e58]
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x4c]
not ecx
lea esi, [eax*8]
dec ecx
sub esi, eax
lea eax, [eax + esi*4]
lea eax, [eax + eax*2]
lea edx, [edx + eax*2]
lea esi, [ecx + edx*2 + 0x1db]
push esi
call fcn.0047a610
mov ecx, esi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x30], ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1e58]
lea ecx, [ebx + 0x3c]
mov dword [ebx + 4], eax
call fcn.0050b820
xor esi, esi
mov edi, ebp
mov dword [ebx + 8], esi
mov ecx, dword [esp + 0x54]
mov dword [ebx + 0x14], ecx
mov edx, dword [esp + 0x58]
mov dword [ebx + 0x18], edx
mov eax, dword [esp + 0x5c]
mov dword [ebx + 0x1c], eax
mov ecx, dword [esp + 0x4c]
mov dword [ebx + 0xc], ecx
mov edx, dword [esp + 0x214]
mov dword [ebx + 0x1d4], edx
mov eax, dword [esp + 0x78]
mov dword [ebx + 0x38], eax
mov ecx, dword [esp + 0x214]
xor eax, eax
lea edx, [ebx + ecx*2 + 0x1da]
or ecx, 0xffffffff
mov dword [ebx], edx
repne scasb al, byte es:[edi]
mov eax, dword [ebx]
not ecx
dec ecx
lea edx, [edx + ecx + 1]
mov dword [esp + 0x24], edx
mov cl, byte [ebp]
inc ebp
mov byte [eax], cl
inc eax
test cl, cl
jne 0x511237
lea ecx, [ebx + 0x3c]
call fcn.0050b720
mov eax, dword [esp + 0x214]
xor ecx, ecx
cmp eax, esi
mov dword [esp + 0x14], ecx
jle 0x5112d7
lea eax, [ebx + 0x1d8]
mov dword [esp + 0x10], eax
movsx eax, word [esp + ecx*2 + 0x218]
mov edx, dword [esp + 0x10]
xor edi, edi
mov word [edx], ax
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
shl eax, 2
mov edx, dword [eax + 0xcb1600]
mov esi, dword [eax + 0xcb15f8]
inc edx
mov dword [eax + 0xcb1600], edx
mov eax, dword [esi + 0x48]
test eax, eax
jle 0x5112ba
xor ebp, ebp
mov eax, dword [esi + 0x4c]
mov cx, word [eax + ebp]
push ecx
lea ecx, [ebx + 0x3c]
call fcn.0050b830
mov eax, dword [esi + 0x48]
inc edi
add ebp, 0x38
cmp edi, eax
jl 0x51129b
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x214]
inc ecx
add edx, 2
cmp ecx, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
jl 0x511265
xor esi, esi
lea ecx, [ebx + 0x3c]
call fcn.0050b760
mov edx, dword [esp + 0x60]
lea edi, [esp + 0x234]
mov dword [ebx + 0x20], edx
mov eax, dword [esp + 0x64]
mov dword [ebx + 0x24], eax
mov ecx, dword [esp + 0x68]
mov dword [ebx + 0x28], ecx
mov edx, dword [esp + 0x6c]
mov dword [ebx + 0x2c], edx
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x24]
mov dword [ebx + 0x30], eax
mov ecx, dword [esp + 0x74]
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x34], ecx
mov eax, dword [esp + 0x34]
cmp eax, esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x2c], esi
jle 0x5115b5
jmp 0x51132f
xor esi, esi
push 0x2a
push edi
call fcn.0051c6b0
mov ecx, eax
add esp, 8
sub ecx, edi
cmp eax, esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
jne 0x51146b
push 0x554af0
push edi
call fcn.0051d450
add esp, 8
test eax, eax
je 0x51146b
mov eax, dword [esp + 0x214]
xor edi, edi
test eax, eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
jle 0x511576
movsx eax, word [esp + edi*2 + 0x218]
push eax
call fcn.005179b0
mov ebx, eax
add esp, 4
xor ebp, ebp
mov eax, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x50]
test eax, eax
mov dword [esp + 0x14], ecx
jle 0x511441
lea edx, [esi*8]
mov ecx, dword [esp + 0x24]
sub edx, esi
lea eax, [esi + edx*4]
lea eax, [eax + eax*2]
lea esi, [ecx + eax*4]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
lea edi, [edx + 4]
push edi
push eax
call fcn.0051d450
add esp, 8
test eax, eax
jne 0x511420
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1e58]
push ecx
push edi
mov eax, dword [edx]
push esi
push eax
call fcn.005165d0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x511418
mov ecx, dword [esp + 0x1e5c]
lea edx, [ebx + 4]
push ecx
push edx
push ebp
push str.TIKI_InitTiki:_Surface__i_in__s_referenced_in__s__has_no_name___Please_investigate_and_fix_n
call fcn.00516570
add esp, 0x10
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x14]
inc ebp
add esi, 0x15c
mov ecx, dword [eax + 0x64]
mov eax, dword [ebx + 0x44]
cmp ebp, eax
mov dword [esp + 0x14], ecx
jl 0x5113be
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov edx, dword [ebx + 0x44]
mov eax, dword [esp + 0x214]
add esi, edx
inc edi
cmp edi, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
jl 0x511381
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x30]
jmp 0x511572
mov eax, dword [esp + 0x214]
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x28], esi
test eax, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], edi
jle 0x511576
movsx edx, word [esp + edi*2 + 0x218]
push edx
call fcn.005179b0
mov ecx, dword [eax + 0x44]
mov esi, dword [eax + 0x50]
add esp, 4
mov dword [esp + 0x20], eax
test ecx, ecx
mov dword [esp + 0x18], 0
jle 0x511551
lea eax, [ebp*8]
mov edx, dword [esp + 0x24]
sub eax, ebp
lea eax, [ebp + eax*4]
lea ecx, [eax + eax*2]
lea ebp, [edx + ecx*4]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x5114f4
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x5114f4
mov edi, dword [esp + 0x10]
push eax
lea eax, [esi + 4]
push eax
push edi
call fcn.0052ebe0
add esp, 0xc
test eax, eax
je 0x51150a
jmp 0x5114f8
mov edi, dword [esp + 0x10]
push 0x554af0
push edi
call fcn.0051d450
add esp, 8
test eax, eax
jne 0x51152a
mov edx, dword [esp + 0x1e58]
lea ecx, [esi + 4]
push edi
push ecx
mov eax, dword [edx]
push ebp
push eax
call fcn.005165d0
add esp, 0x10
mov dword [esp + 0x28], 1
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov esi, dword [esi + 0x64]
inc eax
mov edx, dword [ecx + 0x44]
add ebp, 0x15c
cmp eax, edx
mov dword [esp + 0x18], eax
jl 0x5114cc
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
mov eax, ecx
mov edx, dword [eax + 0x44]
mov eax, dword [esp + 0x214]
add ebp, edx
inc edi
cmp edi, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], edi
jl 0x51148a
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x511592
mov edx, dword [esp + 0x1e58]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx]
push eax
push ecx
push str.TIKI_InitTiki:_could_not_find_surface__s_in__s__check_referenced_skb_skd_files_._n
call fcn.00516570
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
inc eax
add edi, 0x12c
cmp eax, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], edi
jl 0x51132d
fld dword [ebx + 0x38]
fcomp dword [0x5374c0]
fnstsw ax
test ah, 0x44
jp 0x5115ce
push ebx
call fcn.005115e0
add esp, 4
pop edi
mov eax, ebx
pop ebp
pop ebx
pop esi
add esp, 0x1e44
ret