Function at 0x4e6960
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x5d0
mov eax, dword [0x58cb30]
xor eax, esp
mov dword [esp + 0x5cc], eax
push ebx
mov ebx, dword [esp + 0x5ec]
push ebp
mov ebp, dword [esp + 0x5e0]
mov dword [esp + 0x34], ebx
push esi
mov esi, dword [esp + 0x5e0]
push edi
mov edi, dword [esp + 0x5fc]
mov dword [esp + 0x40], edi
cmp ebp, 0x100
jbe 0x4e69b0
mov eax, dword [esi + 0x400]
mov dword [esp + 0x38], eax
jmp 0x4e69b8
mov dword [esp + 0x38], 0x10
push 0x44
lea eax, [esp + 0x54]
push 0
push eax
call fcn.00532770
add esp, 0xc
mov ecx, esi
mov edx, ebp
lea ecx, [ecx]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
inc dword [esp + eax*4 + 0x50]
sub edx, 1
jne 0x4e69d0
cmp dword [esp + 0x50], ebp
jne 0x4e6a05
mov dword [ebx], edx
mov dword [edi], edx
xor eax, eax
mov ecx, dword [esp + 0x5dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00530218
add esp, 0x5d0
ret 0x1c
mov ecx, 1
lea ebx, [ebx]
cmp dword [esp + ecx*4 + 0x50], 0
jne 0x4e6a1d
inc ecx
cmp ecx, 0x10
jbe 0x4e6a10
mov eax, ecx
mov dword [esp + 0x24], eax
cmp dword [edi], ecx
jae 0x4e6a29
mov dword [edi], ecx
mov edx, 0x10
mov edi, edi
cmp dword [esp + edx*4 + 0x50], 0
jne 0x4e6a3c
sub edx, 1
jne 0x4e6a30
mov dword [esp + 0x28], edx
cmp dword [edi], edx
jbe 0x4e6a46
mov dword [edi], edx
mov ebx, 1
shl ebx, cl
cmp ecx, edx
jae 0x4e6a5e
sub ebx, dword [esp + ecx*4 + 0x50]
js 0x4e6a75
inc ecx
add ebx, ebx
cmp ecx, edx
jb 0x4e6a51
lea ecx, [edx*4]
mov eax, ebx
sub ebx, dword [esp + ecx + 0x50]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x4c], ebx
jns 0x4e6a7f
mov eax, 2
jmp 0x4e69ea
mov dword [esp + ecx + 0x50], eax
lea edi, [esp + 0x54]
xor ecx, ecx
lea ebx, [esp + 0x9c]
mov dword [esp + 0x98], ecx
sub edx, 1
je 0x4e6ab2
lea esp, [esp]
mov eax, dword [edi]
lea edi, [edi + 4]
add ecx, eax
lea ebx, [ebx + 4]
mov dword [ebx - 4], ecx
sub edx, 1
jne 0x4e6aa0
push 0x480
lea eax, [esp + 0x160]
push 0
push eax
call fcn.00532770
add esp, 0xc
xor ecx, ecx
jmp 0x4e6ad0
mov edx, dword [esi]
lea esi, [esi + 4]
test edx, edx
je 0x4e6aef
mov eax, dword [esp + edx*4 + 0x94]
mov dword [esp + eax*4 + 0x15c], ecx
inc eax
mov dword [esp + edx*4 + 0x94], eax
inc ecx
cmp ecx, ebp
jb 0x4e6ad0
mov eax, dword [esp + 0x2c]
xor edx, edx
mov ebx, dword [esp + 0x24]
or edi, 0xffffffff
xor esi, esi
mov dword [esp + 0x20], 0
xor ebp, ebp
mov dword [esp + 0x30], edi
mov eax, dword [esp + eax + 0x94]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x15c]
mov dword [esp + 0x94], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0xd8], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0x11c], edx
cmp ebx, dword [esp + 0x28]
jg 0x4e6de4
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x50]
lea eax, [eax + ebx*4]
mov dword [esp + 0x34], eax
mov eax, dword [eax]
test eax, eax
je 0x4e6dcc
jmp 0x4e6b70
mov dword [esp + 0x44], eax
dec eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + edi*4 + 0xdc]
add eax, edx
cmp ebx, eax
jle 0x4e6cad
lea ebx, [ebx]
mov eax, dword [esp + edi*4 + 0xdc]
mov esi, ecx
add edx, eax
inc edi
mov eax, dword [esp + 0x40]
sub esi, edx
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], edx
mov eax, dword [eax]
cmp esi, eax
jbe 0x4e6bb2
mov esi, eax
sub ebx, edx
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp eax, dword [esp + 0x44]
jbe 0x4e6bec
mov edx, dword [esp + 0x34]
or ecx, 0xffffffff
sub ecx, dword [esp + 0x2c]
inc ebx
add eax, ecx
cmp ebx, esi
jae 0x4e6be8
mov ecx, dword [edx + 4]
lea edx, [edx + 4]
add eax, eax
cmp eax, ecx
jbe 0x4e6be8
inc ebx
sub eax, ecx
cmp ebx, esi
jb 0x4e6bd5
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x38]
lea eax, [edx + ebx]
cmp eax, ecx
jbe 0x4e6bff
cmp edx, ecx
jae 0x4e6bff
mov ebx, ecx
sub ebx, edx
mov ecx, ebx
mov dword [esp + edi*4 + 0xdc], ebx
mov ebp, 1
shl ebp, cl
lea eax, [ebp*8 + 8]
push eax
call fcn.005398b8
add esp, 4
test eax, eax
je 0x4e6e11
mov ecx, dword [esp + 0x3c]
lea esi, [eax + 8]
add eax, 4
mov dword [esp + edi*4 + 0x11c], esi
mov dword [esp + 0x3c], eax
mov dword [ecx], esi
mov dword [eax], 0
test edi, edi
je 0x4e6c96
mov eax, dword [esp + 0x20]
mov edx, 1
mov ecx, dword [esp + 0x10]
shl edx, cl
sub ecx, dword [esp + edi*4 + 0xd8]
dec edx
and edx, dword [esp + 0x20]
mov dword [esp + edi*4 + 0x94], eax
mov al, byte [esp + edi*4 + 0xd8]
mov byte [esp + 0x15], al
lea eax, [ebx + 0x20]
shr edx, cl
mov byte [esp + 0x14], al
mov eax, dword [esp + edi*4 + 0x118]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], esi
mov dword [eax + edx*8], ecx
mov ecx, esi
mov dword [eax + edx*8 + 4], ecx
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
lea eax, [edx + ebx]
mov ebx, dword [esp + 0x24]
cmp ebx, eax
jg 0x4e6b90
mov al, bl
sub al, dl
mov byte [esp + 0x15], al
mov eax, dword [esp + 0x48]
lea eax, [esp + eax*4 + 0x15c]
cmp dword [esp + 0x1c], eax
jb 0x4e6ccd
mov byte [esp + 0x14], 0x63
jmp 0x4e6d23
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
add eax, 4
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x5ec]
cmp ecx, eax
jae 0x4e6cfb
cmp ecx, 0x100
mov word [esp + 0x18], cx
setb al
add al, 0x1f
mov byte [esp + 0x14], al
jmp 0x4e6d23
sub ecx, eax
mov eax, dword [esp + 0x5f4]
mov al, byte [ecx + eax]
mov byte [esp + 0x14], al
mov eax, dword [esp + 0x5f0]
mov ax, word [eax + ecx*2]
mov word [esp + 0x18], ax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov ecx, ebx
sub ecx, edx
mov ebx, 1
shl ebx, cl
mov ecx, edx
shr eax, cl
cmp eax, ebp
jae 0x4e6d57
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov dword [esi + eax*8], ecx
mov dword [esi + eax*8 + 4], edi
add eax, ebx
cmp eax, ebp
jb 0x4e6d42
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
mov eax, 1
mov ebx, dword [esp + 0x20]
lea ecx, [ecx - 1]
shl eax, cl
test ebx, eax
je 0x4e6d78
lea ecx, [ecx]
xor ebx, eax
shr eax, 1
test ebx, eax
jne 0x4e6d70
xor ebx, eax
mov ecx, edx
mov eax, 1
mov dword [esp + 0x20], ebx
shl eax, cl
dec eax
and eax, ebx
cmp eax, dword [esp + edi*4 + 0x94]
je 0x4e6db8
sub edx, dword [esp + edi*4 + 0xd8]
dec edi
mov eax, 1
mov ecx, edx
shl eax, cl
dec eax
and eax, ebx
cmp eax, dword [esp + edi*4 + 0x94]
jne 0x4e6d93
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
test eax, eax
jne 0x4e6b70
mov eax, dword [esp + 0x34]
inc ebx
add eax, 4
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], eax
cmp ebx, ecx
jle 0x4e6b61
cmp dword [esp + 0x4c], 0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0xdc]
mov dword [ecx], eax
je 0x4e69e8
cmp dword [esp + 0x28], 1
je 0x4e69e8
mov eax, 1
jmp 0x4e69ea
test edi, edi
je 0x4e6e35
mov eax, dword [esp + 0x11c]
test eax, eax
je 0x4e6e35
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.0053867f
add esp, 4
mov eax, esi
test esi, esi
jne 0x4e6e20
mov eax, 3
jmp 0x4e69ea