Function at 0x475fb0
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x48
cmp eax, 0xffffffff
push ebp
push esi
push edi
je 0x4766e1
mov esi, eax
shl esi, 4
add esi, eax
shl esi, 2
mov dword [esp + 0x50], esi
mov edi, dword [esi + 0x6b246c]
test edi, edi
je 0x4766e1
mov ebp, dword [edi - 8]
push str.Pointer_doesnt_point_to_a_texture_wibble_packet
cmp ebp, 6
sete al
push eax
call fcn.004015b0
mov eax, 0x3f800000
add esp, 8
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0xc], eax
mov eax, dword [edi]
test eax, eax
je 0x4766e1
push ebx
add eax, 0xfffffff4
xor edx, edx
mov ecx, 0x24
push str.PreProcessWibblyTextures__:_itemIndex_not_computed_correctly.
div ecx
test edx, edx
sete dl
push edx
call fcn.004015b0
mov ecx, dword [edi]
mov eax, 0x38e38e39
sub ecx, 0xc
mov ebp, dword [esi + 0x6b2450]
mul ecx
shr edx, 3
mov ecx, edx
add esp, 8
shl ecx, 6
add ecx, ebp
lea eax, [edi + 0x10]
xor edx, edx
mov dword [esp + 0x40], eax
test byte [ecx + 5], 0x80
mov dx, word [edi + 0xc]
je 0x476070
shl edx, 4
add edx, eax
mov edi, edx
jmp 0x4766d6
xor ebx, ebx
xor eax, eax
mov bl, byte [ecx + 0x1f]
mov ax, word [ecx + 0x1a]
mov ecx, ebx
xor ebp, ebp
shl ecx, 4
add ecx, ebx
mov ecx, dword [ecx*4 + 0x6b2454]
mov esi, dword [ecx + eax*4]
xor ecx, ecx
lea eax, [eax + eax*8]
mov cx, word [esi + 4]
mov bp, word [esi + 2]
add ecx, ebp
movsx ebp, word [edi + 4]
lea esi, [esi + ecx*8 + 0x1c]
mov ecx, dword [ebx*4 + 0x5f6764]
mov ebx, dword [ecx + eax*4 + 4]
lea eax, [ecx + eax*4]
movsx ecx, word [edi + 6]
mov dword [esp + 0x50], eax
mov eax, dword [0x65cfa4]
and eax, 0x3ff
inc eax
imul ecx, eax
imul ebp, eax
sar ecx, 4
mov dword [esp + 0x48], ecx
mov ecx, dword [edi + 8]
imul ecx, eax
sar ebp, 4
sar ecx, 0xa
test edx, edx
mov dword [esp + 0x44], ebp
mov dword [0x65f724], ecx
jle 0x4766ce
mov eax, dword [esp + 0x40]
mov dword [esp + 0x4c], edx
shl edx, 4
lea ecx, [eax + 7]
add ebx, 0x24
add eax, edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], eax
jmp 0x476112
mov ebp, dword [esp + 0x44]
mov dl, byte [esi]
push str.Wibbling_a_non_textured_face
and dl, 1
push edx
call fcn.004015b0
add esp, 8
test ebp, ebp
jne 0x476131
mov eax, dword [esp + 0x48]
test eax, eax
je 0x47613a
test byte [esi], 0x20
jne 0x47613a
xor eax, eax
jmp 0x47613f
mov eax, 1
push str.Scrolling_a_non_tiled_texture
push eax
call fcn.004015b0
mov eax, dword [esp + 0x58]
add esp, 8
mov ecx, dword [eax + 0xc]
test ch, 4
je 0x47619f
xor ecx, ecx
xor edx, edx
mov ch, byte [esi + 0x14]
mov dh, byte [esi + 0x15]
mov edi, ecx
mov dword [esp + 0x14], edx
xor eax, eax
xor ecx, ecx
mov ah, byte [esi + 0x16]
mov ch, byte [esi + 0x17]
xor edx, edx
mov dword [esp + 0x18], eax
mov dh, byte [esi + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
xor eax, eax
mov ah, byte [esi + 0x19]
xor ecx, ecx
mov ch, byte [esi + 0x1a]
xor edx, edx
mov dh, byte [esi + 0x1b]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
mov ebp, edx
jmp 0x476207
xor eax, eax
xor ebp, ebp
mov ax, word [esi + 0x14]
mov bp, word [esi + 0x22]
shl eax, 8
mov dword [esp + 0x3c], eax
xor eax, eax
mov ax, word [esi + 0x1c]
mov edi, dword [esp + 0x3c]
shl eax, 8
mov dword [esp + 0x14], eax
xor eax, eax
mov ax, word [esi + 0x16]
shl eax, 8
mov dword [esp + 0x18], eax
xor eax, eax
mov ax, word [esi + 0x1e]
shl eax, 8
mov dword [esp + 0x1c], eax
xor eax, eax
mov ax, word [esi + 0x18]
shl eax, 8
mov dword [esp + 0x20], eax
xor eax, eax
mov ax, word [esi + 0x20]
shl eax, 8
mov dword [esp + 0x24], eax
xor eax, eax
mov ax, word [esi + 0x1a]
shl eax, 8
mov dword [esp + 0x28], eax
shl ebp, 8
mov eax, dword [esp + 0x44]
test eax, eax
je 0x476231
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
add eax, eax
add ecx, eax
add edi, eax
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x28]
add edx, eax
add ecx, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x48]
test eax, eax
je 0x47625b
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
add eax, eax
add edx, eax
add ecx, eax
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x24]
add edx, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edx
add ebp, eax
mov eax, dword [esp + 0x38]
mov edx, dword [0x65f724]
xor ecx, ecx
mov cl, byte [eax - 5]
mov eax, ecx
shr eax, 4
je 0x476289
and ecx, 0xf
shl eax, 6
lea ecx, [edx + ecx*4]
and ecx, 0x3f
add ecx, eax
movsx eax, word [ecx*2 + 0x660748]
jmp 0x47628b
xor eax, eax
add edi, eax
xor ecx, ecx
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x38]
mov cl, byte [edi - 4]
mov eax, ecx
shr eax, 4
je 0x4762b9
and ecx, 0xf
shl eax, 6
lea ecx, [edx + ecx*4]
and ecx, 0x3f
add ecx, eax
movsx eax, word [ecx*2 + 0x660748]
jmp 0x4762bb
xor eax, eax
mov ecx, dword [esp + 0x14]
add ecx, eax
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov cl, byte [edi - 1]
mov eax, ecx
shr eax, 4
je 0x4762e9
and ecx, 0xf
shl eax, 6
lea ecx, [edx + ecx*4]
and ecx, 0x3f
add ecx, eax
movsx eax, word [ecx*2 + 0x660748]
jmp 0x4762eb
xor eax, eax
mov ecx, dword [esp + 0x18]
add ecx, eax
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov cl, byte [edi]
mov eax, ecx
shr eax, 4
je 0x476318
and ecx, 0xf
shl eax, 6
lea ecx, [edx + ecx*4]
and ecx, 0x3f
add ecx, eax
movsx eax, word [ecx*2 + 0x660748]
jmp 0x47631a
xor eax, eax
mov ecx, dword [esp + 0x1c]
add ecx, eax
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov cl, byte [edi + 3]
mov eax, ecx
shr eax, 4
je 0x476348
and ecx, 0xf
shl eax, 6
lea ecx, [edx + ecx*4]
and ecx, 0x3f
add ecx, eax
movsx eax, word [ecx*2 + 0x660748]
jmp 0x47634a
xor eax, eax
mov ecx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov cl, byte [edi + 4]
mov eax, ecx
shr eax, 4
je 0x476378
and ecx, 0xf
shl eax, 6
lea ecx, [edx + ecx*4]
and ecx, 0x3f
add ecx, eax
movsx eax, word [ecx*2 + 0x660748]
jmp 0x47637a
xor eax, eax
mov ecx, dword [esp + 0x24]
add ecx, eax
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov cl, byte [edi + 7]
mov eax, ecx
shr eax, 4
je 0x4763a8
and ecx, 0xf
shl eax, 6
lea ecx, [edx + ecx*4]
and ecx, 0x3f
add ecx, eax
movsx eax, word [ecx*2 + 0x660748]
jmp 0x4763aa
xor eax, eax
mov ecx, dword [esp + 0x28]
add ecx, eax
mov dword [esp + 0x28], ecx
xor ecx, ecx
mov cl, byte [edi + 8]
mov eax, ecx
shr eax, 4
je 0x4763d8
and ecx, 0xf
shl eax, 6
lea edx, [edx + ecx*4]
and edx, 0x3f
add edx, eax
movsx eax, word [edx*2 + 0x660748]
jmp 0x4763da
xor eax, eax
mov edi, dword [esi + 0x10]
add ebp, eax
test edi, edi
setne al
push str.No_Texture_data
push eax
call fcn.004015b0
add esp, 8
test edi, edi
je 0x47659e
mov edi, dword [edi + 0x1c]
push str.Texture_has_no_pVRAMRect_info
test edi, edi
setne cl
push ecx
call fcn.004015b0
mov ecx, dword [edi + 4]
push str.pVRAMRect_info_has_no_pack_info
test ecx, ecx
setne dl
push edx
call fcn.004015b0
mov al, byte [edi]
add esp, 0x10
test al, 8
je 0x47647b
mov edi, dword [edi + 4]
xor edx, edx
mov al, byte [edi]
mov cl, byte [edi + 2]
and eax, 0x7f
mov dx, word [edi + 4]
shl eax, 1
mov dword [esp + 0x5c], eax
and ecx, 0xff
fild dword [esp + 0x5c]
mov dword [esp + 0x34], ecx
shl edx, 1
fstp dword [esp + 0x5c]
fild dword [esp + 0x34]
mov dword [esp + 0x34], edx
xor eax, eax
mov ax, word [edi + 6]
fstp dword [esp + 0x10]
fild dword [esp + 0x34]
mov dword [esp + 0x34], eax
fstp dword [esp + 0x30]
fild dword [esp + 0x34]
jmp 0x47652e
test al, 0x10
je 0x4764cd
mov edi, dword [edi + 4]
xor eax, eax
mov cl, byte [edi]
mov dl, byte [edi + 2]
and ecx, 0xff
mov ax, word [edi + 4]
mov dword [esp + 0x5c], ecx
and edx, 0xff
fild dword [esp + 0x5c]
mov dword [esp + 0x34], edx
xor ecx, ecx
mov cx, word [edi + 6]
fstp dword [esp + 0x5c]
fild dword [esp + 0x34]
mov dword [esp + 0x34], eax
fstp dword [esp + 0x10]
fild dword [esp + 0x34]
mov dword [esp + 0x34], ecx
fstp dword [esp + 0x30]
fild dword [esp + 0x34]
jmp 0x47652e
shr al, 2
and al, 1
push str.Unexpected_Texture_bit_depth
push eax
call fcn.004015b0
mov edi, dword [edi + 4]
xor ecx, ecx
add esp, 8
mov dl, byte [edi]
mov al, byte [edi + 2]
and edx, 0x3f
mov cx, word [edi + 4]
shl edx, 2
mov dword [esp + 0x5c], edx
and eax, 0xff
fild dword [esp + 0x5c]
mov dword [esp + 0x34], eax
shl ecx, 2
fstp dword [esp + 0x5c]
fild dword [esp + 0x34]
mov dword [esp + 0x34], ecx
xor edx, edx
mov dx, word [edi + 6]
fstp dword [esp + 0x10]
fild dword [esp + 0x34]
mov dword [esp + 0x34], edx
fstp dword [esp + 0x30]
fild dword [esp + 0x34]
fstp dword [esp + 0x34]
fld dword [esp + 0x30]
fcomp qword [0x53b6f8]
fnstsw ax
test ah, 0x40
jne 0x47654a
mov eax, 1
jmp 0x47654c
xor eax, eax
push str.Zero_Tex_Width
push eax
call fcn.004015b0
fld dword [esp + 0x3c]
fcomp qword [0x53b6f8]
add esp, 8
fnstsw ax
test ah, 0x40
jne 0x476572
mov eax, 1
jmp 0x476574
xor eax, eax
push str.Zero_Tex_Height
push eax
call fcn.004015b0
fld dword [0x53b27c]
fdiv dword [esp + 0x38]
add esp, 8
fstp dword [esp + 0x2c]
fld dword [0x53b27c]
fdiv dword [esp + 0x34]
fstp dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
sar eax, 8
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x14]
fild dword [esp + 0x3c]
sar eax, 8
sar ebp, 8
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x5c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
sar eax, 8
fmul dword [esp + 0x2c]
fstp dword [ebx - 0x10]
fild dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x1c]
sar eax, 8
fmul dword [esp + 0x30]
fstp dword [ebx]
fild dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x5c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
sar eax, 8
fmul dword [esp + 0x2c]
fstp dword [ebx - 0xc]
fild dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x24]
sar eax, 8
fmul dword [esp + 0x30]
fstp dword [ebx + 4]
fild dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x5c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x28]
sar eax, 8
fmul dword [esp + 0x2c]
add ebx, 0x38
fstp dword [ebx - 0x40]
fild dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x10]
mov dword [esp + 0x3c], eax
fmul dword [esp + 0x30]
fstp dword [ebx - 0x30]
fild dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x5c]
mov dword [esp + 0x3c], ebp
fmul dword [esp + 0x2c]
fstp dword [ebx - 0x3c]
fild dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fsub dword [esp + 0x10]
fmul dword [esp + 0x30]
fstp dword [ebx - 0x2c]
mov eax, dword [esi]
mov ecx, dword [esp + 0x38]
shr eax, 0x12
add ecx, 0x10
lea esi, [esi + eax*4]
mov eax, dword [esp + 0x4c]
dec eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x4c], eax
jne 0x47610e
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x54]
mov eax, dword [edi]
test eax, eax
jne 0x476016
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret