Function at 0x4bf040
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xac
mov eax, dword [0x641030]
xor eax, esp
mov dword [esp + 0xa8], eax
cmp dword [ecx + 0x40], 3
mov eax, dword [esp + 0xb8]
mov edx, dword [esp + 0xbc]
push ebx
push ebp
mov ebp, dword [esp + 0xb8]
push esi
mov esi, dword [esp + 0xd0]
push edi
mov edi, dword [esp + 0xc4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], esi
jne 0x4bf0ac
mov ebx, dword [esp + 0xd8]
push ebx
push esi
mov esi, dword [esp + 0xd8]
push esi
push edx
push eax
push edi
push ebp
call fcn.004bee50
jmp 0x4bf28b
push eax
call fcn.004142c0
mov ebx, eax
mov eax, dword [esp + 0xd4]
add eax, ebx
mov dword [esp + 0x18], eax
add eax, 0x14
add esp, 4
cmp eax, 0x80
ja 0x4bf28b
mov ecx, dword [esp + 0x10]
lea eax, [edi + 1]
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push ebx
sub edi, esi
push ecx
lea edx, [esp + 0x54]
add edi, ebp
push edx
mov dword [esp + 0x28], edi
call fcn.00554d40
mov eax, dword [esp + 0xdc]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea edx, [esp + ebx + 0x60]
push edx
call fcn.00554d40
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x54]
push eax
push ecx
lea edx, [esp + 0x6c]
push edx
push esi
push ebp
call fcn.00473110
mov ebx, dword [esp + 0x104]
add esp, 0x2c
test ebx, ebx
jle 0x4bf1b2
mov edi, dword [esp + 0x20]
mov eax, 0x10
sub eax, edi
mov dword [esp + 0x18], eax
lea eax, [ebx - 1]
shr eax, 4
inc eax
mov dword [esp + 0x10], eax
lea ecx, [ecx]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
add eax, 0x10
push eax
lea ecx, [esp + 0x44]
push ecx
push esi
push ebp
call fcn.00473110
lea edx, [esp + 0x50]
push edx
push 0x10
mov eax, edx
push eax
push esi
push ebp
call fcn.00473110
mov ecx, dword [esp + 0x40]
add ecx, edi
add esp, 0x28
cmp ecx, ebx
jle 0x4bf201
mov eax, ebx
and eax, reloc.WS2_32.dll_ntohs
jns 0x4bf195
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jle 0x4bf1a8
push eax
lea edx, [esp + 0x28]
push edx
push edi
call fcn.00554d40
add esp, 0xc
add edi, 0x10
sub dword [esp + 0x10], 1
jne 0x4bf150
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x38]
push eax
push edi
lea ecx, [esp + 0x54]
push ecx
push esi
push edx
call fcn.00473140
add esp, 0x14
test ebx, ebx
jle 0x4bf28b
lea ecx, [ebx - 1]
mov eax, 0xcccccccd
mul ecx
add edi, 0x14
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x20]
mov ebp, 0x14
sub ebp, edi
shr edx, 4
inc edx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], edx
jmp 0x4bf214
mov eax, 0x10
jmp 0x4bf199
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x40]
push ecx
push esi
push edx
call fcn.00473140
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x4c]
push eax
push 0x14
mov ecx, eax
push ecx
push esi
push edx
call fcn.00473140
add ebp, edi
add esp, 0x28
cmp ebp, ebx
jle 0x4bf26a
mov eax, 0x66666667
imul ebx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov ebp, ebx
sub ebp, eax
jmp 0x4bf26f
mov ebp, 0x14
xor eax, eax
test ebp, ebp
jle 0x4bf281
mov cl, byte [esp + eax + 0x24]
xor byte [edi + eax], cl
inc eax
cmp eax, ebp
jl 0x4bf275
add edi, 0x14
sub dword [esp + 0x10], 1
jne 0x4bf210
mov ecx, dword [esp + 0xb8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005550b0
add esp, 0xac
ret 0x1c