Function at 0x486b90
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8e4
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x8f8]
mov eax, dword [edi + 4]
test eax, eax
mov ebx, ecx
mov dword [esp + 0x34], ebx
mov esi, 0x5153a8
je 0x486bb5
mov esi, eax
mov eax, dword [0x5530d4]
test eax, eax
jne 0x486bdc
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x486bd5
mov ecx, eax
call fcn.0044eab0
jmp 0x486bd7
xor eax, eax
mov dword [0x5530d4], eax
push esi
push str.Request_to_LoadTexture____s___.
push 3
push eax
call fcn.0044ef30
add esp, 0x10
lea eax, [esp + 0xe4]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [0x5530d4]
test eax, eax
jne 0x486c27
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x486c20
mov ecx, eax
call fcn.0044eab0
jmp 0x486c22
xor eax, eax
mov dword [0x5530d4], eax
lea ecx, [esp + 0xe4]
push ecx
push str.Current_directory_is___s_.
push 3
push eax
call fcn.0044ef30
mov eax, dword [edi + 4]
add esp, 0x10
test eax, eax
jne 0x486c4b
mov eax, 0x5153a8
lea edx, [esp + 0xa0]
push edx
lea ecx, [esp + 0x4f8]
push ecx
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov dl, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], dl
call fcn.00401b60
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x4f4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea eax, [esp + 0x4f8]
push eax
lea ecx, [esp + 0x28]
call fcn.004022a0
lea ecx, [esp + 0x20]
push ecx
call fcn.00488fd0
add esp, 4
lea ecx, [esp + 0x20]
xor ebp, ebp
call fcn.00419f20
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x20]
call fcn.00485330
cmp esi, eax
je 0x486ce5
movsx eax, byte [esi]
mov edx, ebp
shr edx, 0x18
shl ebp, 8
or edx, ebp
add edx, eax
lea ecx, [esp + 0x20]
mov ebp, edx
inc esi
call fcn.00485330
cmp esi, eax
jne 0x486cc6
mov eax, dword [ebx + 8]
mov esi, dword [eax]
cmp esi, eax
je 0x486d3f
cmp dword [esi + 0x1c], ebp
jne 0x486d38
lea ecx, [esi + 8]
push ecx
lea ecx, [esp + 0x4c]
call fcn.00403270
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x486d0d
mov eax, 0x5153a8
mov edx, dword [esp + 0x28]
push edx
push eax
mov eax, dword [esp + 0x58]
push eax
push 0
lea ecx, [esp + 0x58]
call fcn.00474ff0
push 1
lea ecx, [esp + 0x4c]
mov edi, eax
call fcn.00401b60
test edi, edi
je 0x487044
mov esi, dword [esi]
cmp esi, dword [ebx + 8]
jne 0x486cee
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0x18], 0
jne 0x486d54
mov eax, 0x5153a8
lea ecx, [esp + 0x3f0]
push ecx
lea edx, [esp + 0x1ec]
push edx
lea ecx, [esp + 0xec]
push ecx
lea edx, [esp + 0x2f8]
push edx
push eax
call fcn.004fe39d
mov al, byte [esp + 0x27]
add esp, 0x14
push 0
lea ecx, [esp + 0x4c]
mov byte [esp + 0x4c], al
call fcn.00401b60
or ecx, 0xffffffff
xor eax, eax
mov edi, str..dds
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str..dds
lea ecx, [esp + 0x50]
call fcn.004022a0
mov cl, byte [esp + 0x13]
mov byte [esp + 0x70], cl
push 0
lea ecx, [esp + 0x74]
call fcn.00401b60
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x1e8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea edx, [esp + 0x1ec]
push edx
lea ecx, [esp + 0x78]
call fcn.004022a0
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x94]
mov byte [esp + 0x94], al
call fcn.00401b60
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0xe4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0x98]
call fcn.004022a0
mov dl, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x84]
mov byte [esp + 0x84], dl
call fcn.00401b60
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x2ec]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea eax, [esp + 0x2f0]
push eax
lea ecx, [esp + 0x88]
call fcn.004022a0
lea ecx, [esp + 0x80]
push ecx
lea ecx, [esp + 0xd8]
call fcn.00403270
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x98]
push edx
mov ecx, eax
call fcn.004103c0
push eax
lea ecx, [esp + 0xb8]
call fcn.00403270
push 1
lea ecx, [esp + 0xd8]
call fcn.00401b60
lea eax, [esp + 0xb4]
push eax
lea ecx, [esp + 0xc8]
call fcn.00403270
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x78]
push ecx
mov ecx, eax
call fcn.004103c0
push eax
lea ecx, [esp + 0xa8]
call fcn.00403270
push 1
lea ecx, [esp + 0xc8]
call fcn.00401b60
lea edx, [esp + 0xa4]
push edx
lea ecx, [esp + 0x5c]
call fcn.00403270
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x50]
push ecx
mov ecx, eax
call fcn.004103c0
push eax
lea ecx, [esp + 0x3c]
call fcn.00403270
push 1
lea ecx, [esp + 0x5c]
call fcn.00401b60
push 1
lea ecx, [esp + 0xa8]
call fcn.00401b60
push 1
lea ecx, [esp + 0xb8]
call fcn.00401b60
push 1
lea ecx, [esp + 0x84]
call fcn.00401b60
push 1
lea ecx, [esp + 0x94]
call fcn.00401b60
push 1
lea ecx, [esp + 0x74]
call fcn.00401b60
push 1
lea ecx, [esp + 0x4c]
call fcn.00401b60
mov eax, dword [esp + 0x3c]
test eax, eax
mov esi, 0x80004005
jne 0x486f79
mov eax, 0x5153a8
push eax
call fcn.004885e0
mov edi, dword [esp + 0x928]
mov ebp, dword [esp + 0x924]
mov ebx, dword [esp + 0x920]
add esp, 4
test al, al
je 0x48711b
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x486fac
mov eax, 0x5153a8
mov ecx, dword [esp + 0x918]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x918]
push edi
push ebp
push ebx
push ecx
mov ecx, dword [esp + 0x924]
push edx
mov edx, dword [esp + 0x924]
push ecx
mov ecx, dword [esp + 0x924]
push edx
mov edx, dword [esp + 0x924]
push ecx
mov ecx, dword [esp + 0x924]
push edx
mov edx, dword [esp + 0x924]
push ecx
push edx
push eax
call fcn.0047e0e0
push eax
call fcn.004bb9ee
mov esi, eax
test esi, esi
jl 0x48711b
mov eax, dword [esp + 0x3c]
test eax, eax
mov edi, 0x5153a8
je 0x487019
mov edi, eax
mov eax, dword [0x5530d4]
test eax, eax
jne 0x487105
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x4870fe
mov ecx, eax
call fcn.0044eab0
jmp 0x487100
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x487051
mov edi, 0x5153a8
mov eax, dword [0x5530d4]
test eax, eax
jne 0x487078
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x487071
mov ecx, eax
call fcn.0044eab0
jmp 0x487073
xor eax, eax
mov dword [0x5530d4], eax
push edi
push str.LoadTexture____s_______cached.
push 3
push eax
call fcn.0044ef30
mov ecx, dword [ebx + 8]
mov eax, dword [ecx]
mov ebp, dword [esi + 0x18]
add esp, 0x10
lea edi, [ebx + 4]
lea edx, [esi + 8]
push edx
push eax
lea eax, [esp + 0x3c]
push eax
mov ecx, edi
call fcn.00487670
push 0
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], esi
call fcn.0046e050
mov esi, dword [eax]
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov dword [edx], eax
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov dword [ecx + 4], edx
push 0
lea ecx, [esi + 8]
call fcn.0048e5d0
push esi
call fcn.004ef70e
mov ecx, dword [edi + 8]
add esp, 4
dec ecx
mov dword [edi + 8], ecx
push 1
lea ecx, [esp + 0x24]
call fcn.00401b60
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x8e4
ret 0x30
xor eax, eax
mov dword [0x5530d4], eax
push edi
push str.LoadTexture____s_______loaded_generic_DDS.
push 3
push eax
call fcn.0044ef30
add esp, 0x10
jmp 0x487435
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x487128
mov eax, 0x5153a8
push eax
call fcn.004885e0
add esp, 4
test al, al
je 0x4871ec
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x487146
mov eax, 0x5153a8
mov edx, dword [esp + 0x918]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x918]
push edi
push ebp
push ebx
push edx
mov edx, dword [esp + 0x924]
push ecx
mov ecx, dword [esp + 0x924]
push edx
mov edx, dword [esp + 0x924]
push ecx
mov ecx, dword [esp + 0x924]
push edx
mov edx, dword [esp + 0x924]
push ecx
mov ecx, dword [esp + 0x924]
push edx
push ecx
push eax
call fcn.0047e0e0
push eax
call fcn.004bb9ee
mov esi, eax
test esi, esi
jl 0x4871ec
mov eax, dword [esp + 0x3c]
test eax, eax
mov edi, 0x5153a8
je 0x4871af
mov edi, eax
mov eax, dword [0x5530d4]
test eax, eax
jne 0x4871d6
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x4871cf
mov ecx, eax
call fcn.0044eab0
jmp 0x4871d1
xor eax, eax
mov dword [0x5530d4], eax
push edi
push str.LoadTexture____s_______loaded_generic_texture.
push 3
push eax
call fcn.0044ef30
add esp, 0x10
jmp 0x487435
mov eax, dword [0x553364]
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], ecx
jne 0x48721d
push 0x3c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x487216
mov ecx, eax
call fcn.00473ca0
jmp 0x487218
xor eax, eax
mov dword [0x553364], eax
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x40]
push edx
mov ecx, eax
call fcn.004741e0
test al, al
je 0x4872fe
mov eax, dword [esp + 0x14]
test eax, eax
je 0x487315
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x487302
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x91c]
push edi
push ebp
push ebx
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
push ecx
push eax
call fcn.0047e0e0
push eax
call fcn.004bb9b1
mov esi, eax
test esi, esi
jl 0x4872fe
mov eax, dword [esp + 0x3c]
test eax, eax
mov dword [esp + 0x30], 0x5153a8
je 0x4872c2
mov dword [esp + 0x30], eax
mov eax, dword [0x5530d4]
test eax, eax
jne 0x4872e9
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x4872e2
mov ecx, eax
call fcn.0044eab0
jmp 0x4872e4
xor eax, eax
mov dword [0x5530d4], eax
mov ecx, dword [esp + 0x30]
push ecx
push str.LoadTexture____s_______loaded_grouped_DDS.
push 3
push eax
call fcn.0044ef30
add esp, 0x10
mov eax, dword [esp + 0x14]
test eax, eax
je 0x487315
push eax
call fcn.004ef70e
add esp, 4
xor eax, eax
mov dword [esp + 0x14], eax
test esi, esi
mov dword [esp + 0x1c], 0
jge 0x487428
mov eax, dword [0x553364]
test eax, eax
jne 0x48734c
push 0x3c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x487345
mov ecx, eax
call fcn.00473ca0
jmp 0x487347
xor eax, eax
mov dword [0x553364], eax
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
mov ecx, eax
call fcn.004741e0
test al, al
je 0x487424
mov eax, dword [esp + 0x14]
test eax, eax
je 0x487435
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x487428
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x91c]
push edi
push ebp
push ebx
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
mov edx, dword [esp + 0x928]
push edx
push ecx
push eax
call fcn.0047e0e0
push eax
call fcn.004bb9b1
mov esi, eax
test esi, esi
jl 0x487424
mov eax, dword [esp + 0x24]
test eax, eax
mov edi, 0x5153a8
je 0x4873ec
mov edi, eax
mov eax, dword [0x5530d4]
test eax, eax
jne 0x487413
push 0x1c
call fcn.004fc0e2
add esp, 4
test eax, eax
je 0x48740c
mov ecx, eax
call fcn.0044eab0
jmp 0x48740e
xor eax, eax
mov dword [0x5530d4], eax
push edi
push str.LoadTexture____s_______loaded_grouped_TGA.
push 3
push eax
call fcn.0044ef30
add esp, 0x10
mov eax, dword [esp + 0x14]
test eax, eax
je 0x487435
push eax
call fcn.004ef70e
add esp, 4
mov eax, dword [esp + 0x24]
xor ebx, ebx
cmp esi, ebx
jge 0x487488
cmp eax, ebx
mov esi, 0x5153a8
je 0x48744a
mov esi, eax
mov eax, dword [0x5530d4]
cmp eax, ebx
jne 0x48747e
push 0x1c
call fcn.004fc0e2
add esp, 4
cmp eax, ebx
je 0x487477
mov ecx, eax
call fcn.0044eab0
push esi
push str.LoadTexture____s_______failed.
mov dword [0x5530d4], eax
push 2
jmp 0x4874c2
xor eax, eax
mov dword [0x5530d4], eax
push esi
push str.LoadTexture____s_______failed.
push 2
jmp 0x4874c2
cmp eax, ebx
mov esi, 0x5153a8
je 0x487493
mov esi, eax
mov eax, dword [0x5530d4]
cmp eax, ebx
jne 0x4874ba
push 0x1c
call fcn.004fc0e2
add esp, 4
cmp eax, ebx
je 0x4874b3
mov ecx, eax
call fcn.0044eab0
jmp 0x4874b5
xor eax, eax
mov dword [0x5530d4], eax
push esi
push str.LoadTexture____s_______first_time.
push 3
push eax
call fcn.0044ef30
mov al, byte [esp + 0x30]
mov esi, dword [esp + 0x28]
add esp, 0x10
push ebx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x5c], al
call fcn.00401b60
mov ecx, dword [0x5153c0]
push ecx
push ebx
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x64]
call fcn.00403390
mov dword [esp + 0x68], esi
lea ecx, [esp + 0x58]
xor esi, esi
call fcn.00419f20
mov edi, dword [esp + 0x5c]
lea ecx, [esp + 0x58]
call fcn.00485330
cmp edi, eax
je 0x487536
movsx ecx, byte [edi]
mov eax, esi
shr eax, 0x18
shl esi, 8
or eax, esi
add eax, ecx
lea ecx, [esp + 0x58]
mov esi, eax
inc edi
call fcn.00485330
cmp edi, eax
jne 0x487517
mov edx, dword [esp + 0x34]
mov edi, dword [edx + 8]
mov dword [esp + 0x6c], esi
mov eax, dword [edi + 4]
lea esi, [edx + 4]
push eax
push edi
mov ecx, esi
call fcn.0048e5a0
mov dword [edi + 4], eax
mov ecx, dword [eax + 4]
lea edx, [esp + 0x58]
mov dword [ecx], eax
push edx
add eax, 8
push eax
call fcn.004876f0
mov edi, dword [esi + 8]
add esp, 8
inc edi
push 1
lea ecx, [esp + 0x5c]
mov dword [esi + 8], edi
call fcn.00401b60
mov eax, dword [esp + 0x3c]
cmp eax, ebx
mov esi, dword [esp + 0x18]
je 0x4875a4
mov cl, byte [eax - 1]
test cl, cl
je 0x48759a
cmp cl, 0xff
je 0x48759a
dec cl
mov byte [eax - 1], cl
jmp 0x4875a4
dec eax
push eax
call fcn.004ef70e
add esp, 4
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
je 0x4875e1
mov al, byte [ecx - 1]
test al, al
je 0x4875d7
cmp al, 0xff
je 0x4875d7
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x8e4
ret 0x30
dec ecx
push ecx
call fcn.004ef70e
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x8e4
ret 0x30