Function at 0x434faa
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x4d71e4]
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 - 0xbc], esi
mov dword [ebp - 0xb0], ebx
and dword [eax + 8], 0
cmp ebx, 4
ja 0x43583a
push esi
call fcn.00438685
pop ecx
test eax, eax
jne 0x435013
push esi
call fcn.00436cc8
pop ecx
jmp 0x435844
mov eax, dword [esi]
xor edi, edi
inc edi
push 3
pop edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0xa4], ecx
test ebx, ebx
jne 0x435035
cmp ecx, edx
mov ebx, edi
cmovge ebx, edx
mov dword [ebp - 0xb0], ebx
cmp ecx, edx
jne 0x43505d
cmp dword [esi + 0x47ec], edx
je 0x435053
cmp dword [esi + 0x47e8], 0
jne 0x43505d
cmp dword [esi + 0x47e4], 0
jne 0x43505d
mov edx, edi
mov dword [ebp - 0xa8], edx
jmp 0x43506a
xor edx, edx
mov dword [ebp - 0xa8], edx
cmp ecx, 3
jne 0x43507b
cmp ebx, 3
jge 0x43507b
test edx, edx
jne 0x43507b
mov dword [ebp - 0xa4], edi
jmp 0x435089
mov dword [ebp - 0xa8], edx
test ecx, ecx
jle 0x435198
and dword [ebp - 0xb4], 0
lea eax, [esi + 0x46a0]
lea edi, [ebp - 0x88]
mov dword [ebp - 0x98], eax
mov eax, dword [esi]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.00484704
pop ecx
mov ecx, dword [ebp - 0x98]
mov dword [ecx + 0x34], eax
test eax, eax
je 0x4351bd
mov eax, dword [esi + 0x4684]
cdq
idiv dword [ecx]
and dword [edi + 0x10], 0
mov dword [ebp - 0x9c], eax
mov dword [edi], eax
mov eax, dword [esi + 0x4688]
cdq
idiv dword [ecx + 4]
xor edx, edx
mov ecx, eax
mov dword [ebp - 0xb8], eax
sar ecx, 1
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x9c]
mov dword [edi + 0xc], ecx
dec eax
mov ecx, dword [esi]
mov ecx, dword [ecx]
add eax, ecx
div dword [ebp - 0x9c]
mov ecx, dword [ebp - 0x98]
xor edx, edx
mov dword [edi + 8], eax
inc edx
mov eax, dword [ecx + 0x28]
mov dword [edi - 4], eax
mov dword [edi - 8], eax
mov eax, dword [ebp - 0x9c]
cmp eax, edx
jne 0x435141
mov eax, dword [ebp - 0xb8]
cmp eax, edx
jne 0x435135
mov eax, fcn.004029eb
jmp 0x435169
cmp eax, 2
jne 0x435164
mov eax, 0x43f9cc
jmp 0x435169
cmp eax, 2
jne 0x435164
mov eax, dword [ebp - 0xb8]
cmp eax, edx
jne 0x435157
mov eax, 0x43f6f9
jmp 0x435169
cmp eax, 2
jne 0x435164
mov eax, dword [esi + 0x4814]
jmp 0x435169
mov eax, 0x43f6bd
mov dword [edi - 0xc], eax
add ecx, 0x48
mov eax, dword [ebp - 0xb4]
add edi, 0x20
inc eax
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0xb4], eax
cmp eax, dword [ebp - 0xa4]
jl 0x4350a2
mov eax, dword [esi]
xor edi, edi
inc edi
jmp 0x4351a4
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0xa4], ecx
push edi
push dword [eax + 4]
push dword [eax]
push ebx
call fcn.0043c006
add esp, 0x10
mov dword [ebp - 0xcc], eax
test eax, eax
jne 0x4351d3
push esi
call fcn.00436cc8
pop ecx
mov dword [0x4db770], 0x4ab27c
jmp 0x435844
mov eax, dword [esi]
and dword [ebp - 0xb8], 0
cmp dword [eax + 4], 0
jbe 0x4357fb
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov edi, dword [eax]
imul edi, dword [ebp - 0xb8]
and dword [ebp - 0x98], 0
imul edi, ebx
add edi, dword [ebp - 0xcc]
cmp dword [ebp - 0xa4], 0
mov dword [ebp - 0xac], edi
jle 0x4352dd
mov edi, dword [ebp - 0xa4]
lea eax, [esi + 0x46bc]
mov dword [ebp - 0x9c], eax
lea ebx, [ebp - 0x7c]
mov esi, eax
mov eax, dword [ebp - 0xa8]
mov edx, edi
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0xa8], eax
mov eax, dword [ebx - 8]
sar eax, 1
cmp dword [ebx], eax
jl 0x435262
mov edi, dword [ebp - 0x9c]
mov eax, dword [ebx - 0x10]
mov ecx, dword [ebx - 0x14]
mov dword [ebp - 0xa8], edi
mov edi, edx
jmp 0x435268
mov eax, dword [ebx - 0x14]
mov ecx, dword [ebx - 0x10]
push dword [ebx - 0xc]
push dword [ebx - 4]
push ecx
push eax
push dword [esi + 0x18]
call dword [ebx - 0x18]
mov ecx, dword [ebp - 0x98]
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 0x4352a8
and dword [ebx], 0
inc dword [ebx + 4]
mov eax, dword [ebx + 4]
mov edx, dword [ebx - 0x10]
mov dword [ebx - 0x14], edx
cmp eax, dword [esi]
jge 0x4352a8
mov eax, dword [esi + 4]
add eax, edx
mov dword [ebx - 0x10], eax
inc ecx
add ebx, 0x20
add esi, 0x48
mov dword [ebp - 0x98], ecx
cmp ecx, edi
jl 0x43522f
mov esi, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0xb0]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [esi]
mov dword [ebp - 0xa4], edi
mov edi, dword [ebp - 0xac]
cmp ebx, 3
jl 0x43551a
cmp dword [eax + 8], 3
jne 0x43538a
cmp dword [ebp - 0xa8], 0
je 0x435372
and dword [ebp - 0x9c], 0
cmp dword [eax], 0
mov esi, dword [ebp - 0xbc]
jbe 0x43536b
mov eax, dword [ebp - 0x10]
add edi, 2
mov ebx, dword [ebp - 0xc]
mov edx, eax
mov dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0xb0]
mov dword [ebp - 0xac], ecx
sub ecx, eax
sub dword [ebp - 0x98], eax
mov al, byte [ecx + edx]
mov byte [edi - 2], al
mov al, byte [edx]
mov byte [edi - 1], al
mov eax, dword [ebp - 0x98]
mov al, byte [eax + edx]
mov byte [edi], al
mov byte [edi + 1], 0xff
add edi, ebx
mov eax, dword [esi]
inc dword [ebp - 0x9c]
inc edx
mov esi, dword [ebp - 0x9c]
cmp esi, dword [eax]
mov esi, dword [ebp - 0xbc]
jb 0x435330
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov eax, dword [esi]
jmp 0x4357e2
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 0x435365
cmp dword [eax + 8], 4
jne 0x4354e3
cmp dword [esi + 0x47e8], 0
jne 0x43544b
and dword [ebp - 0x9c], 0
cmp dword [eax], 0
jbe 0x43536b
mov eax, dword [ebp - 0x14]
add edi, 2
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x98], edx
sub ecx, eax
mov edx, dword [ebp - 0xc]
sub dword [ebp - 0x98], eax
sub edx, eax
mov dword [ebp - 0xc8], edx
mov edx, eax
mov dword [ebp - 0xa0], ecx
mov al, byte [ecx + edx]
mov byte [ebp - 0xc0], al
push dword [ebp - 0xc0]
movzx eax, byte [edx]
push eax
call fcn.00435ba4
push dword [ebp - 0xc0]
mov byte [edi - 2], al
mov eax, dword [ebp - 0x98]
movzx eax, byte [eax + edx]
push eax
call fcn.00435ba4
push dword [ebp - 0xc0]
mov byte [edi - 1], al
mov eax, dword [ebp - 0xc8]
movzx eax, byte [eax + edx]
push eax
call fcn.00435ba4
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 ecx, dword [ebp - 0xa0]
jb 0x4353d7
jmp 0x435365
cmp dword [esi + 0x47e8], 2
mov eax, dword [eax]
mov ecx, dword [esi + 0x4810]
push ebx
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push edi
jne 0x4354dc
call ecx
mov eax, dword [esi]
xor edx, edx
add esp, 0x18
cmp dword [eax], edx
jbe 0x435365
add edi, 2
mov eax, dword [ebp - 8]
mov al, byte [eax + edx]
mov byte [ebp - 0xc4], al
mov al, byte [edi - 2]
push dword [ebp - 0xc4]
not al
movzx eax, al
push eax
call fcn.00435ba4
push dword [ebp - 0xc4]
mov byte [edi - 2], al
mov al, byte [edi - 1]
not al
movzx eax, al
push eax
call fcn.00435ba4
push dword [ebp - 0xc4]
mov byte [edi - 1], al
mov al, byte [edi]
not al
movzx eax, al
push eax
call fcn.00435ba4
mov byte [edi], al
add esp, 0x18
mov eax, dword [esi]
add edi, ebx
inc edx
cmp edx, dword [eax]
jb 0x43547c
jmp 0x435365
call ecx
jmp 0x435385
and dword [ebp - 0xa0], 0
cmp dword [eax], 0
jbe 0x43536b
mov ecx, dword [ebp - 0xa0]
inc edi
mov eax, dword [ebp - 0x14]
mov al, byte [eax + ecx]
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 0x4354fa
jmp 0x435368
cmp dword [ebp - 0xa8], 0
je 0x43560e
mov edx, dword [eax]
mov dword [ebp - 0x9c], edx
mov edx, dword [ebp - 0x10]
cmp ebx, 1
jne 0x4355a2
and dword [ebp - 0x98], 0
cmp dword [ebp - 0x9c], 0
jbe 0x4357e2
mov ecx, dword [ebp - 0x14]
mov eax, edx
mov ebx, dword [ebp - 0xc]
sub ecx, eax
sub ebx, eax
mov dword [ebp - 0xa0], ecx
sub edi, eax
movzx eax, byte [ebx + edx]
imul ecx, eax, 0x1d
mov eax, dword [ebp - 0xa0]
movzx eax, byte [eax + edx]
imul eax, eax, 0x4d
add ecx, eax
movzx eax, byte [edx]
imul eax, eax, 0x96
add ecx, eax
shr ecx, 8
mov byte [edi + edx], cl
mov ecx, dword [ebp - 0x98]
mov eax, dword [esi]
inc ecx
inc edx
mov dword [ebp - 0x98], ecx
cmp ecx, dword [eax]
jb 0x43555f
mov edx, dword [ebp - 0x10]
jmp 0x4357d9
and dword [ebp - 0x98], 0
cmp dword [ebp - 0x9c], 0
jbe 0x4357e2
mov eax, dword [ebp - 0x10]
mov edx, eax
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
sub ebx, eax
sub ecx, eax
mov dword [ebp - 0xa0], ecx
movzx eax, byte [ebx + edx]
imul ecx, eax, 0x1d
mov eax, dword [ebp - 0xa0]
movzx eax, byte [eax + edx]
imul eax, eax, 0x4d
add ecx, eax
movzx eax, byte [edx]
imul eax, eax, 0x96
mov byte [edi + 1], 0xff
add ecx, eax
shr ecx, 8
mov byte [edi], cl
lea edi, [edi + 2]
mov ecx, dword [ebp - 0x98]
mov eax, dword [esi]
inc ecx
inc edx
mov dword [ebp - 0x98], ecx
cmp ecx, dword [eax]
jb 0x4355cb
jmp 0x43559a
cmp dword [eax + 8], 4
jne 0x43576d
cmp dword [esi + 0x47e8], 0
jne 0x43570e
and dword [ebp - 0x98], 0
cmp dword [eax], 0
jbe 0x4357e2
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
sub ecx, edx
sub eax, edx
mov dword [ebp - 0x9c], edx
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0xc]
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xac], edx
mov eax, dword [ebp - 0x9c]
mov al, byte [ecx + eax]
mov byte [ebp - 0xb4], al
mov eax, dword [ebp - 0x9c]
push dword [ebp - 0xb4]
movzx eax, byte [edx + eax]
push eax
call fcn.00435ba4
mov ecx, dword [ebp - 0x9c]
push dword [ebp - 0xb4]
movzx eax, al
imul edx, eax, 0x4d
mov eax, dword [ebp - 0xa0]
movzx eax, byte [eax + ecx]
push eax
call fcn.00435ba4
push dword [ebp - 0xb4]
movzx eax, al
imul eax, eax, 0x96
add edx, eax
mov eax, dword [ebp - 0x9c]
movzx eax, byte [eax]
push eax
call fcn.00435ba4
mov ecx, dword [ebp - 0x98]
add esp, 0x18
movzx eax, al
imul eax, eax, 0x1d
mov byte [edi + 1], 0xff
add edx, eax
shr edx, 8
mov byte [edi], dl
add edi, ebx
mov eax, dword [esi]
inc ecx
inc dword [ebp - 0x9c]
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0x98], ecx
cmp ecx, dword [eax]
mov ecx, dword [ebp - 0xc8]
jb 0x435660
mov edx, dword [ebp - 0x10]
jmp 0x4357df
cmp dword [esi + 0x47e8], 2
jne 0x43576d
and dword [ebp - 0x98], 0
cmp dword [eax], 0
jbe 0x4357e2
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
sub ecx, edx
mov dword [ebp - 0xa0], ecx
movzx eax, byte [ecx + edx]
push eax
mov al, byte [edx]
not al
movzx eax, al
push eax
call fcn.00435ba4
pop ecx
mov byte [edi], al
mov byte [edi + 1], 0xff
add edi, ebx
mov eax, dword [esi]
pop ecx
mov ecx, dword [ebp - 0x98]
inc ecx
inc edx
cmp ecx, dword [eax]
mov dword [ebp - 0x98], ecx
mov ecx, dword [ebp - 0xa0]
jb 0x435735
jmp 0x435706
mov esi, dword [eax]
mov dword [ebp - 0x98], esi
mov esi, dword [ebp - 0xbc]
cmp ebx, 1
jne 0x4357ad
and dword [ebp - 0xa0], 0
cmp dword [ebp - 0x98], 0
jbe 0x4357e2
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0xa0]
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 0x43579b
jmp 0x435706
and dword [ebp - 0xa0], 0
cmp dword [ebp - 0x98], 0
jbe 0x4357e2
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xa0]
mov al, byte [ebx + ecx]
inc ecx
mov byte [edi], al
lea edi, [edi + 2]
mov byte [edi - 1], 0xff
mov eax, dword [esi]
cmp ecx, dword [eax]
jb 0x4357c6
mov ebx, dword [ebp - 0xb0]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 0xb8]
inc edi
mov dword [ebp - 0xb8], edi
cmp edi, dword [eax + 4]
jb 0x4351ec
xor edi, edi
inc edi
push esi
call fcn.00436cc8
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 0x435832
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 0x435846
mov dword [0x4db770], str.bad_req_comp
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047b6e2
leave
ret