Function at 0x4b7eb9
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x556400]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xd8], eax
mov eax, dword [esi]
push edi
mov dword [ebp - 0xc8], esi
and dword [eax + 8], 0
cmp ebx, 4
ja 0x4b867b
push esi
call fcn.004bb57f
pop ecx
test eax, eax
jne 0x4b7f1b
push esi
call fcn.004b9bb3
jmp 0x4b8685
xor edi, edi
inc edi
push 3
pop edx
test ebx, ebx
jne 0x4b7f32
mov eax, dword [esi]
mov ebx, edi
cmp dword [eax + 8], edx
cmovge ebx, edx
mov dword [ebp + 0x18], ebx
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov dword [ebp - 0xb8], eax
cmp eax, edx
jne 0x4b7f65
cmp dword [esi + 0x47ec], edx
je 0x4b7f5b
cmp dword [esi + 0x47e8], 0
jne 0x4b7f65
cmp dword [esi + 0x47e4], 0
jne 0x4b7f65
mov ecx, edi
mov dword [ebp - 0xc0], ecx
jmp 0x4b7f71
xor ecx, ecx
mov dword [ebp - 0xc0], ecx
cmp eax, edx
jne 0x4b7f81
cmp ebx, edx
jge 0x4b7f81
test ecx, ecx
jne 0x4b7f81
mov eax, edi
mov dword [ebp - 0xb8], edi
and dword [ebp - 0xb0], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x14], xmm0
test eax, eax
jle 0x4b8094
lea eax, [esi + 0x46a0]
lea edi, [ebp - 0x84]
mov dword [ebp - 0xa4], eax
mov eax, dword [esi]
mov eax, dword [eax]
add eax, edx
push eax
call fcn.004beea9
pop ecx
mov ecx, dword [ebp - 0xa4]
mov dword [ecx + 0x34], eax
test eax, eax
je 0x4b80b1
mov eax, dword [esi + 0x4684]
cdq
idiv dword [ecx]
and dword [edi + 0xc], 0
mov dword [ebp - 0x98], eax
mov dword [edi - 4], eax
mov eax, dword [esi + 0x4688]
cdq
idiv dword [ecx + 4]
xor edx, edx
mov ecx, eax
mov dword [ebp - 0xb4], eax
sar ecx, 1
mov dword [edi], eax
mov eax, dword [ebp - 0x98]
mov dword [edi + 8], ecx
dec eax
mov ecx, dword [esi]
add eax, dword [ecx]
div dword [ebp - 0x98]
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x98]
mov dword [edi + 4], eax
mov eax, dword [ecx + 0x28]
mov dword [edi - 8], eax
mov dword [edi - 0xc], eax
mov eax, dword [ebp - 0xb4]
cmp edx, 1
jne 0x4b8043
cmp eax, edx
jne 0x4b8037
mov eax, 0x4b8697
jmp 0x4b8066
cmp eax, 2
jne 0x4b8043
mov eax, 0x4c289b
jmp 0x4b8066
cmp edx, 2
jne 0x4b8061
cmp eax, 1
jne 0x4b8054
mov eax, 0x4c25cb
jmp 0x4b8066
cmp eax, 2
jne 0x4b8061
mov eax, dword [esi + 0x4814]
jmp 0x4b8066
mov eax, 0x4c258f
mov dword [edi - 0x10], eax
add ecx, 0x48
mov eax, dword [ebp - 0xb0]
add edi, 0x20
inc eax
mov dword [ebp - 0xa4], ecx
push 3
mov dword [ebp - 0xb0], eax
pop edx
cmp eax, dword [ebp - 0xb8]
jl 0x4b7fa9
xor edi, edi
inc edi
mov eax, dword [esi]
push edi
push dword [eax + 4]
push dword [eax]
push ebx
call fcn.004beedd
mov edx, eax
add esp, 0x10
mov dword [ebp - 0xcc], edx
test edx, edx
jne 0x4b80c3
push esi
call fcn.004b9bb3
mov dword [esp], str.outofmem
jmp 0x4b8680
mov eax, dword [esi]
xor ecx, ecx
mov dword [ebp - 0x98], ecx
cmp dword [eax + 4], ecx
jbe 0x4b863c
mov edi, dword [eax]
imul edi, ecx
imul edi, ebx
add edi, edx
xor edx, edx
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x9c], edx
cmp dword [ebp - 0xb8], edx
jle 0x4b81ca
mov edi, dword [ebp - 0xb8]
lea eax, [esi + 0x46bc]
mov dword [ebp - 0xa8], eax
lea ebx, [ebp - 0x7c]
mov esi, eax
mov eax, dword [ebx - 8]
lea ecx, [ebx - 0x10]
sar eax, 1
lea edx, [ebx - 0x14]
mov dword [ebp - 0xa8], ecx
mov dword [ebp - 0xc4], edx
cmp dword [ebx], eax
jl 0x4b8138
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0xa4], ecx
jmp 0x4b814e
mov eax, ecx
mov dword [ebp - 0xc4], edx
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa8], eax
mov eax, dword [ecx]
push dword [ebx - 0xc]
push dword [ebx - 4]
push eax
push dword [edx]
push dword [esi + 0x18]
call dword [ebx - 0x18]
mov ecx, dword [ebp - 0x9c]
add esp, 0x14
mov dword [ebp + ecx*4 - 0x14], eax
mov eax, dword [ebx]
inc eax
mov dword [ebx], eax
cmp eax, dword [ebx - 8]
jl 0x4b819e
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xc4]
and dword [ebx], 0
inc dword [ebx + 4]
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [ebx + 4]
cmp eax, dword [esi]
jge 0x4b819e
mov eax, dword [esi + 4]
add eax, edx
mov edx, dword [ebp - 0xa8]
mov dword [edx], eax
inc ecx
add ebx, 0x20
add esi, 0x48
mov dword [ebp - 0x9c], ecx
cmp ecx, edi
jl 0x4b8111
mov esi, dword [ebp - 0xc8]
xor edx, edx
mov edi, dword [ebp - 0xa0]
mov ebx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x98]
mov eax, dword [esi]
cmp ebx, 3
jl 0x4b83e1
cmp dword [eax + 8], 3
jne 0x4b8261
cmp dword [ebp - 0xc0], 0
je 0x4b8246
cmp dword [eax], 0
jbe 0x4b8621
mov ecx, dword [ebp - 0x10]
add edi, 2
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0xa4], esi
sub dword [ebp - 0xa4], ecx
mov esi, dword [ebp - 0xc8]
mov dword [ebp - 0xa0], eax
mov al, byte [ecx + eax]
mov byte [edi - 2], al
mov al, byte [ecx]
mov byte [edi - 1], al
mov eax, dword [ebp - 0xa4]
mov al, byte [ecx + eax]
mov byte [edi], al
mov byte [edi + 1], 0xff
add edi, ebx
mov eax, dword [esi]
inc edx
inc ecx
cmp edx, dword [eax]
mov eax, dword [ebp - 0xa0]
jb 0x4b8217
jmp 0x4b861b
push ebx
push dword [eax]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push edi
call dword [esi + 0x4810]
add esp, 0x18
jmp 0x4b861b
cmp dword [eax + 8], 4
jne 0x4b83b6
mov ecx, dword [esi + 0x47e8]
test ecx, ecx
jne 0x4b8322
mov dword [ebp - 0x9c], edx
cmp dword [eax], edx
jbe 0x4b861b
mov edx, dword [ebp - 0x14]
add edi, 2
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub ecx, edx
mov dword [ebp - 0xa0], ecx
sub eax, edx
mov ecx, dword [ebp - 0xc]
sub ecx, edx
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xac], ecx
mov al, byte [edx + eax]
mov byte [ebp - 0xbc], al
push dword [ebp - 0xbc]
movzx eax, byte [edx]
push eax
call fcn.004b89ec
push dword [ebp - 0xbc]
mov byte [edi - 2], al
mov eax, dword [ebp - 0xa0]
movzx eax, byte [edx + eax]
push eax
call fcn.004b89ec
push dword [ebp - 0xbc]
mov byte [edi - 1], al
mov eax, dword [ebp - 0xac]
movzx eax, byte [edx + eax]
push eax
call fcn.004b89ec
mov ecx, dword [ebp - 0x9c]
add esp, 0x18
mov byte [edi], al
mov byte [edi + 1], 0xff
add edi, ebx
mov eax, dword [esi]
inc ecx
inc edx
mov dword [ebp - 0x9c], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xa8]
jb 0x4b82ae
jmp 0x4b861b
mov eax, dword [eax]
mov edx, dword [esi + 0x4810]
push ebx
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push edi
cmp ecx, 2
jne 0x4b83af
call edx
mov eax, dword [esi]
xor edx, edx
add esp, 0x18
cmp dword [eax], edx
jbe 0x4b861b
add edi, 2
mov eax, dword [ebp - 8]
mov al, byte [edx + eax]
mov byte [ebp - 0xb0], al
mov al, byte [edi - 2]
push dword [ebp - 0xb0]
not al
movzx eax, al
push eax
call fcn.004b89ec
push dword [ebp - 0xb0]
mov byte [edi - 2], al
mov al, byte [edi - 1]
not al
movzx eax, al
push eax
call fcn.004b89ec
push dword [ebp - 0xb0]
mov byte [edi - 1], al
mov al, byte [edi]
not al
movzx eax, al
push eax
call fcn.004b89ec
mov byte [edi], al
add esp, 0x18
mov eax, dword [esi]
add edi, ebx
inc edx
cmp edx, dword [eax]
jb 0x4b834f
jmp 0x4b861b
call edx
jmp 0x4b8259
mov ecx, edx
cmp dword [eax], edx
jbe 0x4b861b
inc edi
mov eax, dword [ebp - 0x14]
mov al, byte [ecx + eax]
mov byte [edi + 1], al
mov byte [edi], al
mov byte [edi - 1], al
mov byte [edi + 2], 0xff
add edi, ebx
mov eax, dword [esi]
inc ecx
cmp ecx, dword [eax]
jb 0x4b83c1
jmp 0x4b861b
cmp dword [ebp - 0xc0], 0
je 0x4b84b5
mov eax, dword [eax]
cmp ebx, 1
jne 0x4b8456
mov dword [ebp - 0xa0], edx
test eax, eax
je 0x4b8621
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
sub eax, edx
mov ebx, dword [ebp - 0xa0]
sub ecx, edx
mov dword [ebp - 0xac], eax
sub edi, edx
mov dword [ebp - 0x9c], ecx
movzx eax, byte [edx + eax]
push eax
movzx eax, byte [edx]
push eax
movzx eax, byte [edx + ecx]
push eax
call fcn.004b9f31
mov ecx, dword [ebp - 0x9c]
add esp, 0xc
mov byte [edx + edi], al
inc ebx
mov eax, dword [esi]
inc edx
cmp ebx, dword [eax]
mov eax, dword [ebp - 0xac]
jb 0x4b8424
jmp 0x4b8618
mov dword [ebp - 0x9c], edx
test eax, eax
je 0x4b8621
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
sub ebx, edx
sub ecx, edx
mov dword [ebp - 0xa0], ecx
movzx eax, byte [ebx + edx]
push eax
movzx eax, byte [edx]
push eax
movzx eax, byte [ecx + edx]
push eax
call fcn.004b9f31
mov ecx, dword [ebp - 0x9c]
add esp, 0xc
mov byte [edi], al
inc ecx
mov byte [edi + 1], 0xff
lea edi, [edi + 2]
mov eax, dword [esi]
inc edx
mov dword [ebp - 0x9c], ecx
cmp ecx, dword [eax]
mov ecx, dword [ebp - 0xa0]
jb 0x4b8477
jmp 0x4b8618
cmp dword [eax + 8], 4
jne 0x4b85dd
mov ecx, dword [esi + 0x47e8]
test ecx, ecx
jne 0x4b8584
mov dword [ebp - 0x9c], edx
cmp dword [eax], edx
jbe 0x4b861b
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub ecx, edx
mov dword [ebp - 0xa0], ecx
sub eax, edx
mov ecx, dword [ebp - 0x14]
sub ecx, edx
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xac], ecx
mov al, byte [eax + edx]
mov byte [ebp - 0xb4], al
push dword [ebp - 0xb4]
movzx eax, byte [edx]
push eax
call fcn.004b89ec
pop ecx
pop ecx
movzx eax, al
push eax
mov eax, dword [ebp - 0xa0]
push dword [ebp - 0xb4]
movzx eax, byte [eax + edx]
push eax
call fcn.004b89ec
pop ecx
pop ecx
movzx eax, al
push eax
mov eax, dword [ebp - 0xac]
push dword [ebp - 0xb4]
movzx eax, byte [eax + edx]
push eax
call fcn.004b89ec
pop ecx
pop ecx
movzx eax, al
push eax
call fcn.004b9f31
mov ecx, dword [ebp - 0x9c]
add esp, 0xc
mov byte [edi], al
mov byte [edi + 1], 0xff
add edi, ebx
mov eax, dword [esi]
inc ecx
inc edx
mov dword [ebp - 0x9c], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xa8]
jb 0x4b84ff
jmp 0x4b861b
cmp ecx, 2
jne 0x4b85dd
mov dword [ebp - 0x9c], edx
cmp dword [eax], edx
jbe 0x4b861b
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
sub eax, edx
mov dword [ebp - 0xa0], eax
movzx eax, byte [eax + edx]
push eax
mov al, byte [edx]
not al
movzx eax, al
push eax
call fcn.004b89ec
mov byte [edi], al
pop ecx
mov byte [edi + 1], 0xff
add edi, ebx
mov eax, dword [esi]
pop ecx
mov ecx, dword [ebp - 0x9c]
inc ecx
inc edx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x9c], ecx
jb 0x4b85a5
jmp 0x4b861b
mov eax, dword [eax]
cmp ebx, 1
jne 0x4b85fc
test eax, eax
je 0x4b861b
mov ecx, dword [ebp - 0x14]
sub ecx, edi
mov al, byte [ecx + edi]
inc edx
mov byte [edi], al
inc edi
mov eax, dword [esi]
cmp edx, dword [eax]
jb 0x4b85ed
jmp 0x4b861b
mov ecx, edx
test eax, eax
je 0x4b861b
mov ebx, dword [ebp - 0x14]
mov al, byte [ecx + ebx]
inc ecx
mov byte [edi], al
lea edi, [edi + 2]
mov byte [edi - 1], 0xff
mov eax, dword [esi]
cmp ecx, dword [eax]
jb 0x4b8605
mov ebx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x98]
mov eax, dword [esi]
inc ecx
mov edx, dword [ebp - 0xcc]
mov dword [ebp - 0x98], ecx
cmp ecx, dword [eax + 4]
jb 0x4b80d6
xor edi, edi
inc edi
push esi
call fcn.004b9bb3
mov eax, dword [esi]
pop ecx
mov ecx, dword [ebp - 0xd0]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [esi]
mov ecx, dword [ebp - 0xd4]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov ecx, dword [ebp - 0xd8]
test ecx, ecx
je 0x4b8673
mov eax, dword [esi]
push 3
pop edx
cmp dword [eax + 8], edx
cmovge edi, edx
mov dword [ecx], edi
mov eax, dword [ebp - 0xcc]
jmp 0x4b8688
push str.bad_req_comp
call fcn.004bb7eb
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ec82b
leave
ret