Function at 0x4b9150
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1054
call fcn.00585720
mov eax, dword [0x6019e4]
xor eax, esp
mov dword [esp + 0x1050], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x3c], eax
mov ebx, 0x80
mov dword [esp + 0x2c], edx
xor ecx, ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x20], ebx
mov esi, 0xfffffffc
mov eax, dword [edi + 0xc8]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4b91a1
mov ecx, dword [eax]
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [ebp + 0xc], eax
jne 0x4b91bd
cmp edx, 9
je 0x4b91b6
cmp edx, 0xa
jne 0x4b91bd
or eax, 0xffffffff
mov dword [esp + 0x18], eax
cmp dword [edi + 0xcc], 0
je 0x4b9457
test ecx, ecx
je 0x4b9457
call fcn.004b9060
cmp dword [edi + 0x68], 0
mov dword [esp + 0x28], eax
jne 0x4b91f6
mov eax, dword [edi + 0xcc]
xor ecx, ecx
cmp dword [eax + 0x21c], ecx
cmovne ebx, ecx
mov dword [esp + 0x20], ebx
mov eax, dword [edi + 0xcc]
push 0xffffffffffffffff
push dword [eax + 0x204]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x18]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jge 0x4b9441
mov dword [esp + 0x24], 0x1000
mov esi, dword [esp + 0x3c]
xor ecx, ecx
test eax, eax
cmovns ecx, eax
mov eax, edx
sub eax, ecx
add esi, ecx
cmp eax, 0x1000
mov dword [esp + 0x30], esi
mov edi, eax
cmovg edi, dword [esp + 0x24]
cmovg eax, dword [esp + 0x24]
add eax, ecx
mov dword [esp + 0x34], edi
cmp eax, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x4c]
push edi
mov edx, ebx
jl 0x4b93f1
or edx, 0x8000
cmp dword [eax + 4], 0
jne 0x4b9276
push dword [esp + 0x30]
jmp 0x4b927f
mov dword [eax + 4], 0
push 0
call fcn.004c6720
add esp, 8
mov dword [esp + 0x14], eax
test bx, bx
je 0x4b940b
lea eax, [esp + 0x10]
push 4
push eax
call fcn.004e3140
mov eax, dword [esp + 0x18]
add esp, 8
movd xmm0, eax
pshufd xmm1, xmm0, 0
test edi, edi
jle 0x4b93ba
mov ebx, edi
xor ecx, ecx
sar ebx, 2
mov dword [esp + 0x48], ebx
test ebx, ebx
jle 0x4b9386
cmp ebx, 8
jb 0x4b935f
lea edx, [ebx - 1]
lea eax, [esp + 0x58]
lea edx, [esi + edx*4]
cmp eax, edx
mov eax, dword [esp + 0x10]
ja 0x4b92ee
lea edx, [esp + ebx*4 + 0x54]
cmp edx, esi
jae 0x4b935f
mov edx, ebx
and edx, reloc.WS2_32.dll_getsockopt
jns 0x4b92fd
dec edx
or edx, 0xfffffff8
inc edx
mov dword [esp + 0x1c], ebx
lea eax, [esp + 0x58]
sub dword [esp + 0x1c], edx
mov edx, dword [esp + 0x30]
neg edx
add eax, edx
mov dword [esp + 0x40], eax
lea eax, [esp + 0x68]
mov edi, dword [esp + 0x40]
add eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x44]
nop
movups xmm0, xmmword [esi]
add ecx, 8
lea esi, [esi + 0x20]
pxor xmm0, xmm1
movups xmmword [edi + esi - 0x20], xmm0
movups xmm0, xmmword [esi - 0x10]
pxor xmm0, xmm1
movups xmmword [ebx + esi - 0x20], xmm0
cmp ecx, edx
jl 0x4b9330
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x30]
cmp ecx, ebx
jge 0x4b9386
mov edi, esi
lea edx, [esp + 0x58]
sub edi, edx
nop dword [eax + eax]
lea edx, [edi + ecx*4]
mov edx, dword [esp + edx + 0x58]
xor edx, eax
mov dword [esp + ecx*4 + 0x58], edx
inc ecx
cmp ecx, ebx
jl 0x4b9370
mov edi, dword [esp + 0x34]
shl ecx, 2
cmp ecx, edi
jge 0x4b93b6
lea eax, [esp + 0x58]
sub esi, eax
mov edx, ecx
lea eax, [esi + ecx]
and edx, reloc.WS2_32.dll_closesocket
jns 0x4b93a5
dec edx
or edx, 0xfffffffc
inc edx
mov al, byte [esp + eax + 0x58]
xor al, byte [esp + edx + 0x10]
mov byte [esp + ecx + 0x58], al
inc ecx
cmp ecx, edi
jl 0x4b9393
mov ebx, dword [esp + 0x20]
push 2
push edi
mov edi, dword [esp + 0x40]
lea eax, [esp + 0x60]
push eax
push 2
push 4
lea eax, [esp + 0x24]
push eax
push 2
push dword [esp + 0x30]
lea eax, [esp + 0x6c]
push eax
push 0x40000003
push 0
push dword [edi + 0xcc]
call fcn.004aa920
add esp, 0x30
jmp 0x4b9430
cmp dword [eax + 4], 0
jne 0x4b927d
push dword [esp + 0x30]
mov dword [eax + 4], 1
jmp 0x4b927f
push 2
push edi
mov edi, dword [esp + 0x40]
push esi
push 2
push eax
lea eax, [esp + 0x60]
push eax
push 0x40000002
push 0
push dword [edi + 0xcc]
call fcn.004aa920
add esp, 0x24
mov edx, dword [ebp + 0xc]
mov esi, eax
mov eax, dword [esp + 0x18]
cmp eax, edx
jl 0x4b9221
mov eax, dword [edi + 0xcc]
push 0
push 1
push dword [eax + 0x204]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [esp + 0x105c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005852a8
mov esp, ebp
pop ebp
ret