Function at 0x4968d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push ebx
mov ebx, dword [esp + 0x44]
push ebp
push esi
test bl, 4
push edi
mov esi, ecx
je 0x496b9a
mov edx, dword [esp + 0x54]
xor ebp, ebp
xor eax, eax
cmp edx, ebp
mov dword [esp + 0x50], ebp
je 0x496924
cmp byte [edx], 0
je 0x496924
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x10
mov dword [esp + 0x50], ecx
jl 0x496916
mov dword [esp + 0x50], 0x10
mov eax, dword [esp + 0x50]
push eax
push edx
call fcn.0047c060
add esp, 8
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x34], eax
mov al, byte [esi]
mov dword [esp + 0x38], ebp
shr ebx, 8
and ebx, 3
mov dword [esp + 0x3c], ecx
test al, 1
mov dword [esp + 0x40], ebp
mov dword [esp + 0x1c], ebx
je 0x496a6c
mov eax, dword [esp + 0x4c]
xor ebx, ebx
cdq
sub eax, edx
sar eax, 1
cmp eax, ebp
mov dword [esp + 0x24], eax
jle 0x496b9a
mov edx, dword [esp + 0x48]
or ecx, 0xffffffff
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x10]
cmp word [edx], 0xffff
jne 0x496a47
mov eax, ecx
sub eax, ebx
add eax, 2
xor esi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], esi
jmp 0x496998
mov ecx, dword [esp + 0x4c]
xor ebp, ebp
cmp ebx, ecx
mov edi, ebx
jge 0x4969fb
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + esi + 0x34]
mov dword [esp + 0x20], ecx
lea esi, [edx + ebx*2]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x58]
push edx
mov edx, dword [0x67a960]
push ecx
mov ecx, dword [esp + 0x28]
or edx, ecx
add eax, 0xfffffffe
push edx
push eax
mov eax, edi
xor ecx, ecx
mov cx, word [esi]
sub eax, ebx
push eax
push ecx
call fcn.00496720
add esp, 0x1c
mov word [esi], ax
xor ebp, eax
mov eax, dword [esp + 0x4c]
inc edi
add esi, 2
cmp edi, eax
mov eax, dword [esp + 0x18]
jl 0x4969af
mov esi, dword [esp + 0x14]
mov edx, dword [esp + esi + 0x3c]
xor ecx, ecx
test edx, edx
jbe 0x496a15
mov edi, dword [esp + 0x54]
movzx di, byte [ecx + edi]
xor ebp, edi
inc ecx
cmp ecx, edx
jb 0x496a05
mov ecx, dword [esp + 0x10]
cmp bp, word [ecx - 2]
je 0x496a2f
add esi, 4
cmp esi, 8
mov dword [esp + 0x14], esi
jl 0x496994
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x24]
mov word [ecx - 2], 9
mov word [ecx], 0xa
lea ebx, [edx + 2]
mov ecx, edx
mov edi, dword [esp + 0x10]
inc ecx
add edi, 2
mov dword [esp + 0x4c], ecx
lea edx, [ecx + 1]
mov dword [esp + 0x10], edi
cmp edx, eax
jl 0x496972
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 0x10
mov ecx, dword [esp + 0x4c]
xor eax, eax
xor edx, edx
cmp ecx, ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
jle 0x496b9a
mov edi, dword [esp + 0x48]
or ecx, 0xffffffff
mov ebx, 1
sub ecx, edi
mov esi, edi
sub ebx, edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], ebx
cmp byte [esi], 0xa
jne 0x496b84
sub eax, edx
mov dword [esp + 0x48], 0
inc eax
add ecx, esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov ebp, ecx
jmp 0x496ac8
mov ecx, dword [esp + 0x24]
xor bl, bl
cmp edx, ebp
mov esi, edx
jge 0x496b1a
mov ebp, dword [esp + 0x48]
mov ebp, dword [esp + ebp + 0x34]
mov dword [esp + 0x28], ebp
mov ebp, ecx
mov ecx, dword [esp + 0x28]
add eax, 0xfffffffe
push ecx
mov ecx, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x28]
push ecx
push eax
movsx ecx, byte [esi + edi]
mov eax, esi
sub eax, edx
push eax
push ecx
call fcn.00496720
mov edx, dword [esp + 0x2c]
add esp, 0x1c
mov byte [esi + edi], al
xor bl, al
mov eax, dword [esp + 0x20]
inc esi
cmp esi, ebp
jl 0x496ade
mov esi, dword [esp + 0x48]
xor ecx, ecx
mov esi, dword [esp + esi + 0x3c]
test esi, esi
mov dword [esp + 0x28], esi
jbe 0x496b3c
mov esi, dword [esp + 0x54]
xor bl, byte [ecx + esi]
mov esi, dword [esp + 0x28]
inc ecx
cmp ecx, esi
jb 0x496b2c
mov ecx, dword [esp + 0x14]
or bl, 0x80
cmp bl, byte [ecx - 1]
je 0x496b60
mov ecx, dword [esp + 0x48]
add ecx, 4
cmp ecx, 8
mov dword [esp + 0x48], ecx
jl 0x496ac4
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
add eax, ecx
mov byte [edx + edi - 1], 0x2c
mov byte [ecx], 0xa
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x10], eax
mov edx, eax
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x4c]
inc eax
inc esi
cmp eax, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], esi
jl 0x496aa2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 0x10