Function at 0x546148
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
mov ebx, dword [ebp + 0x10]
test ebx, ebx
js 0x546161
shr ebx, 2
mov esi, dword [ecx + ebx*4]
dec ebx
push esi
jns 0x54615a
mov ecx, esp
mov dword [ebp - 9], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 8
mov eax, dword [ebp - 9]
mov edx, dword [ebp + 0xc]
mov cl, byte [eax]
mov byte [edx], cl
inc edx
inc eax
dec dword [ebp - 0x10]
jne 0x546179
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00545b04
cmp byte [ebp - 5], 0
jne 0x546254
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, 4
mov edx, dword [ebp + 0xc]
lea esi, [ebp - 0x14]
mov cl, byte [edx]
mov byte [esi], cl
inc esi
inc edx
dec eax
jne 0x5461ac
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
mov cl, byte [edx]
mov byte [edx - 4], cl
inc edx
dec eax
jne 0x5461c0
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 4]
lea eax, [edx + eax*2 + 0x30]
push eax
push 5
lea eax, [ebp - 0x18]
push eax
push 3
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00546010
mov eax, 4
lea edx, [ebp - 0x14]
lea esi, [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
add ecx, 4
mov bl, byte [edx]
xor bl, byte [esi]
mov byte [ecx], bl
inc ecx
inc esi
inc edx
dec eax
jne 0x5461fe
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x10
jne 0x5461a1
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
lea ecx, [ebp - 0x14]
mov bl, byte [edx]
mov byte [ecx], bl
inc ecx
inc edx
dec eax
jne 0x546221
mov eax, 4
mov edx, dword [ebp + 0xc]
mov cl, byte [edx]
mov byte [edx + 4], cl
inc edx
dec eax
jne 0x546232
mov eax, 4
lea edx, [ebp - 0x14]
mov ecx, dword [ebp + 0xc]
mov bl, byte [edx]
mov byte [ecx], bl
inc ecx
inc edx
dec eax
jne 0x546246
jmp 0x546313
cmp byte [ebp - 5], 1
jne 0x546313
mov dword [ebp - 0x10], 0xf
mov eax, 4
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
mov bl, byte [edx]
mov byte [ecx], bl
inc ecx
inc edx
dec eax
jne 0x546270
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
mov cl, byte [edx]
mov byte [edx - 4], cl
inc edx
dec eax
jne 0x546284
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 4]
lea eax, [edx + eax*2 + 0x30]
push eax
push 5
lea eax, [ebp - 0x18]
push eax
push 3
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00546010
mov eax, 4
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x18]
mov esi, dword [ebp + 0xc]
add esi, 4
mov bl, byte [edx]
xor bl, byte [ecx]
mov byte [esi], bl
inc esi
inc ecx
inc edx
dec eax
jne 0x5462c2
dec dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xffffffff
jne 0x546265
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
lea ecx, [ebp - 0x14]
mov bl, byte [edx]
mov byte [ecx], bl
inc ecx
inc edx
dec eax
jne 0x5462e5
mov eax, 4
mov edx, dword [ebp + 0xc]
mov cl, byte [edx]
mov byte [edx + 4], cl
inc edx
dec eax
jne 0x5462f6
mov eax, 4
lea edx, [ebp - 0x14]
mov ecx, dword [ebp + 0xc]
mov bl, byte [edx]
mov byte [ecx], bl
inc ecx
inc edx
dec eax
jne 0x54630a
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00545b88
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret 0xc