Function at 0x4047f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
push edi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x44834000
mov edi, ecx
mov dword [ebp - 4], 0x44188000
push 4
push eax
mov dword [ebp - 0x40], edi
call fcn.00423a80
push 0
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.004104e0
add esp, 0x14
test al, al
je 0x404e94
mov eax, dword [edi + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [eax + 0x229a4934]
add esi, 0xd20d4
cmp dword [ebx + 4], 0
mov dword [ebp - 0xc], esi
jne 0x4048bd
push str.nearest
push str.SDL_RENDER_SCALE_QUALITY
call fcn.00466f90
mov eax, dword [edi + 0x18]
push 0x400
push 0x400
push 1
push 0x16362004
push dword [eax + 0x10]
call fcn.00462e70
add esp, 0x1c
mov dword [ebx + 4], eax
test eax, eax
jne 0x40488f
call fcn.0045a210
push eax
push str.SDL_CreateTexture_failed_with_the_following_message____s
jmp 0x4048a9
push 0
push eax
call fcn.00465e50
add esp, 8
test eax, eax
jns 0x4048b3
call fcn.0045a210
push eax
push str.SDL_SetTextureBlendMode_failed_with_the_following_message____s
push dword [edi]
call fcn.00403fe0
add esp, 0xc
cmp dword [ebx + 4], 0
je 0x404e92
push 0
push 0x64
push 1
push ebx
push str.Zoom
call fcn.00443dd0
add esp, 0x14
cmp dword [ebx], 1
jge 0x4048dc
mov dword [ebx], 1
push 0x800
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push str.Plane_View
mov dword [ebp - 4], 0
call fcn.00412b20
add esp, 0x10
test al, al
je 0x404e8d
mov eax, dword [edi + 0x10]
xor ebx, ebx
cmp byte [esi + 0x3c], bl
mov edi, dword [ebp + 0x10]
setne bl
mov eax, dword [eax]
lea ebx, [ebx*8 + 8]
mov dword [ebp - 0x1c], ebx
cmp dword [edi + 8], eax
je 0x404b23
mov dword [edi + 8], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
push 0
push dword [edi + 4]
call fcn.004636d0
add esp, 0x10
test eax, eax
jne 0x404b23
movzx eax, word [ebp + 0x14]
xor ecx, ecx
add eax, 0x48
mov dword [ebp - 0x3c], ecx
add eax, esi
mov dword [ebp - 0x30], eax
xor eax, eax
cmp ax, word [esi + 0x30]
jae 0x404b18
mov dword [ebp + 0xc], eax
nop dword [eax]
xor edx, edx
mov dword [ebp - 0x38], 0
cmp dx, word [esi + 0x2e]
jae 0x404afd
lea eax, [ebx - 1]
mov dword [ebp - 0x44], eax
lea eax, [ebx*8]
shr eax, 1
xor edi, edi
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x18], edi
nop word [eax + eax]
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x44]
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
add ebx, 2
shl ecx, 8
or ecx, eax
mov dword [ebp - 0x30], ebx
mov eax, ecx
mov edx, ecx
and eax, 0x7ff
shr edx, 0xd
mov dword [ebp - 0x10], eax
and edx, 3
mov eax, ecx
shr eax, 0xf
mov dword [ebp + 8], eax
mov eax, ecx
shr eax, 0xb
and al, 1
movzx ebx, al
mov eax, 0
neg ebx
sbb ebx, ebx
shr ecx, 0xc
and ebx, 7
test cl, 1
mov dword [ebp - 0x14], ebx
cmove esi, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], esi
cmp byte [eax + 0x3b], 0
je 0x404a0d
cmp byte [ebp + 8], 0
jne 0x404a0d
mov eax, 4
jmp 0x404a0f
xor eax, eax
lea ecx, [edx + eax]
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0xc]
shl ecx, 6
add edx, 0x48
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x229a4934]
add eax, 0xec088
add eax, ecx
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x54]
imul eax, dword [ebp - 0x10]
add edx, eax
xor eax, eax
mov dword [ebp - 0x34], eax
nop
xor esi, eax
add esi, dword [ebp + 0xc]
imul esi, dword [ebp - 0x20]
add esi, edi
mov edi, 2
add esi, dword [ebp - 0x28]
mov al, byte [edx]
lea ecx, [edx + 1]
add edx, 2
mov dword [ebp - 0x10], edx
movzx edx, al
movzx eax, byte [ecx]
lea ecx, [edi - 2]
xor ecx, ebx
shl edx, 8
mov ebx, dword [ebp + 8]
or edx, eax
mov eax, edx
shr eax, 0xc
mov eax, dword [ebx + eax*4]
mov dword [esi + ecx*4], eax
mov eax, edx
shr eax, 8
lea ecx, [edi - 1]
xor ecx, dword [ebp - 0x14]
and eax, 0xf
mov eax, dword [ebx + eax*4]
mov dword [esi + ecx*4], eax
mov eax, edx
shr eax, 4
mov ecx, edi
xor ecx, dword [ebp - 0x14]
and eax, 0xf
and edx, 0xf
mov eax, dword [ebx + eax*4]
mov ebx, dword [ebp - 0x14]
mov dword [esi + ecx*4], eax
lea ecx, [edi + 1]
mov eax, dword [ebp + 8]
xor ecx, ebx
add edi, 4
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x10]
mov dword [esi + ecx*4], eax
cmp edi, 0xa
jb 0x404a53
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 4]
inc eax
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0x1c]
jb 0x404a40
mov esi, dword [ebp - 0xc]
add edi, 0x20
mov ecx, dword [ebp - 0x38]
inc ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x38], ecx
movzx eax, word [esi + 0x2e]
cmp ecx, eax
jb 0x4049a0
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x3c]
add eax, ebx
inc ecx
mov dword [ebp + 0xc], eax
movzx eax, word [esi + 0x30]
cmp ecx, eax
mov dword [ebp - 0x3c], ecx
mov eax, dword [ebp + 0xc]
jb 0x404970
mov edi, dword [ebp + 0x10]
push dword [edi + 4]
call fcn.00465f70
add esp, 4
movzx eax, word [esi + 0x2e]
shl eax, 3
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4d3640]
movzx eax, word [esi + 0x30]
imul eax, ebx
cvtpd2ps xmm0, xmm0
movss dword [ebp + 8], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4d3640]
lea eax, [ebp - 0x68]
push eax
cvtpd2ps xmm0, xmm0
movss dword [ebp + 0xc], xmm0
call fcn.00416c90
movss xmm0, dword [ebp + 8]
lea eax, [ebp - 0x60]
mulss xmm0, dword [0x4d43d8]
push eax
movd xmm1, dword [edi]
lea eax, [ebp - 0x50]
push eax
movss dword [ebp - 8], xmm0
lea eax, [ebp - 8]
movss xmm0, dword [ebp + 0xc]
mulss xmm0, dword [0x4d43d8]
push eax
cvtdq2ps xmm1, xmm1
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x60], 0
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x50], 0x3f800000
push eax
movss dword [ebp - 4], xmm0
push dword [edi + 4]
movaps xmm0, xmm1
mov dword [ebp - 0x5c], 0
mulss xmm0, dword [ebp + 8]
mov dword [ebp - 0x4c], 0x3f800000
mulss xmm1, dword [ebp + 0xc]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], 0x3f800000
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x44], 0x3f800000
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
movss dword [ebp - 0x24], xmm0
movss dword [ebp - 0x20], xmm1
call fcn.00443c30
push 0
call fcn.00419290
add esp, 0x20
test al, al
je 0x404e8d
call fcn.004135a0
lea eax, [ebp - 0x2c]
push eax
call fcn.00417140
movd xmm1, dword [edi]
add esp, 4
movss xmm0, dword [ebp - 0x2c]
subss xmm0, dword [ebp - 0x68]
cvtdq2ps xmm1, xmm1
divss xmm0, xmm1
mulss xmm0, dword [0x4d43dc]
call fcn.004b2160
movd xmm2, dword [edi]
mov ecx, ebx
movd xmm0, ebx
mov esi, eax
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
cvtdq2ps xmm2, xmm2
addsd xmm0, qword [ecx*8 + 0x4d3640]
cvtpd2ps xmm1, xmm0
movss xmm0, dword [ebp - 0x28]
subss xmm0, dword [ebp - 0x64]
movss dword [ebp + 8], xmm1
divss xmm0, xmm2
divss xmm0, xmm1
call fcn.004b2160
movzx ecx, word [ebp + 0x14]
mov edi, eax
mov eax, dword [ebp - 0xc]
add ecx, eax
movss xmm1, dword [0x4d43d8]
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x88], 0x3f800000
movzx edx, word [eax + 0x2e]
imul edx, edi
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x84], 0x3f800000
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x80], 0x3f800000
add edx, esi
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x7c], 0x3f800000
movzx ebx, byte [ecx + edx*2 + 0x48]
movzx eax, byte [ecx + edx*2 + 0x49]
lea ecx, [esi*8]
shl ebx, 8
or ebx, eax
mov eax, ebx
mov dword [ebp + 0x14], ebx
and eax, 0x7ff
shr ebx, 0xd
mov dword [ebp - 4], eax
and ebx, 3
lea eax, [ecx + 8]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4d3640]
lea eax, [edi + 1]
imul eax, dword [ebp - 0x1c]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x24], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4d3640]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x20], xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
imul edi, dword [ebp - 0x1c]
addsd xmm0, qword [ecx*8 + 0x4d3640]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x58], xmm0
movd xmm0, edi
cvtdq2pd xmm0, xmm0
mov esi, dword [ebp - 0x40]
shr edi, 0x1f
push ecx
mov eax, dword [esi + 4]
addsd xmm0, qword [edi*8 + 0x4d3640]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x54], xmm0
movss xmm0, dword [eax]
mulss xmm0, dword [0x4d43ec]
movss dword [esp], xmm0
call fcn.0045a060
mov eax, dword [esi + 4]
fmul dword [0x4d43e8]
movss xmm0, dword [eax]
mulss xmm0, dword [0x4d43ec]
fstp dword [ebp + 0xc]
movss dword [esp], xmm0
call fcn.0045a060
fmul dword [ebp + 8]
lea eax, [ebp - 0x78]
movss xmm0, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x88]
movss dword [ebp - 0x48], xmm0
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp + 0x10]
fstp dword [ebp + 8]
movss xmm0, dword [ebp + 8]
movss dword [ebp - 0x44], xmm0
push dword [eax + 4]
call fcn.00443c30
add esp, 0x14
mov dword [esp + 4], 0xbf800000
mov dword [esp], 0
call fcn.004225a0
mov ecx, dword [ebp + 0x14]
mov edx, str.True
shr ecx, 0xf
mov eax, edx
test cl, cl
mov esi, str.False
mov ecx, dword [ebp + 0x14]
cmove eax, esi
push eax
mov eax, ecx
shr eax, 0xc
test al, 1
mov eax, edx
cmove eax, esi
shr ecx, 0xb
push eax
mov eax, dword [ebp - 4]
test cl, 1
cmove edx, esi
push edx
push ebx
push eax
push eax
push str.Tile_Index:__u_0x_X_nPalette_Line:__d_nX_Flip:__s_nY_Flip:__s_nPriority:__s
call fcn.0044bc60
add esp, 0x24
call fcn.00415a00
call fcn.004151a0
pop esi
pop ebx
call fcn.00414e20
pop edi
mov esp, ebp
pop ebp
ret 0x10