Function at 0x4b05b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5e4
mov eax, dword [0x5b0008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, edx
mov dword [ebp - 0x5d8], ebx
mov dword [ebp - 0x5c4], eax
cmp edi, 0x100
jbe 0x4b05f3
mov eax, dword [esi + 0x400]
mov dword [ebp - 0x5d4], eax
jmp 0x4b05fd
mov dword [ebp - 0x5d4], 0x10
push 0x44
lea eax, [ebp - 0x50]
push 0
push eax
call fcn.0051a780
add esp, 0xc
mov ecx, esi
mov edx, edi
mov eax, dword [ecx]
lea ecx, [ecx + 4]
inc dword [ebp + eax*4 - 0x50]
sub edx, 1
jne 0x4b0611
cmp dword [ebp - 0x50], edi
jne 0x4b0641
mov eax, dword [ebp - 0x5c4]
mov dword [ebx], edx
mov dword [eax], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00518799
mov esp, ebp
pop ebp
ret
mov ecx, 1
cmp dword [ebp + ecx*4 - 0x50], 0
jne 0x4b0653
inc ecx
cmp ecx, 0x10
jbe 0x4b0646
mov eax, dword [ebp - 0x5c4]
mov dword [ebp - 0x5a8], ecx
cmp dword [eax], ecx
jae 0x4b0665
mov dword [eax], ecx
mov edx, 0x10
nop word [eax + eax]
cmp dword [ebp + edx*4 - 0x50], 0
jne 0x4b067c
sub edx, 1
jne 0x4b0670
mov dword [ebp - 0x5c0], edx
cmp dword [eax], edx
jbe 0x4b0688
mov dword [eax], edx
mov eax, 1
shl eax, cl
mov dword [ebp - 0x5c8], eax
cmp ecx, edx
jae 0x4b06b3
nop dword [eax]
sub eax, dword [ebp + ecx*4 - 0x50]
js 0x4b06ce
inc ecx
add eax, eax
mov dword [ebp - 0x5c8], eax
cmp ecx, edx
jb 0x4b06a0
mov ecx, dword [ebp - 0x5c8]
lea ebx, [edx*4]
mov eax, dword [ebp + ebx - 0x50]
sub ecx, eax
mov dword [ebp - 0x5c8], ecx
jns 0x4b06e4
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00518799
mov esp, ebp
pop ebp
ret
add eax, ecx
xor ecx, ecx
mov dword [ebp + ebx - 0x50], eax
mov dword [ebp - 0x94], ecx
sub edx, 1
je 0x4b0713
xor eax, eax
nop dword [eax]
add ecx, dword [ebp + eax - 0x4c]
lea eax, [eax + 4]
mov dword [ebp + eax - 0x94], ecx
sub edx, 1
jne 0x4b0700
push 0x480
lea eax, [ebp - 0x5a0]
push 0
push eax
call fcn.0051a780
add esp, 0xc
xor ecx, ecx
nop dword [eax + eax]
mov edx, dword [esi]
lea esi, [esi + 4]
test edx, edx
je 0x4b074f
mov eax, dword [ebp + edx*4 - 0x98]
mov dword [ebp + eax*4 - 0x5a0], ecx
inc eax
mov dword [ebp + edx*4 - 0x98], eax
inc ecx
cmp ecx, edi
jb 0x4b0730
mov eax, dword [ebp + ebx - 0x98]
xor edx, edx
mov ebx, dword [ebp - 0x5c0]
or ecx, 0xffffffff
mov dword [ebp - 0x5e0], eax
xor esi, esi
lea eax, [ebp - 0x5a0]
mov dword [ebp - 0x5bc], 0
mov dword [ebp - 0x5b8], eax
xor edi, edi
mov eax, dword [ebp - 0x5a8]
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x5a4], ecx
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0x5ac], edx
mov dword [ebp - 0x120], edx
cmp eax, ebx
jg 0x4b0acb
lea ebx, [ebp - 0x50]
lea ebx, [ebx + eax*4]
mov dword [ebp - 0x5cc], ebx
mov ebx, dword [ebx]
test ebx, ebx
je 0x4b0aa3
mov dword [ebp - 0x5d0], ebx
dec ebx
mov dword [ebp - 0x5dc], ebx
mov ebx, dword [ebp + ecx*4 - 0xdc]
lea eax, [ebx + edx]
cmp dword [ebp - 0x5a8], eax
jle 0x4b094a
mov eax, dword [ebp - 0x5c0]
inc ecx
add edx, ebx
mov dword [ebp - 0x5a4], ecx
mov ecx, dword [ebp - 0x5c4]
sub eax, edx
mov ebx, dword [ebp - 0x5a8]
mov dword [ebp - 0x5ac], edx
mov esi, dword [ecx]
cmp eax, esi
cmovbe esi, eax
sub ebx, edx
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp eax, dword [ebp - 0x5d0]
jbe 0x4b085f
mov edx, dword [ebp - 0x5cc]
or ecx, 0xffffffff
sub ecx, dword [ebp - 0x5dc]
inc ebx
add eax, ecx
cmp ebx, esi
jae 0x4b0859
mov ecx, dword [edx + 4]
lea edx, [edx + 4]
add eax, eax
cmp eax, ecx
jbe 0x4b0859
inc ebx
sub eax, ecx
cmp ebx, esi
jb 0x4b0846
mov edx, dword [ebp - 0x5ac]
mov ecx, dword [ebp - 0x5d4]
lea eax, [edx + ebx]
cmp eax, ecx
jbe 0x4b0874
cmp edx, ecx
jae 0x4b0874
mov ebx, ecx
sub ebx, edx
mov esi, dword [ebp - 0x5a4]
mov ecx, ebx
mov edi, 1
shl edi, cl
mov dword [ebp + esi*4 - 0xdc], ebx
lea eax, [edi*8 + 8]
push eax
call fcn.0051e703
add esp, 4
test eax, eax
je 0x4b0b05
mov ecx, dword [ebp - 0x5d8]
lea esi, [eax + 8]
add eax, 4
mov dword [ebp - 0x5d8], eax
mov dword [ecx], esi
mov ecx, dword [ebp - 0x5a4]
mov dword [eax], 0
mov dword [ebp + ecx*4 - 0x120], esi
test ecx, ecx
je 0x4b0935
mov eax, dword [ebp - 0x5bc]
mov edx, 1
mov dword [ebp + ecx*4 - 0x98], eax
mov al, byte [ebp + ecx*4 - 0xe0]
mov ecx, dword [ebp - 0x5ac]
mov byte [ebp - 0x5b3], al
lea eax, [ebx + 0x20]
shl edx, cl
mov byte [ebp - 0x5b4], al
dec edx
mov eax, dword [ebp - 0x5a4]
and edx, dword [ebp - 0x5bc]
mov dword [ebp - 0x5b0], esi
sub ecx, dword [ebp + eax*4 - 0xe0]
mov eax, dword [ebp + eax*4 - 0x124]
shr edx, cl
mov ecx, dword [ebp - 0x5b4]
mov dword [eax + edx*8], ecx
mov ecx, esi
mov dword [eax + edx*8 + 4], ecx
mov ecx, dword [ebp - 0x5a4]
mov edx, dword [ebp - 0x5ac]
lea eax, [edx + ebx]
cmp dword [ebp - 0x5a8], eax
jg 0x4b07f3
mov ebx, dword [ebp - 0x5a8]
mov al, bl
sub al, dl
mov byte [ebp - 0x5b3], al
mov eax, dword [ebp - 0x5e0]
lea eax, [ebp + eax*4 - 0x5a0]
cmp dword [ebp - 0x5b8], eax
jb 0x4b0978
mov byte [ebp - 0x5b4], 0x63
jmp 0x4b09d2
mov eax, dword [ebp - 0x5b8]
mov ecx, dword [eax]
add eax, 4
mov dword [ebp - 0x5b8], eax
mov eax, dword [ebp + 0xc]
cmp ecx, eax
jae 0x4b09aa
cmp ecx, 0x100
mov word [ebp - 0x5b0], cx
setb al
add al, 0x1f
mov byte [ebp - 0x5b4], al
jmp 0x4b09d2
sub ecx, eax
mov eax, dword [ebp + 0x14]
mov al, byte [ecx + eax]
mov byte [ebp - 0x5b4], al
mov eax, dword [ebp + 0x10]
mov ax, word [eax + ecx*2]
mov word [ebp - 0x5b0], ax
mov eax, dword [ebp - 0x5b8]
mov dword [ebp - 0x5b8], eax
mov ecx, ebx
mov eax, 1
mov ebx, dword [ebp - 0x5bc]
sub ecx, edx
shl eax, cl
mov ecx, edx
mov dword [ebp - 0x5d0], eax
mov eax, ebx
shr eax, cl
cmp eax, edi
jae 0x4b0a1e
mov ebx, dword [ebp - 0x5b4]
mov ecx, dword [ebp - 0x5d0]
mov edx, dword [ebp - 0x5b0]
mov dword [esi + eax*8], ebx
mov dword [esi + eax*8 + 4], edx
add eax, ecx
cmp eax, edi
jb 0x4b0a05
mov edx, dword [ebp - 0x5ac]
mov ebx, dword [ebp - 0x5bc]
mov ecx, dword [ebp - 0x5a8]
mov eax, 1
lea ecx, [ecx - 1]
shl eax, cl
test ebx, eax
je 0x4b0a3a
xor ebx, eax
shr eax, 1
test ebx, eax
jne 0x4b0a32
xor ebx, eax
mov ecx, edx
mov eax, 1
mov dword [ebp - 0x5bc], ebx
shl eax, cl
mov ecx, dword [ebp - 0x5a4]
dec eax
and eax, ebx
cmp eax, dword [ebp + ecx*4 - 0x98]
je 0x4b0a8f
nop dword [eax]
sub edx, dword [ebp + ecx*4 - 0xe0]
dec ecx
mov dword [ebp - 0x5a4], ecx
mov eax, 1
mov ecx, edx
shl eax, cl
mov ecx, dword [ebp - 0x5a4]
dec eax
and eax, ebx
cmp eax, dword [ebp + ecx*4 - 0x98]
jne 0x4b0a60
mov dword [ebp - 0x5ac], edx
mov ebx, dword [ebp - 0x5dc]
test ebx, ebx
jne 0x4b07d0
mov eax, dword [ebp - 0x5a8]
mov ebx, dword [ebp - 0x5cc]
inc eax
add ebx, 4
mov dword [ebp - 0x5a8], eax
mov dword [ebp - 0x5cc], ebx
cmp eax, dword [ebp - 0x5c0]
jle 0x4b07c6
mov ebx, dword [ebp - 0x5c0]
cmp dword [ebp - 0x5c8], 0
mov ecx, dword [ebp - 0x5c4]
mov eax, dword [ebp - 0xdc]
mov dword [ecx], eax
je 0x4b062e
cmp ebx, 1
je 0x4b062e
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00518799
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4b0b28
mov eax, dword [ebp - 0x120]
test eax, eax
je 0x4b0b28
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.0051cad9
add esp, 4
mov eax, esi
test esi, esi
jne 0x4b0b13
mov ecx, dword [ebp - 4]
mov eax, 3
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00518799
mov esp, ebp
pop ebp
ret