Function at 0x473b40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x473b58
mov eax, 0xfffffffb
pop esi
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [esi + 4]
cmp edi, 2
je 0x473b72
cmp dword [esi + 8], 0
jne 0x473b72
pop edi
mov eax, 0xfffffffa
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x473e20
test eax, eax
jle 0x473e20
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
mov edx, edi
sub edx, 0
push ebx
mov dword [ebp - 8], eax
je 0x473dec
dec edx
je 0x473d3f
dec edx
je 0x473bb1
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x18]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
test eax, eax
jle 0x473e16
xor edi, edi
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov bl, byte [ebp - 0x1b]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x20], eax
push ecx
mov eax, ecx
mov dword [ebp - 0x24], edx
call fcn.004740f0
movzx eax, byte [ebp - 0x1c]
add al, al
mov dl, bl
shr dl, 7
or dl, al
mov al, byte [ebp - 0x1a]
mov byte [ebp - 0x1c], dl
mov cl, al
shr cl, 7
add bl, bl
or cl, bl
mov byte [ebp - 0x1b], cl
mov cl, byte [ebp - 0x19]
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x18]
mov byte [ebp - 0x1a], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x17]
mov byte [ebp - 0x19], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x16]
mov byte [ebp - 0x18], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x15]
mov byte [ebp - 0x17], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x14]
mov byte [ebp - 0x16], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x13]
mov byte [ebp - 0x15], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x12]
mov byte [ebp - 0x14], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x11]
mov byte [ebp - 0x13], dl
mov dl, cl
add al, al
shr dl, 7
add esp, 4
or dl, al
mov al, byte [ebp - 0x10]
mov byte [ebp - 0x12], dl
add cl, cl
mov dl, al
shr dl, 7
or dl, cl
mov cl, byte [ebp - 0xf]
mov ebx, dword [ebp + 8]
mov byte [ebp - 0x11], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0xe]
add cl, cl
mov byte [ebp - 0x10], dl
mov dl, al
shr dl, 7
or dl, cl
movzx ecx, byte [ebp - 0xd]
shr cl, 7
add al, al
or cl, al
mov byte [ebp - 0xe], cl
mov eax, edi
mov byte [ebp - 0xf], dl
shr eax, 3
movzx ebx, byte [eax + ebx]
mov edx, edi
and edx, 7
mov cl, 7
sub cl, dl
shr bl, cl
movzx ecx, byte [ebp - 0xd]
and bl, 1
add cl, cl
or bl, cl
mov byte [ebp - 0xd], bl
movzx ebx, byte [ebp - 0x2c]
and bl, 0x80
mov cl, dl
shr bl, cl
mov ecx, dword [ebp + 0xc]
inc edi
xor byte [eax + ecx], bl
cmp edi, 0x80
jl 0x473bd6
mov eax, dword [ebp - 4]
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x473bd4
mov eax, dword [ebp - 8]
pop ebx
pop edi
shl eax, 7
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x1c], edx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x14], edx
mov edx, dword [esi + 0x18]
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
test eax, eax
jle 0x473e16
mov eax, dword [ebp + 0xc]
lea ebx, [ecx + 8]
sub ecx, eax
add ecx, 0xfffffff8
lea edi, [eax + 8]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
add eax, edi
push eax
push esi
lea eax, [ebp - 0x2c]
call fcn.004744b0
mov edx, dword [ebp - 0x14]
xor dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x10]
xor dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x2c]
xor eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
xor ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + edi]
mov dword [edi - 8], eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx - 4]
mov dword [edi - 4], ecx
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebx]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
mov dword [edi], edx
mov eax, dword [ebx + 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x20]
dec eax
mov dword [edi + 4], ecx
add esp, 8
add ebx, 0x10
add edi, 0x10
mov dword [ebp - 4], eax
test eax, eax
jg 0x473d73
mov eax, dword [ebp - 8]
pop ebx
pop edi
shl eax, 7
pop esi
mov esp, ebp
pop ebp
ret
mov edi, eax
test eax, eax
jle 0x473e16
jmp 0x473df7
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ecx
push esi
call fcn.004744b0
add dword [ebp + 8], 0x10
add eax, 0x10
dec edi
add esp, 8
mov dword [ebp + 0xc], eax
test edi, edi
jg 0x473df4
mov eax, dword [ebp - 8]
pop ebx
pop edi
shl eax, 7
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret