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

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x34]
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0x14], edx
xor ebp, ebp
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebx
cmp dword [edi + 0x2c], 1
mov eax, dword [edi + 0x10]
jne 0x1005ca85
test eax, eax
je 0x1005cc2f
mov ecx, dword [esp + 0x2c]
xor eax, eax
mov dword [esp + 0x34], eax
test ecx, ecx
je 0x1005cc49
mov esi, dword [esp + 0x30]
xor edx, edx
test esi, esi
je 0x1005ca6a
mov ecx, dword [esp + 0x14]
nop
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax + ebp]
cmp eax, dword [edi + 0x1c]
ja 0x1005ca7b
cmp dword [esp + 0x3c], 0
je 0x1005ca48
test eax, eax
je 0x1005ca58
mov ecx, dword [esp + 0x40]
add ecx, eax
mov eax, dword [edi + 0x24]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x14]
mov dword [ecx + ebx*4], eax
inc edx
inc ebx
inc ebp
cmp edx, esi
jb 0x1005ca30
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x34], eax
cmp eax, ecx
jb 0x1005ca24
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push str.texture_conversion_error_n
jmp 0x1005cc34
test eax, eax
jne 0x1005cc2f
xor ecx, ecx
mov dword [esp + 0x20], ecx
cmp dword [esp + 0x2c], ecx
je 0x1005cc49
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
nop word [eax + eax]
mov dword [esp + 0x34], 0
test eax, eax
je 0x1005cc1a
mov edx, dword [esp + 0x18]
mov ecx, dword [edi + 0x2c]
mov eax, ecx
sub eax, 2
je 0x1005caff
sub eax, 1
je 0x1005cae1
sub eax, 1
jne 0x1005cc2f
mov esi, dword [esi + ebp]
jmp 0x1005cb03
mov ebx, dword [esp + 0x1c]
movzx esi, byte [esi + ebp + 2]
shl esi, 8
movzx eax, byte [ebx + ebp + 1]
or esi, eax
movzx eax, byte [ebx + ebp]
shl esi, 8
or esi, eax
jmp 0x1005cb03
movzx esi, word [esi + ebp]
add ebp, ecx
cmp dword [esp + 0x3c], 0
je 0x1005cb1c
mov eax, dword [edi + 0x4c]
not eax
test esi, eax
jne 0x1005cb1c
xor ebx, ebx
jmp 0x1005cbed
mov ebx, dword [edi + 0x78]
test ebx, ebx
je 0x1005cb3b
mov eax, dword [edi + 0x48]
xor edx, edx
mov ecx, dword [edi + 0x58]
and eax, esi
shr eax, cl
imul eax, eax, 0xff
div ebx
mov ebx, eax
jmp 0x1005cb3d
xor ebx, ebx
cmp dword [edi + 0x74], 0
jbe 0x1005cb5a
mov eax, dword [edi + 0x44]
xor edx, edx
mov ecx, dword [edi + 0x54]
and eax, esi
shr eax, cl
imul eax, eax, 0xff
div dword [edi + 0x74]
jmp 0x1005cb5c
xor eax, eax
shl eax, 8
or ebx, eax
mov dword [esp + 0x24], ebx
mov ebx, dword [edi + 0x70]
test ebx, ebx
je 0x1005cb84
mov eax, dword [edi + 0x40]
xor edx, edx
mov ecx, dword [edi + 0x50]
and eax, esi
shr eax, cl
imul eax, eax, 0xff
div ebx
mov ebx, eax
jmp 0x1005cb86
xor ebx, ebx
shl ebx, 0x10
or ebx, dword [esp + 0x24]
cmp dword [esp + 0x38], 0
je 0x1005cbc0
cmp esi, 0x8000
je 0x1005cbc0
cmp dword [edi + 0x7c], 0
jbe 0x1005cbdf
mov eax, dword [edi + 0x4c]
xor edx, edx
mov ecx, dword [edi + 0x5c]
and eax, esi
shr eax, cl
mov ecx, 0xff
imul eax, eax, 0xff
div dword [edi + 0x7c]
sub ecx, eax
jmp 0x1005cbe4
cmp dword [edi + 0x7c], 0
jbe 0x1005cbdf
mov eax, dword [edi + 0x4c]
xor edx, edx
mov ecx, dword [edi + 0x5c]
and eax, esi
shr eax, cl
imul eax, eax, 0xff
div dword [edi + 0x7c]
mov ecx, eax
jmp 0x1005cbe4
mov ecx, 0xff
mov edx, dword [esp + 0x18]
shl ecx, 0x18
or ebx, ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x1c]
mov dword [ecx + edx*4], ebx
inc edx
mov ebx, dword [esp + 0x34]
inc ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x34], ebx
cmp ebx, eax
jb 0x1005cac4
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, edx
jb 0x1005cab0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push str.unsupported_texture_format_n
push dword [0x104072b8]
push 0
push str.GLITCH
call fcn.10067cf0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret