Function at 0x1004d2d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
push esi
mov esi, dword [esp + 0x38]
xor eax, eax
push edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x28], eax
lea edx, [esi + 0xb7c]
mov dword [esp + 0x2c], edx
lea ecx, [edi + 0x1808]
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x44], eax
jle 0x1004d391
mov ecx, dword [esp + 0x2c]
lea edx, [esi + 0x1d7c]
mov edi, dword [esp + 0x40]
mov dword [esp + 0x24], ecx
lea ecx, [esi + 0x3f1c]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x3c]
movzx esi, word [edi + 4]
add esi, dword [eax + 4]
mov eax, dword [esp + 0x28]
push eax
push edx
push edi
push dword [esp + 0x48]
push ecx
push dword [esp + 0x2c]
call fcn.1004d610
push esi
push dword [esp + 0x38]
mov esi, dword [esp + 0x44]
push edi
push dword [esp + 0x60]
push esi
call fcn.1004d8e0
mov eax, dword [esp + 0x54]
add esi, 0x900
mov ecx, dword [esp + 0x4c]
inc eax
mov edx, dword [esp + 0x48]
add ecx, 0x27
add esp, 0x2c
mov dword [esp + 0x28], eax
add edi, 0x1c
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], esi
cmp eax, dword [esp + 0x44]
jl 0x1004d321
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x38]
jmp 0x1004d395
mov dword [esp + 0x2c], edx
mov al, byte [edi + 0x180b]
test al, 0x10
je 0x1004d3ba
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
add eax, 0x3f43
push ecx
push esi
push eax
push edx
call fcn.1004ead0
add esp, 0x10
jmp 0x1004d3d2
and al, 0xe0
cmp al, 0x60
jne 0x1004d3ce
push 0x240
push edx
call fcn.1004ecd0
add esp, 8
mov esi, dword [esp + 0x40]
cmp dword [esp + 0x44], 0
jle 0x1004d5ff
lea ecx, [edi + 0x1809]
mov dword [esp + 0x20], 0
lea eax, [esi + 0xe]
mov dword [esp + 0xc], ecx
mov esi, dword [esp + 0x2c]
add edi, 0x180a
mov dword [esp + 8], edi
mov dword [esp + 0x28], eax
nop dword [eax]
nop dword [eax + eax]
movzx eax, byte [ecx]
mov ecx, eax
mov dword [esp + 0x18], 0x1f
shr eax, 3
shr ecx, 4
and eax, 1
and ecx, 1
add ecx, eax
movzx eax, byte [edi]
shr eax, 2
and eax, 3
lea edx, [ecx + ecx*2]
xor ecx, ecx
add edx, eax
mov eax, 2
cmp edx, 2
mov edx, dword [esp + 0x28]
sete cl
xor edi, edi
cmp byte [edx - 2], 0
cmovne edi, eax
shl edi, cl
cmp byte [edx], 0
mov dword [esp + 0x14], edi
je 0x1004d50f
lea eax, [edi - 1]
mov dword [esp + 0x18], eax
movzx eax, byte [edx - 1]
add eax, dword [edx - 0xe]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
add eax, edi
lea ecx, [edx + 0x1e1c]
lea eax, [eax + eax*8]
lea eax, [eax*8 + 0xb7c]
add eax, edx
mov dword [esp + 0x10], eax
mov edx, eax
mov eax, dword [esp + 0x24]
movzx esi, byte [eax]
test esi, esi
je 0x1004d4ef
lea edi, [esi*8]
test esi, esi
je 0x1004d4da
lea eax, [esi*4]
mov dword [esp + 0x1c], eax
mov eax, dword [edx]
mov dword [ecx], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + edx]
mov dword [ecx + 4], eax
mov eax, dword [edi + edx]
add edx, 4
mov dword [ecx + 8], eax
add ecx, 0xc
sub esi, 1
jne 0x1004d4b7
mov eax, dword [esp + 0x24]
movzx esi, byte [eax + 3]
add eax, 3
add edx, edi
mov dword [esp + 0x24], eax
test esi, esi
jne 0x1004d4a1
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x3c]
add eax, 0x1e1c
sub ecx, eax
and ecx, 0xfffffffc
push ecx
push eax
push dword [esp + 0x18]
call fcn.10086560
mov esi, dword [esp + 0x38]
add esp, 0xc
push dword [esp + 0x18]
push esi
call fcn.1004d1a0
mov eax, dword [esp + 0x30]
add esp, 8
mov edx, esi
mov al, byte [eax - 3]
mov byte [esp + 0x33], al
mov eax, dword [esp + 0x38]
mov ecx, eax
test edi, edi
je 0x1004d553
push edi
push 0x1016c1b0
push eax
push esi
call fcn.1004e100
mov ecx, dword [esp + 0x48]
lea eax, [edi + edi*8]
lea edx, [esi + eax*8]
add esp, 0x10
lea eax, [edi + edi*8]
lea ecx, [ecx + eax*4]
mov eax, 0x20
sub eax, edi
cmp byte [esp + 0x33], 2
push eax
jne 0x1004d56e
push ecx
push edx
call fcn.1004e820
add esp, 0xc
jmp 0x1004d58d
xor eax, eax
mov edi, 0x48
cmp byte [esp + 0x37], 3
cmove eax, edi
add eax, 0x1016c1b0
push eax
push ecx
push edx
call fcn.1004e100
add esp, 0x10
movss xmm1, dword [0x1016a3a0]
lea ecx, [esi + 0x48]
mov edx, 0x10
nop dword [eax]
mov eax, 1
nop word [eax + eax]
movss xmm0, dword [ecx + eax*4]
xorps xmm0, xmm1
movss dword [ecx + eax*4], xmm0
add eax, 2
cmp eax, 0x12
jl 0x1004d5b0
add ecx, 0x90
sub edx, 1
jne 0x1004d5a0
add dword [esp + 0x20], 0x20
add esi, 0x900
add dword [esp + 0x38], 0x480
add dword [esp + 0x28], 0x1c
sub dword [esp + 0x44], 1
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 8]
mov dword [esp + 0x2c], esi
jne 0x1004d410
pop edi
pop esi
add esp, 0x2c
ret