Function at 0x405bb5
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa6c
push esi
mov dword [ebp - 0x5d0], 0
push 0x432c9c
mov eax, dword [ebp + 0xc]
push eax
call fcn.004240b4
add esp, 8
mov dword [ebp - 0x9d8], eax
cmp dword [ebp - 0x9d8], 0
jne 0x405bfd
push str.Cannot_find__n
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
lea ecx, [ebp - 0x5c0]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0xd4]
push eax
mov ecx, dword [ebp - 0x9d8]
push ecx
call fcn.00406ba4
add esp, 0x10
test eax, eax
jne 0x405c45
mov edx, dword [ebp - 0x9d8]
push edx
call fcn.00423dd0
add esp, 4
push str.Could_not_load_or_parse_PPM_header_in_._n
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
mov eax, dword [ebp - 0x5c0]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0xd4]
push edx
push str.PPM_loader_::_Width__d_Height__d__i__d_n
lea eax, [ebp - 0xd0]
push eax
call fcn.00424218
add esp, 0x14
lea ecx, [ebp - 0xd0]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x6c
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x5bc]
push eax
call fcn.00424270
add esp, 0xc
mov ecx, dword [ebp - 0x570]
and ecx, 0x20
test ecx, ecx
je 0x405cba
mov dword [ebp - 0x5d0], 1
mov dword [ebp - 0x550], 0x100
mov dword [ebp - 0x54c], 0x44
jmp 0x405ce5
mov edx, dword [ebp - 0x570]
and edx, 8
test edx, edx
je 0x405ce5
mov dword [ebp - 0x5d0], 1
mov dword [ebp - 0x550], 0x10
mov dword [ebp - 0x54c], 1
push 0x6c
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x144]
push ecx
call fcn.00424270
add esp, 0xc
mov dword [ebp - 0x144], 0x6c
mov dword [ebp - 0x140], 0x1007
mov edx, dword [ebp + 0x14]
or dh, 0x10
mov dword [ebp - 0xdc], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x13c], eax
mov ecx, dword [ebp - 0xd4]
mov dword [ebp - 0x138], ecx
push 0
lea edx, [ebp - 0x5cc]
push edx
lea eax, [ebp - 0x144]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
push eax
call dword [edx + 0x18]
mov dword [ebp - 0x5c8], eax
cmp dword [ebp - 0x5c8], 0
je 0x405d71
push str.CreateSurface_for_texture_failed__loadtex_._n
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
push 0x6c
push 0
lea ecx, [ebp - 0x144]
push ecx
call fcn.004241c0
add esp, 0xc
mov dword [ebp - 0x144], 0x6c
push 0
push 0
lea edx, [ebp - 0x144]
push edx
push 0
mov eax, dword [ebp - 0x5cc]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x5cc]
push edx
call dword [ecx + 0x64]
mov dword [ebp - 0x5c8], eax
cmp dword [ebp - 0x5c8], 0
je 0x405de2
mov eax, dword [ebp - 0x5cc]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x5cc]
push edx
call dword [ecx + 8]
push str.Lock_failed_while_loading_surface__loadtex_._n
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
cmp dword [ebp - 0x5d0], 0
jne 0x406651
mov dword [ebp - 0x9e0], 0
mov eax, dword [ebp - 0x564]
mov dword [ebp - 0xa00], eax
jmp 0x405e24
mov ecx, dword [ebp - 0x9e0]
add ecx, 1
mov dword [ebp - 0x9e0], ecx
mov edx, dword [ebp - 0xa00]
shr edx, 1
mov dword [ebp - 0xa00], edx
mov eax, dword [ebp - 0xa00]
and eax, 1
test eax, eax
jne 0x405e33
jmp 0x405e07
mov ecx, dword [ebp - 0x9e0]
mov dword [ebp - 0x9fc], ecx
mov esi, dword [ebp - 0x564]
mov ecx, dword [ebp - 0x9e0]
shr esi, cl
mov eax, 0xff
xor edx, edx
div esi
mov dword [ebp - 0xa04], eax
mov dword [ebp - 0x9e0], 0
mov edx, dword [ebp - 0x560]
mov dword [ebp - 0xa00], edx
jmp 0x405e91
mov eax, dword [ebp - 0x9e0]
add eax, 1
mov dword [ebp - 0x9e0], eax
mov ecx, dword [ebp - 0xa00]
shr ecx, 1
mov dword [ebp - 0xa00], ecx
mov edx, dword [ebp - 0xa00]
and edx, 1
test edx, edx
jne 0x405ea0
jmp 0x405e74
mov eax, dword [ebp - 0x9e0]
mov dword [ebp - 0x9f4], eax
mov esi, dword [ebp - 0x560]
mov ecx, dword [ebp - 0x9e0]
shr esi, cl
mov eax, 0xff
xor edx, edx
div esi
mov dword [ebp - 0x9dc], eax
mov dword [ebp - 0x9e0], 0
mov ecx, dword [ebp - 0x55c]
mov dword [ebp - 0xa00], ecx
jmp 0x405efe
mov edx, dword [ebp - 0x9e0]
add edx, 1
mov dword [ebp - 0x9e0], edx
mov eax, dword [ebp - 0xa00]
shr eax, 1
mov dword [ebp - 0xa00], eax
mov ecx, dword [ebp - 0xa00]
and ecx, 1
test ecx, ecx
jne 0x405f0d
jmp 0x405ee1
mov edx, dword [ebp - 0x9e0]
mov dword [ebp - 0x9ec], edx
mov esi, dword [ebp - 0x55c]
mov ecx, dword [ebp - 0x9e0]
shr esi, cl
mov eax, 0xff
xor edx, edx
div esi
mov dword [ebp - 0x9f8], eax
mov eax, dword [ebp - 0x568]
mov dword [ebp - 0xa3c], eax
cmp dword [ebp - 0xa3c], 8
je 0x4063b3
cmp dword [ebp - 0xa3c], 0x10
je 0x40618e
cmp dword [ebp - 0xa3c], 0x20
je 0x405f6a
jmp 0x4065d4
mov dword [ebp - 0x5c4], 0
jmp 0x405f85
mov ecx, dword [ebp - 0x5c4]
add ecx, 1
mov dword [ebp - 0x5c4], ecx
mov edx, dword [ebp - 0x5c4]
cmp edx, dword [ebp - 8]
jge 0x406189
mov eax, dword [ebp - 0x134]
imul eax, dword [ebp - 0x5c4]
mov ecx, dword [ebp - 0x120]
add ecx, eax
mov dword [ebp - 0x9f0], ecx
mov dword [ebp - 0x5c0], 0
jmp 0x405fca
mov edx, dword [ebp - 0x5c0]
add edx, 1
mov dword [ebp - 0x5c0], edx
mov eax, dword [ebp - 0x5c0]
cmp eax, dword [ebp - 0xd4]
jge 0x406184
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx + 4]
sub edx, 1
mov eax, dword [ebp - 0x9d8]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x9d8]
cmp dword [ecx + 4], 0
jl 0x406029
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx]
movsx ecx, byte [eax]
and ecx, 0xff
mov dword [ebp - 0xa40], ecx
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx], eax
jmp 0x40603e
mov edx, dword [ebp - 0x9d8]
push edx
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa40], eax
mov eax, dword [ebp - 0xa40]
cdq
idiv dword [ebp - 0xa04]
mov dword [ebp - 0xa0c], eax
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax + 4]
sub ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x9d8]
cmp dword [eax + 4], 0
jl 0x40609d
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx]
movsx eax, byte [edx]
and eax, 0xff
mov dword [ebp - 0xa44], eax
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx]
add edx, 1
mov eax, dword [ebp - 0x9d8]
mov dword [eax], edx
jmp 0x4060b2
mov ecx, dword [ebp - 0x9d8]
push ecx
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa44], eax
mov eax, dword [ebp - 0xa44]
cdq
idiv dword [ebp - 0x9dc]
mov dword [ebp - 0xa10], eax
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx + 4]
sub eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x9d8]
cmp dword [edx + 4], 0
jl 0x406112
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
movsx edx, byte [ecx]
and edx, 0xff
mov dword [ebp - 0xa48], edx
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx], ecx
jmp 0x406127
mov eax, dword [ebp - 0x9d8]
push eax
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa48], eax
mov eax, dword [ebp - 0xa48]
cdq
idiv dword [ebp - 0x9f8]
mov dword [ebp - 0xa08], eax
mov edx, dword [ebp - 0xa0c]
mov ecx, dword [ebp - 0x9fc]
shl edx, cl
mov eax, dword [ebp - 0xa10]
mov ecx, dword [ebp - 0x9f4]
shl eax, cl
or edx, eax
mov eax, dword [ebp - 0xa08]
mov ecx, dword [ebp - 0x9ec]
shl eax, cl
or edx, eax
mov ecx, dword [ebp - 0x9f0]
mov dword [ecx], edx
mov edx, dword [ebp - 0x9f0]
add edx, 4
mov dword [ebp - 0x9f0], edx
jmp 0x405fbb
jmp 0x405f76
jmp 0x406620
mov dword [ebp - 0x5c4], 0
jmp 0x4061a9
mov eax, dword [ebp - 0x5c4]
add eax, 1
mov dword [ebp - 0x5c4], eax
mov ecx, dword [ebp - 0x5c4]
cmp ecx, dword [ebp - 8]
jge 0x4063ae
mov edx, dword [ebp - 0x134]
imul edx, dword [ebp - 0x5c4]
mov eax, dword [ebp - 0x120]
add eax, edx
mov dword [ebp - 0x9e8], eax
mov dword [ebp - 0x5c0], 0
jmp 0x4061ee
mov ecx, dword [ebp - 0x5c0]
add ecx, 1
mov dword [ebp - 0x5c0], ecx
mov edx, dword [ebp - 0x5c0]
cmp edx, dword [ebp - 0xd4]
jge 0x4063a9
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax + 4]
sub ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x9d8]
cmp dword [eax + 4], 0
jl 0x40624c
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx]
movsx eax, byte [edx]
and eax, 0xff
mov dword [ebp - 0xa4c], eax
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx]
add edx, 1
mov eax, dword [ebp - 0x9d8]
mov dword [eax], edx
jmp 0x406261
mov ecx, dword [ebp - 0x9d8]
push ecx
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa4c], eax
mov eax, dword [ebp - 0xa4c]
cdq
idiv dword [ebp - 0xa04]
mov dword [ebp - 0xa18], eax
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx + 4]
sub eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x9d8]
cmp dword [edx + 4], 0
jl 0x4062c1
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
movsx edx, byte [ecx]
and edx, 0xff
mov dword [ebp - 0xa50], edx
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx], ecx
jmp 0x4062d6
mov eax, dword [ebp - 0x9d8]
push eax
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa50], eax
mov eax, dword [ebp - 0xa50]
cdq
idiv dword [ebp - 0x9dc]
mov dword [ebp - 0xa1c], eax
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx + 4]
sub edx, 1
mov eax, dword [ebp - 0x9d8]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x9d8]
cmp dword [ecx + 4], 0
jl 0x406336
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx]
movsx ecx, byte [eax]
and ecx, 0xff
mov dword [ebp - 0xa54], ecx
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx], eax
jmp 0x40634b
mov edx, dword [ebp - 0x9d8]
push edx
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa54], eax
mov eax, dword [ebp - 0xa54]
cdq
idiv dword [ebp - 0x9f8]
mov dword [ebp - 0xa14], eax
mov eax, dword [ebp - 0xa18]
mov ecx, dword [ebp - 0x9fc]
shl eax, cl
mov edx, dword [ebp - 0xa1c]
mov ecx, dword [ebp - 0x9f4]
shl edx, cl
or eax, edx
mov edx, dword [ebp - 0xa14]
mov ecx, dword [ebp - 0x9ec]
shl edx, cl
or eax, edx
mov ecx, dword [ebp - 0x9e8]
mov word [ecx], ax
mov edx, dword [ebp - 0x9e8]
add edx, 2
mov dword [ebp - 0x9e8], edx
jmp 0x4061df
jmp 0x40619a
jmp 0x406620
mov dword [ebp - 0x5c4], 0
jmp 0x4063ce
mov eax, dword [ebp - 0x5c4]
add eax, 1
mov dword [ebp - 0x5c4], eax
mov ecx, dword [ebp - 0x5c4]
cmp ecx, dword [ebp - 8]
jge 0x4065d2
mov edx, dword [ebp - 0x134]
imul edx, dword [ebp - 0x5c4]
mov eax, dword [ebp - 0x120]
add eax, edx
mov dword [ebp - 0x9e4], eax
mov dword [ebp - 0x5c0], 0
jmp 0x406413
mov ecx, dword [ebp - 0x5c0]
add ecx, 1
mov dword [ebp - 0x5c0], ecx
mov edx, dword [ebp - 0x5c0]
cmp edx, dword [ebp - 0xd4]
jge 0x4065cd
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax + 4]
sub ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x9d8]
cmp dword [eax + 4], 0
jl 0x406471
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx]
movsx eax, byte [edx]
and eax, 0xff
mov dword [ebp - 0xa58], eax
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx]
add edx, 1
mov eax, dword [ebp - 0x9d8]
mov dword [eax], edx
jmp 0x406486
mov ecx, dword [ebp - 0x9d8]
push ecx
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa58], eax
mov eax, dword [ebp - 0xa58]
cdq
idiv dword [ebp - 0xa04]
mov dword [ebp - 0xa24], eax
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx + 4]
sub eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x9d8]
cmp dword [edx + 4], 0
jl 0x4064e6
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
movsx edx, byte [ecx]
and edx, 0xff
mov dword [ebp - 0xa5c], edx
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx], ecx
jmp 0x4064fb
mov eax, dword [ebp - 0x9d8]
push eax
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa5c], eax
mov eax, dword [ebp - 0xa5c]
cdq
idiv dword [ebp - 0x9dc]
mov dword [ebp - 0xa28], eax
mov ecx, dword [ebp - 0x9d8]
mov edx, dword [ecx + 4]
sub edx, 1
mov eax, dword [ebp - 0x9d8]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x9d8]
cmp dword [ecx + 4], 0
jl 0x40655b
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx]
movsx ecx, byte [eax]
and ecx, 0xff
mov dword [ebp - 0xa60], ecx
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx], eax
jmp 0x406570
mov edx, dword [ebp - 0x9d8]
push edx
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa60], eax
mov eax, dword [ebp - 0xa60]
cdq
idiv dword [ebp - 0x9f8]
mov dword [ebp - 0xa20], eax
mov eax, dword [ebp - 0xa24]
mov ecx, dword [ebp - 0x9fc]
shl eax, cl
mov edx, dword [ebp - 0xa28]
mov ecx, dword [ebp - 0x9f4]
shl edx, cl
or eax, edx
mov edx, dword [ebp - 0xa20]
mov ecx, dword [ebp - 0x9ec]
shl edx, cl
or eax, edx
mov ecx, dword [ebp - 0x9e4]
mov byte [ecx], al
mov edx, dword [ebp - 0x9e4]
add edx, 1
mov dword [ebp - 0x9e4], edx
jmp 0x406404
jmp 0x4063bf
jmp 0x406620
push 0
mov eax, dword [ebp - 0x5cc]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x5cc]
push edx
call dword [ecx + 0x80]
mov eax, dword [ebp - 0x9d8]
push eax
call fcn.00423dd0
add esp, 4
mov ecx, dword [ebp - 0x5cc]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x5cc]
push eax
call dword [edx + 8]
push str.Unknown_pixel_format__loadtex_.
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
push 0
mov ecx, dword [ebp - 0x5cc]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x5cc]
push eax
call dword [edx + 0x80]
mov ecx, dword [ebp - 0x9d8]
push ecx
call fcn.00423dd0
add esp, 4
mov eax, dword [ebp - 0x5cc]
jmp 0x406b48
mov dword [ebp - 4], 0
mov dword [ebp - 0x5c4], 0
jmp 0x406673
mov edx, dword [ebp - 0x5c4]
add edx, 1
mov dword [ebp - 0x5c4], edx
mov eax, dword [ebp - 0x5c4]
cmp eax, dword [ebp - 8]
jge 0x406939
mov ecx, dword [ebp - 0x134]
imul ecx, dword [ebp - 0x5c4]
mov edx, dword [ebp - 0x120]
add edx, ecx
mov dword [ebp - 0x5d4], edx
mov dword [ebp - 0x5c0], 0
jmp 0x4066b8
mov eax, dword [ebp - 0x5c0]
add eax, 1
mov dword [ebp - 0x5c0], eax
mov ecx, dword [ebp - 0x5c0]
cmp ecx, dword [ebp - 0xd4]
jge 0x406934
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx + 4]
sub eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x9d8]
cmp dword [edx + 4], 0
jl 0x406717
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
movsx edx, byte [ecx]
and edx, 0xff
mov dword [ebp - 0xa64], edx
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx], ecx
jmp 0x40672c
mov eax, dword [ebp - 0x9d8]
push eax
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa64], eax
mov ecx, dword [ebp - 0xa64]
mov dword [ebp - 0xa30], ecx
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx + 4]
sub eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x9d8]
cmp dword [edx + 4], 0
jl 0x406785
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
movsx edx, byte [ecx]
and edx, 0xff
mov dword [ebp - 0xa68], edx
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx], ecx
jmp 0x40679a
mov eax, dword [ebp - 0x9d8]
push eax
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa68], eax
mov ecx, dword [ebp - 0xa68]
mov dword [ebp - 0xa34], ecx
mov edx, dword [ebp - 0x9d8]
mov eax, dword [edx + 4]
sub eax, 1
mov ecx, dword [ebp - 0x9d8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x9d8]
cmp dword [edx + 4], 0
jl 0x4067f3
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
movsx edx, byte [ecx]
and edx, 0xff
mov dword [ebp - 0xa6c], edx
mov eax, dword [ebp - 0x9d8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0x9d8]
mov dword [edx], ecx
jmp 0x406808
mov eax, dword [ebp - 0x9d8]
push eax
call fcn.00424669
add esp, 4
mov dword [ebp - 0xa6c], eax
mov ecx, dword [ebp - 0xa6c]
mov dword [ebp - 0xa2c], ecx
mov edx, dword [ebp - 0xa30]
shl edx, 0x10
mov eax, dword [ebp - 0xa34]
shl eax, 8
or edx, eax
or edx, dword [ebp - 0xa2c]
mov dword [ebp - 0xd8], edx
mov dword [ebp - 0xa38], 0
jmp 0x40684f
mov ecx, dword [ebp - 0xa38]
add ecx, 1
mov dword [ebp - 0xa38], ecx
mov edx, dword [ebp - 0xa38]
cmp edx, dword [ebp - 4]
jge 0x406873
mov eax, dword [ebp - 0xa38]
mov ecx, dword [ebp - 0xd8]
cmp ecx, dword [ebp + eax*4 - 0x9d4]
jne 0x406871
jmp 0x406873
jmp 0x406840
mov edx, dword [ebp - 0xa38]
cmp edx, dword [ebp - 4]
jne 0x4068ba
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x550]
jle 0x4068a7
mov edx, dword [ebp - 4]
sub edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 0xa38], eax
mov ecx, dword [ebp - 0xa38]
mov edx, dword [ebp - 0xd8]
mov dword [ebp + ecx*4 - 0x9d4], edx
cmp dword [ebp - 0x550], 0x10
jne 0x406912
mov eax, dword [ebp - 0x5c0]
and eax, 1
test eax, eax
jne 0x4068e3
mov ecx, dword [ebp - 0xa38]
and ecx, 0xf
mov edx, dword [ebp - 0x5d4]
mov byte [edx], cl
jmp 0x406910
mov eax, dword [ebp - 0xa38]
and eax, 0xf
shl eax, 4
mov ecx, dword [ebp - 0x5d4]
mov dl, byte [ecx]
or dl, al
mov eax, dword [ebp - 0x5d4]
mov byte [eax], dl
mov ecx, dword [ebp - 0x5d4]
add ecx, 1
mov dword [ebp - 0x5d4], ecx
jmp 0x40692f
mov edx, dword [ebp - 0x5d4]
mov al, byte [ebp - 0xa38]
mov byte [edx], al
mov ecx, dword [ebp - 0x5d4]
add ecx, 1
mov dword [ebp - 0x5d4], ecx
jmp 0x4066a9
jmp 0x406664
mov edx, dword [ebp - 0x9d8]
push edx
call fcn.00423dd0
add esp, 4
push 0
mov eax, dword [ebp - 0x5cc]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x5cc]
push edx
call dword [ecx + 0x80]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x550]
jle 0x4069a7
push 0
mov ecx, dword [ebp - 0x5cc]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x5cc]
push eax
call dword [edx + 0x80]
mov ecx, dword [ebp - 0x5cc]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x5cc]
push eax
call dword [edx + 8]
push str.Palette_burst.__loadtex_._n
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
push 0x400
push 0
lea ecx, [ebp - 0x544]
push ecx
call fcn.004241c0
add esp, 0xc
mov dword [ebp - 0x5c0], 0
jmp 0x4069d8
mov edx, dword [ebp - 0x5c0]
add edx, 1
mov dword [ebp - 0x5c0], edx
mov eax, dword [ebp - 0x5c0]
cmp eax, dword [ebp - 4]
jge 0x406a4e
mov ecx, dword [ebp - 0x5c0]
mov edx, dword [ebp + ecx*4 - 0x9d4]
shr edx, 0x10
and edx, 0xff
mov eax, dword [ebp - 0x5c0]
mov byte [ebp + eax*4 - 0x544], dl
mov ecx, dword [ebp - 0x5c0]
mov edx, dword [ebp + ecx*4 - 0x9d4]
shr edx, 8
and edx, 0xff
mov eax, dword [ebp - 0x5c0]
mov byte [ebp + eax*4 - 0x543], dl
mov ecx, dword [ebp - 0x5c0]
mov edx, dword [ebp + ecx*4 - 0x9d4]
and edx, 0xff
mov eax, dword [ebp - 0x5c0]
mov byte [ebp + eax*4 - 0x542], dl
jmp 0x4069c9
jmp 0x406a5f
mov ecx, dword [ebp - 0x5c0]
add ecx, 1
mov dword [ebp - 0x5c0], ecx
cmp dword [ebp - 0x5c0], 0x100
jge 0x406a7b
mov edx, dword [ebp - 0x5c0]
mov byte [ebp + edx*4 - 0x541], 0x80
jmp 0x406a50
push 0
lea eax, [ebp - 0x548]
push eax
lea ecx, [ebp - 0x544]
push ecx
mov edx, dword [ebp - 0x54c]
or edx, 8
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
push edx
call dword [ecx + 0x14]
mov dword [ebp - 0x5c8], eax
cmp dword [ebp - 0x5c8], 0
je 0x406ad3
mov eax, dword [ebp - 0x5cc]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x5cc]
push edx
call dword [ecx + 8]
push str.Create_palette_failed_while_loading_surface__loadtex_._n
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
mov eax, dword [ebp - 0x548]
push eax
mov ecx, dword [ebp - 0x5cc]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x5cc]
push eax
call dword [edx + 0x7c]
mov dword [ebp - 0x5c8], eax
cmp dword [ebp - 0x5c8], 0
je 0x406b30
mov ecx, dword [ebp - 0x5cc]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x5cc]
push eax
call dword [edx + 8]
mov ecx, dword [ebp - 0x548]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x548]
push eax
call dword [edx + 8]
push str.SetPalette_failed_while_loading_surface__loadtex_._n
call fcn.00403e7d
add esp, 4
xor eax, eax
jmp 0x406b48
mov ecx, dword [ebp - 0x548]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x548]
push eax
call dword [edx + 8]
mov eax, dword [ebp - 0x5cc]
pop esi
mov esp, ebp
pop ebp
ret