Function at 0x4c1630
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x5d4
mov eax, dword [0x5513d4]
xor eax, esp
mov dword [esp + 0x5d0], eax
push ebx
mov ebx, dword [esp + 0x5f0]
push ebp
mov ebp, dword [esp + 0x5f8]
push esi
mov esi, dword [esp + 0x5e4]
push edi
mov edi, dword [esp + 0x5ec]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], ebp
cmp edi, 0x100
jbe 0x4c1680
mov eax, dword [esi + 0x400]
mov dword [esp + 0x3c], eax
jmp 0x4c1688
mov dword [esp + 0x3c], 0x10
push 0x44
lea eax, [esp + 0x58]
push 0
push eax
call fcn.00505530
add esp, 0xc
mov ecx, esi
mov edx, edi
lea ecx, [ecx]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
inc dword [esp + eax*4 + 0x54]
sub edx, 1
jne 0x4c16a0
cmp dword [esp + 0x54], edi
jne 0x4c16d6
mov dword [ebx], edx
mov dword [ebp], edx
xor eax, eax
mov ecx, dword [esp + 0x5e0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00502f8e
add esp, 0x5d4
ret 0x1c
mov ecx, 1
jmp 0x4c16e0
cmp dword [esp + ecx*4 + 0x54], 0
jne 0x4c16ed
inc ecx
cmp ecx, 0x10
jbe 0x4c16e0
mov eax, ecx
mov dword [esp + 0x14], eax
cmp dword [ebp], ecx
jae 0x4c16fb
mov dword [ebp], ecx
mov edx, 0x10
cmp dword [esp + edx*4 + 0x54], 0
jne 0x4c170c
sub edx, 1
jne 0x4c1700
mov dword [esp + 0x30], edx
cmp dword [ebp], edx
jbe 0x4c1718
mov dword [ebp], edx
mov ebp, 1
shl ebp, cl
cmp ecx, edx
jae 0x4c1734
sub ebp, dword [esp + ecx*4 + 0x54]
js 0x4c19ad
inc ecx
add ebp, ebp
cmp ecx, edx
jb 0x4c1723
lea ebx, [edx*4]
mov eax, dword [esp + ebx + 0x54]
sub ebp, eax
mov dword [esp + 0x50], ebp
js 0x4c19ad
add eax, ebp
xor ecx, ecx
mov dword [esp + ebx + 0x54], eax
mov dword [esp + 0x9c], ecx
sub edx, 1
je 0x4c1774
xor eax, eax
add ecx, dword [esp + eax + 0x58]
lea eax, [eax + 4]
mov dword [esp + eax + 0x9c], ecx
sub edx, 1
jne 0x4c1761
push 0x480
lea eax, [esp + 0x164]
push 0
push eax
call fcn.00505530
add esp, 0xc
xor ecx, ecx
lea ecx, [ecx]
mov edx, dword [esi]
lea esi, [esi + 4]
test edx, edx
je 0x4c17af
mov eax, dword [esp + edx*4 + 0x98]
mov dword [esp + eax*4 + 0x160], ecx
inc eax
mov dword [esp + edx*4 + 0x98], eax
inc ecx
cmp ecx, edi
jb 0x4c1790
mov eax, dword [esp + ebx + 0x98]
xor edx, edx
mov ecx, dword [esp + 0x14]
or edi, 0xffffffff
mov esi, dword [esp + 0x30]
xor ebx, ebx
mov dword [esp + 0x4c], eax
xor ebp, ebp
mov dword [esp + 0x20], 0
lea eax, [esp + 0x160]
mov dword [esp + 0x98], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0xdc], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0x120], edx
mov dword [esp + 0x24], ebx
cmp ecx, esi
jg 0x4c1ae1
lea eax, [esp + 0x54]
mov ebx, edx
lea eax, [eax + ecx*4]
mov dword [esp + 0x34], eax
mov eax, dword [eax]
test eax, eax
je 0x4c1ac9
jmp 0x4c1830
mov dword [esp + 0x38], eax
lea esi, [edi*4]
dec eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + esi + 0xe0]
add eax, edx
cmp ecx, eax
jle 0x4c1988
lea eax, [esp + 0xe0]
inc edi
add edx, dword [esi + eax]
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x30]
sub esi, edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x2c], edi
mov eax, dword [eax]
cmp esi, eax
jbe 0x4c1876
mov esi, eax
mov ebx, ecx
mov eax, 1
sub ebx, edx
mov ecx, ebx
shl eax, cl
cmp eax, dword [esp + 0x38]
jbe 0x4c18b7
mov edx, dword [esp + 0x34]
or ecx, 0xffffffff
sub ecx, dword [esp + 0x44]
inc ebx
add eax, ecx
cmp ebx, esi
jae 0x4c18b3
jmp 0x4c18a0
mov ecx, dword [edx + 4]
lea edx, [edx + 4]
add eax, eax
cmp eax, ecx
jbe 0x4c18b3
inc ebx
sub eax, ecx
cmp ebx, esi
jb 0x4c18a0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
lea eax, [edx + ebx]
cmp eax, ecx
jbe 0x4c18ca
cmp edx, ecx
jae 0x4c18ca
mov ebx, ecx
sub ebx, edx
mov ecx, ebx
lea eax, [esp + 0xe0]
mov ebp, 1
lea esi, [edi*4]
shl ebp, cl
mov dword [esi + eax], ebx
lea eax, [ebp*8 + 8]
push eax
call fcn.005097b7
add esp, 4
test eax, eax
je 0x4c1b0c
mov edx, dword [esp + 0x40]
lea ecx, [eax + 8]
add eax, 4
mov dword [esp + 0x24], ecx
mov dword [esp + 0x40], eax
mov dword [esp + esi + 0x120], ecx
mov dword [edx], ecx
mov dword [eax], 0
test edi, edi
je 0x4c1971
mov eax, dword [esp + 0x20]
mov edx, 1
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x10]
shl edx, cl
sub ecx, dword [esp + esi + 0xdc]
dec edx
and edx, dword [esp + 0x20]
mov dword [esp + esi + 0x98], eax
mov al, byte [esp + esi + 0xdc]
shr edx, cl
mov ecx, dword [esp + esi + 0x11c]
mov byte [esp + 0x19], al
lea eax, [ebx + 0x20]
mov byte [esp + 0x18], al
mov eax, dword [esp + 0x18]
mov dword [ecx + edx*8], eax
mov eax, dword [esp + 0x1c]
mov dword [ecx + edx*8 + 4], eax
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea eax, [edx + ebx]
cmp ecx, eax
jg 0x4c1851
mov ebx, dword [esp + 0x24]
mov al, cl
lea esi, [esp + 0x160]
sub al, dl
mov byte [esp + 0x19], al
mov eax, dword [esp + 0x4c]
lea eax, [esi + eax*4]
mov esi, dword [esp + 0x28]
cmp esi, eax
jb 0x4c19b7
mov byte [esp + 0x18], 0x63
jmp 0x4c1a03
mov eax, 2
jmp 0x4c16bb
mov ecx, dword [esi]
mov eax, dword [esp + 0x5f0]
cmp ecx, eax
jae 0x4c19d8
cmp ecx, 0x100
setb al
add al, 0x1f
mov byte [esp + 0x18], al
mov ax, cx
jmp 0x4c19f3
sub ecx, eax
mov eax, dword [esp + 0x5f8]
mov al, byte [ecx + eax]
mov byte [esp + 0x18], al
mov eax, dword [esp + 0x5f4]
mov ax, word [eax + ecx*2]
mov ecx, dword [esp + 0x14]
add esi, 4
mov dword [esp + 0x28], esi
mov word [esp + 0x1c], ax
mov eax, dword [esp + 0x20]
sub ecx, edx
mov esi, 1
shl esi, cl
mov ecx, edx
shr eax, cl
cmp eax, ebp
jae 0x4c1a4b
mov edi, dword [esp + 0x1c]
lea ecx, [esi*8]
mov dword [esp + 0x38], ecx
lea ecx, [ebx + eax*8]
mov ebx, dword [esp + 0x18]
mov edi, edi
mov dword [ecx], ebx
add eax, esi
mov dword [ecx + 4], edi
add ecx, dword [esp + 0x38]
cmp eax, ebp
jb 0x4c1a30
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov eax, 1
mov esi, dword [esp + 0x20]
lea ecx, [ecx - 1]
shl eax, cl
test esi, eax
je 0x4c1a69
xor esi, eax
shr eax, 1
test esi, eax
jne 0x4c1a61
xor esi, eax
mov ecx, edx
mov eax, 1
mov dword [esp + 0x20], esi
shl eax, cl
dec eax
and eax, esi
cmp eax, dword [esp + edi*4 + 0x98]
je 0x4c1ab5
jmp 0x4c1a90
sub edx, dword [esp + edi*4 + 0xdc]
dec edi
mov eax, 1
mov ecx, edx
shl eax, cl
dec eax
and eax, esi
cmp eax, dword [esp + edi*4 + 0x98]
jne 0x4c1a90
mov dword [esp + 0x2c], edi
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x14]
test eax, eax
jne 0x4c1830
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
inc ecx
add eax, 4
mov dword [esp + 0x14], ecx
mov dword [esp + 0x34], eax
cmp ecx, esi
jle 0x4c1821
cmp dword [esp + 0x50], 0
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0xe0]
mov dword [ecx], eax
je 0x4c16b9
cmp esi, 1
je 0x4c16b9
mov eax, 1
jmp 0x4c16bb
test edi, edi
je 0x4c1b35
mov eax, dword [esp + 0x120]
test eax, eax
je 0x4c1b35
jmp 0x4c1b20
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.005097b2
add esp, 4
mov eax, esi
test esi, esi
jne 0x4c1b20
mov eax, 3
jmp 0x4c16bb