Function at 0x10004cf0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 0x14]
push ebx
lea edx, [eax + 0x214]
push esi
mov ecx, eax
push edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
cmp eax, edx
ja case.0x10004d48.7733
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x14]
nop
cmp ecx, 0x29d7
ja 0x10005014
je 0x10004fd7
lea eax, [ecx - 0x1df6]
cmp eax, 0x3f
ja case.0x10004d48.7671
movzx eax, byte [eax + 0x100050f8]
jmp dword [eax*4 + 0x100050cc]
mov ebx, dword [ebp + 0xc]
cmp dword [ebx], 0
not esi
je case.0x10004d48.7671
lea ecx, [ecx]
mov edx, dword [ebp + 8]
test dl, 3
je case.0x10004d48.7671
mov ecx, 0x63bc
mov eax, ecx
sub eax, 0x63bc
je 0x10004d83
sub eax, 0x36
jne 0x10004d9b
dec dword [ebx]
jmp 0x10004d9b
movzx ebx, byte [edx]
mov eax, esi
shr eax, 0x18
xor eax, ebx
mov ebx, dword [ebp + 0xc]
shl esi, 8
xor esi, dword [eax*4 + 0x10040800]
inc edx
add ecx, 0x36
cmp ecx, 0x63f2
jbe 0x10004d71
cmp dword [ebx], 0
mov dword [ebp + 8], edx
jne 0x10004d60
jmp case.0x10004d48.7671
mov edi, dword [esp + 0x14]
jmp case.0x10004d48.7671
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], 0x20
jb case.0x10004d48.7671
jmp 0x10004dd0
xor ecx, ecx
lea edx, [ecx + 0xc]
jmp 0x10004de0
cmp ecx, 0xc6
ja case.0x10004df3.1
movzx eax, byte [ecx + 0x10005150]
jmp dword [eax*4 + 0x10005138]
mov eax, esi
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x10041000]
mov ebx, esi
shr ebx, 8
and ebx, 0xff
xor eax, dword [ebx*4 + 0x10040c00]
mov ebx, esi
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x10041400]
and esi, 0xff
xor eax, dword [esi*4 + 0x10040800]
add edi, 4
xor eax, dword [edi]
jmp 0x10004e8d
add edi, 4
xor esi, dword [edi]
jmp case.0x10004df3.1
mov eax, dword [ebp + 0xc]
add dword [eax], 0xffffffe0
jmp case.0x10004df3.1
add edi, 4
xor esi, dword [edi]
mov eax, esi
shr eax, 0x10
mov ebx, esi
shr ebx, 8
and eax, 0xff
mov eax, dword [eax*4 + 0x10041000]
and ebx, 0xff
xor eax, dword [ebx*4 + 0x10040c00]
mov ebx, esi
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x10041400]
and esi, 0xff
xor eax, dword [esi*4 + 0x10040800]
mov esi, eax
add ecx, 0x12
dec edx
jne 0x10004de0
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], 0x20
jae 0x10004dd0
jmp case.0x10004d48.7671
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
mov dword [ebp + 8], edi
je case.0x10004d48.7671
lea esp, [esp]
mov eax, dword [ebp + 8]
movzx edx, byte [eax]
mov ecx, esi
inc eax
shr ecx, 0x18
xor ecx, edx
shl esi, 8
xor esi, dword [ecx*4 + 0x10040800]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
dec dword [eax]
jne 0x10004ec0
jmp case.0x10004d48.7671
mov edi, dword [ebp + 8]
add edi, 0xfffffffc
jmp case.0x10004d48.7671
mov eax, dword [ebp + 0xc]
cmp dword [eax], 4
jb case.0x10004d48.7671
mov edi, edi
mov ecx, 0x4dc8
mov eax, ecx
sub eax, 0x4dc8
je 0x10004f1b
sub eax, 2
jne 0x10004f5f
mov eax, dword [ebp + 0xc]
add dword [eax], 0xfffffffc
jmp 0x10004f5f
xor esi, dword [edi + 4]
add edi, 4
mov edx, esi
shr edx, 0x10
mov eax, esi
and edx, 0xff
mov edx, dword [edx*4 + 0x10041000]
shr eax, 8
and eax, 0xff
xor edx, dword [eax*4 + 0x10040c00]
mov eax, esi
shr eax, 0x18
xor edx, dword [eax*4 + 0x10041400]
and esi, 0xff
xor edx, dword [esi*4 + 0x10040800]
mov esi, edx
add ecx, 2
cmp ecx, 0x4dca
jbe 0x10004f05
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], 4
jae 0x10004f00
jmp case.0x10004d48.7671
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
mov esi, eax
mov edx, eax
shl esi, 0x10
and edx, 0xff00
add esi, edx
shr eax, 8
and eax, 0xff00
shl esi, 8
add esi, eax
movzx eax, byte [ecx + 3]
add esi, eax
jmp case.0x10004d48.7671
add edi, 4
jmp case.0x10004d48.7671
not esi
mov eax, esi
and eax, 0xff00
mov ecx, esi
shl ecx, 0x10
add eax, ecx
mov edx, esi
shr edx, 8
shl eax, 8
and edx, 0xff00
mov ecx, esi
add eax, edx
shr ecx, 0x18
add eax, ecx
jmp 0x1000509e
mov eax, dword [ebp + 0x10]
call fcn.10009680
test eax, eax
je case.0x10004d48.7671
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call fcn.100096a0
add esp, 4
mov ebx, eax
call fcn.1001e5d0
mov eax, dword [ebp + 0x10]
add esp, 4
call fcn.10009680
test eax, eax
jne 0x10004fe7
jmp case.0x10004d48.7671
cmp ecx, 0x79e1
ja 0x1000506f
je 0x10005054
mov eax, ecx
sub eax, 0x29de
je 0x10005046
sub eax, 0x4689
je 0x1000503e
sub eax, 7
jne case.0x10004d48.7671
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0xc]
jmp 0x1000509e
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.1002b00c
add esp, 4
jmp case.0x10004d48.7671
cmp dword [ebp + 0x10], 0
jne case.0x10004d48.7671
mov eax, 0x4ec3
cmp eax, eax
je 0x100050c2
add eax, 0x4d
cmp eax, 0x4ec3
jbe 0x10005061
jmp case.0x10004d48.7671
mov eax, ecx
sub eax, 0x79e8
je 0x1000507f
sub eax, 7
je case.0x10004d48.7733
jmp case.0x10004d48.7671
mov ebx, dword [ebp + 0x10]
push 0x80
add ebx, 0xd1
call fcn.1001d860
add esp, 4
push eax
call fcn.1002cbc7
add esp, 4
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x10]
add ecx, 7
mov dword [esp + 0x10], ecx
cmp ecx, dword [esp + 0x14]
jbe 0x10004d20
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret