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

Disassembly:
push 0xffffffffffffffff
push 0x58a6fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2d8
push ebx
push ebp
mov ebx, ecx
push esi
push edi
lea ecx, [esp + 0xc4]
mov dword [esp + 0x60], ebx
call fcn.0050f330
mov eax, dword [esp + 0x2fc]
xor ebp, ebp
push 1
push eax
lea ecx, [esp + 0xcc]
mov dword [esp + 0x2f8], ebp
call fcn.0050f660
test al, al
jne 0x4e81db
mov ecx, dword [esp + 0x300]
mov edx, dword [0x5e062c]
push ecx
push str.A3DTexture::LoadDetailTexture____Can_not_init_the_file_to_be_a_fileimage___s__
push edx
call fcn.004c6d70
add esp, 0xc
mov dword [ebx + 0x32c], ebp
jmp 0x4e8608
lea ecx, [esp + 0x10]
lea edx, [esp + 0xa8]
push ecx
mov eax, dword [ebx + 0x110]
push ebp
push edx
or esi, 0xffffffff
mov ecx, dword [esp + 0x2f0]
push ebp
mov edx, dword [esp + 0x2ec]
mov eax, dword [eax + 0x20]
push esi
push esi
push 1
push ebp
push ebp
push 1
push esi
push esi
push ecx
push edx
push eax
call fcn.00527543
cmp eax, ebp
lea ecx, [esp + 0xc4]
je 0x4e8254
call fcn.0050f770
mov eax, dword [esp + 0x300]
mov ecx, dword [0x5e062c]
push eax
push str.A3DTexture::LoadDetailTexture___Cant_load__s_
push ecx
call fcn.004c6d70
add esp, 0xc
mov dword [ebx + 0x32c], ebp
mov dword [esp + 0x2f0], esi
jmp 0x4e8613
call fcn.0050f770
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x78]
push ecx
push ebp
mov edx, dword [eax]
push eax
call dword [edx + 0x38]
mov eax, dword [esp + 0x78]
cmp eax, 0x16
je 0x4e82aa
cmp eax, 0x17
je 0x4e82aa
cmp eax, 0x18
je 0x4e82aa
mov edx, dword [0x5e062c]
push str.A3DTexture::LoadDetailTexture____Texture_format_unsupported_
push edx
call fcn.004c6d70
add esp, 8
lea ecx, [esp + 0xc4]
mov dword [esp + 0x2f0], esi
call fcn.0050f380
xor al, al
jmp 0x4e8621
mov edi, dword [esp + 0x94]
mov esi, dword [esp + 0x90]
push edi
push esi
call fcn.004e7800
add esp, 8
cmp eax, 7
jle 0x4e82cc
mov eax, 7
push eax
push 0x16
push edi
push esi
mov ecx, ebx
mov dword [ebx + 0x118], eax
call fcn.004e7ee0
test al, al
jne 0x4e82f6
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push str.A3DTexture::LoadDetailTexture____Can_not_create_mip_map_chain_
jmp 0x4e864b
push edi
push esi
push ebp
lea eax, [esp + 0xa4]
push ebp
mov ebp, dword [sym.imp.USER32.dll_SetRect]
push eax
call ebp
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x98]
push 0
push edx
mov ecx, dword [eax]
lea edx, [esp + 0x78]
push edx
push 0
push eax
call dword [ecx + 0x40]
test eax, eax
jge 0x4e833d
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push str.A3DTexture::LoadDetailTexture____Lock_original_texture_fail_
jmp 0x4e864b
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x70]
push edi
push esi
push 0
lea edx, [esp + 0x58]
push 0
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x5c], ecx
call ebp
mov eax, dword [ebx + 0x118]
xor ebp, ebp
mov esi, 1
xor edi, edi
cmp eax, ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], edi
jle 0x4e85f3
jmp 0x4e837f
mov esi, dword [esp + 0x14]
mov eax, dword [ebx + 0x32c]
lea edx, [esp + 0x4c]
push ebp
push edx
mov ecx, dword [eax]
lea edx, [esp + 0x70]
push edx
push edi
push eax
call dword [ecx + 0x40]
test eax, eax
jl 0x4e863c
mov eax, dword [esp + 0x68]
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x54]
cmp eax, ebp
jle 0x4e85b2
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x58]
jmp 0x4e83cb
xor ebp, ebp
cmp ecx, ebp
mov dword [esp + 0x34], ebp
jle 0x4e8586
mov eax, esi
mov edx, dword [esp + 0x28]
imul eax, dword [esp + 0x48]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x64], eax
mov dword [esp + 0x18], edx
mov ecx, dword [ebx + 0x118]
mov edx, dword [esp + 0x30]
xor edi, edi
xor ebp, ebp
xor esi, esi
dec ecx
cmp edx, ecx
jne 0x4e8412
mov edx, dword [esp + 0x18]
mov dword [edx], 0xff808080
jmp 0x4e8551
mov ebx, dword [esp + 0x14]
test ebx, ebx
jle 0x4e851b
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ebx
jmp 0x4e8434
mov eax, dword [esp + 0x1c]
lea ecx, [eax*4]
add eax, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], ebx
mov ecx, dword [esp + 0x78]
sub ecx, 0x16
je 0x4e84be
dec ecx
je 0x4e848b
dec ecx
jne 0x4e84e5
mov ebx, dword [esp + 0x20]
lea ecx, [edx + eax]
mov cx, word [ecx + ebx]
and ecx, 0xffff
mov ebx, ecx
shr ebx, 7
and ebx, 0xf8
add edi, ebx
mov ebx, ecx
shr ebx, 2
and ebx, 0xf8
add ebp, ebx
and ecx, 0x1f
lea esi, [esi + ecx*8]
jmp 0x4e84e5
mov ebx, dword [esp + 0x20]
lea ecx, [edx + eax]
mov cx, word [ecx + ebx]
and ecx, 0xffff
mov ebx, ecx
shr ebx, 8
and ebx, 0x88
add edi, ebx
mov ebx, ecx
shr ebx, 2
and ebx, 0x1f8
add ebp, ebx
and ecx, 0x1f
lea esi, [esi + ecx*8]
jmp 0x4e84e5
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x20]
add ecx, edx
mov ecx, dword [ecx + ebx]
xor ebx, ebx
mov dword [esp + 0x44], ecx
mov bl, byte [esp + 0x46]
add edi, ebx
xor ebx, ebx
mov bl, ch
and ecx, 0xff
add ebp, ebx
add esi, ecx
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
add eax, 2
add ebx, 4
dec ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x38], ecx
jne 0x4e8445
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x14]
add edx, ecx
dec eax
mov dword [esp + 0x40], eax
jne 0x4e8430
imul ebx, dword [esp + 0x14]
mov eax, edi
cdq
idiv ebx
mov ecx, eax
mov eax, ebp
cdq
idiv ebx
or ecx, 0xffffff00
shl ecx, 8
mov edi, eax
mov eax, esi
cdq
idiv ebx
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x60]
or ecx, edi
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x64]
mov dword [edx], ecx
mov ecx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x24]
add ebp, ecx
mov ecx, dword [esp + 0x58]
inc edx
add edi, eax
cmp edx, ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x24], edi
jl 0x4e83ee
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x1c]
add edx, 4
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x54]
inc eax
add ebp, esi
cmp eax, edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x1c], ebp
jl 0x4e83c9
xor ebp, ebp
mov eax, dword [ebx + 0x32c]
push edi
push eax
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [esp + 0x54]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x58]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x58], eax
lea eax, [esi + esi]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x118]
inc edi
cmp edi, eax
mov dword [esp + 0x30], edi
jl 0x4e837b
mov eax, dword [esp + 0x10]
push ebp
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov dword [esp + 0x2f0], 0xffffffff
lea ecx, [esp + 0xc4]
call fcn.0050f380
mov al, 1
mov ecx, dword [esp + 0x2e8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2e4
ret 0xc
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push str.A3DTexture::LoadDetailTexture____Lock_mipmap_texture_fail_
mov edx, dword [0x5e062c]
push edx
call fcn.004c6d70
add esp, 8
lea ecx, [esp + 0xc4]
mov dword [esp + 0x2f0], 0xffffffff
call fcn.0050f380
xor al, al
jmp 0x4e8621