Function at 0x455420
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x408]
push edi
push 0x404
push 0
push eax
mov dword [ebp - 0x414], esi
mov dword [esi + 0x4c], 0
call fcn.00595760
movzx ebx, word [esi + 0x48]
add esp, 0xc
mov dword [ebp - 0x420], ebx
test bx, bx
je 0x455b15
mov edx, dword [esi + 0x1ac]
movzx eax, word [edx + 0xc]
test eax, 0x7f0
jne 0x455b15
mov cl, byte [esi + 0xa]
mov eax, 1
shl ax, cl
movzx edi, ax
movzx eax, word [edx + 0xc]
cmp eax, 1
jne 0x4554bb
mov word [ebp - 0x208], 0xff00
mov word [ebp - 0x308], 0xff00
mov word [ebp - 0x408], 0xff00
jmp 0x455564
cmp eax, 2
jne 0x45550f
movzx edx, word [edx + 0x20]
xor eax, eax
cmp ax, dx
jge 0x455564
movsx eax, dx
lea ecx, [ebp - 0x308]
dec eax
mov ebx, edx
mov dword [ebp - 0x410], eax
xor esi, esi
mov eax, esi
lea ecx, [ecx + 1]
cdq
add esi, 0xff
idiv dword [ebp - 0x410]
mov byte [ecx + 0xff], al
mov byte [ecx - 1], al
mov byte [ecx - 0x101], al
dec ebx
jne 0x4554e3
mov ebx, dword [ebp - 0x420]
jmp 0x45555e
movzx eax, word [edx + 0x20]
xor ecx, ecx
cmp cx, ax
jge 0x455564
mov esi, dword [edx + 0x24]
mov edx, eax
nop
movzx eax, byte [esi + ecx]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x409], al
movzx eax, byte [esi + ecx + 0xff]
mov byte [ebp + ecx - 0x309], al
movzx eax, byte [esi + ecx + 0x1ff]
mov byte [ebp + ecx - 0x209], al
movzx eax, byte [esi + ecx + 0x2ff]
mov byte [ebp + ecx - 0x109], al
dec edx
jne 0x455520
mov esi, dword [ebp - 0x414]
test bl, 1
je 0x4555aa
xor eax, eax
cmp ax, di
jge 0x4555aa
lea ecx, [ebp - 0x308]
mov edx, edi
jmp 0x455580
or al, 0xff
lea ecx, [ecx + 1]
sub al, byte [ecx - 0x101]
mov byte [ecx - 0x101], al
or al, 0xff
sub al, byte [ecx - 1]
mov byte [ecx - 1], al
or al, 0xff
sub al, byte [ecx + 0xff]
mov byte [ecx + 0xff], al
dec edx
jne 0x455580
movzx edx, word [esi + 0x4a]
mov eax, 1
mov cl, dl
mov dword [ebp - 0x420], edx
shl ax, cl
dec ax
movzx eax, ax
mov dword [ebp - 0x40c], eax
mov eax, ebx
and eax, 2
mov dword [ebp - 0x410], eax
jne 0x4555f3
test bl, 0xc
jne 0x4555f3
cmp dx, 8
jg 0x4555ea
lea eax, [edi*4]
jmp 0x4555f6
lea eax, [edi*8]
jmp 0x4555f6
lea eax, [edi + edi]
movzx eax, ax
movsx ecx, ax
push 1
push ecx
call fcn.00592c0b
mov ecx, eax
add esp, 8
mov dword [esi + 0x4c], ecx
test ecx, ecx
jne 0x455624
pop edi
pop esi
lea eax, [ecx + 1]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp word [ebp - 0x410], 0
je 0x455652
push edi
lea eax, [ebp - 0x408]
push eax
push ecx
call fcn.00455b30
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
test bl, 4
je 0x45567b
push edi
lea eax, [ebp - 0x408]
push eax
push ecx
call fcn.00455c00
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
test bl, 8
je 0x4556a4
push edi
lea eax, [ebp - 0x408]
push eax
push ecx
call fcn.00455cf0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
test bl, 0x10
je 0x455840
movzx eax, word [esi + 0x4a]
cmp ax, 8
movsx eax, di
jg 0x4557aa
test ebx, 0x200
je 0x4556d9
lea edx, [eax + ecx]
mov dword [ebp - 0x41c], edx
add edx, eax
mov dword [ebp - 0x414], edx
jmp 0x4556ec
mov edx, ecx
mov dword [ebp - 0x414], edx
add edx, eax
mov dword [ebp - 0x41c], edx
lea ecx, [eax + edx]
xor eax, eax
cmp ax, di
jge 0x455b15
mov ebx, dword [ebp - 0x40c]
movsx eax, bx
lea ebx, [ebp - 0x308]
mov dword [ebp - 0x40c], edi
mov edi, eax
mov edi, edi
movzx esi, byte [ebx - 0x100]
lea ecx, [ecx + 1]
imul esi, edi
lea ebx, [ebx + 1]
mov eax, 0x80808081
imul esi
add edx, esi
movzx esi, byte [ebx - 1]
sar edx, 7
mov eax, edx
imul esi, edi
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp - 0x414]
mov byte [edx], al
inc edx
mov dword [ebp - 0x414], edx
mov eax, 0x80808081
imul esi
add edx, esi
movzx esi, byte [ebx + 0xff]
sar edx, 7
mov eax, edx
imul esi, edi
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp - 0x41c]
mov byte [edx], al
inc edx
mov dword [ebp - 0x41c], edx
mov eax, 0x80808081
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
dec dword [ebp - 0x40c]
mov byte [ecx - 1], al
jne 0x455710
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
test ebx, 0x200
je 0x4557ba
lea ebx, [ecx + eax*2]
lea edx, [ebx + eax*2]
jmp 0x4557c2
mov edx, ecx
lea ebx, [edx + eax*2]
lea ecx, [ebx + eax*2]
xor eax, eax
mov dword [ebp - 0x414], edx
cmp ax, di
jge 0x455b15
lea esi, [ebp - 0x308]
lea esp, [esp]
movzx eax, byte [esi - 0x100]
lea ebx, [ebx + 2]
mov edx, eax
lea ecx, [ecx + 2]
shl edx, 8
lea esi, [esi + 1]
or edx, eax
mov eax, dword [ebp - 0x414]
mov word [eax], dx
add eax, 2
mov dword [ebp - 0x414], eax
movzx eax, byte [esi - 1]
mov edx, eax
shl edx, 8
or edx, eax
movzx eax, byte [esi + 0xff]
mov word [ebx - 2], dx
mov edx, eax
shl edx, 8
or edx, eax
mov word [ecx - 2], dx
dec edi
jne 0x4557e0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x420]
cmp ax, 8
jg 0x455a9b
test ebx, 0x200
je 0x455866
mov esi, dword [ebp - 0x420]
lea eax, [ecx + 1]
lea edx, [eax + 1]
jmp 0x455871
mov edx, ecx
lea eax, [edx + 1]
lea ecx, [eax + 1]
lea esi, [ecx + 1]
mov dword [ebp - 0x410], 0x400
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x414], edx
cmp bx, word [ebp - 0x410]
jne 0x4559b8
xor ebx, ebx
cmp bx, di
jge 0x455b15
mov ebx, dword [ebp - 0x40c]
sub eax, ecx
movsx ebx, bx
sub edx, ecx
mov dword [ebp - 0x40c], ebx
sub esi, ecx
lea ebx, [ebp - 0x308]
mov dword [ebp - 0x410], edi
mov dword [ebp - 0x418], ebx
mov edi, eax
mov dword [ebp - 0x41c], eax
mov ebx, edx
mov dword [ebp - 0x414], edx
lea eax, [ebp - 0x308]
mov dword [ebp - 0x420], esi
movzx esi, byte [eax - 0x100]
lea ecx, [ecx + 4]
imul esi, dword [ebp - 0x40c]
mov eax, 0x80808081
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [ebx + ecx - 4], al
mov eax, dword [ebp - 0x418]
movzx esi, byte [eax]
mov eax, 0x80808081
imul esi, dword [ebp - 0x40c]
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [edi + ecx - 4], al
mov eax, dword [ebp - 0x418]
movzx esi, byte [eax + 0x100]
mov eax, 0x80808081
imul esi, dword [ebp - 0x40c]
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [ecx - 4], al
mov eax, dword [ebp - 0x418]
movzx esi, byte [eax + 0x200]
mov eax, 0x80808081
imul esi, dword [ebp - 0x40c]
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp - 0x420]
mov byte [edx + ecx - 4], al
mov eax, dword [ebp - 0x418]
inc eax
dec dword [ebp - 0x410]
mov dword [ebp - 0x418], eax
jne 0x4558e2
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp ax, di
jge 0x455b15
mov ebx, dword [ebp - 0x40c]
lea eax, [ebp - 0x308]
movsx edx, bx
mov ebx, dword [ebp - 0x41c]
mov dword [ebp - 0x410], edi
mov edi, dword [ebp - 0x414]
mov dword [ebp - 0x418], edx
mov dword [ebp - 0x40c], eax
movzx esi, byte [eax - 0x100]
lea edi, [edi + 3]
imul esi, edx
lea ebx, [ebx + 3]
mov eax, 0x80808081
lea ecx, [ecx + 3]
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [edi - 3], al
mov eax, dword [ebp - 0x40c]
movzx esi, byte [eax]
mov eax, 0x80808081
imul esi, dword [ebp - 0x418]
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [ebx - 3], al
mov eax, dword [ebp - 0x40c]
movzx esi, byte [eax + 0x100]
mov eax, 0x80808081
imul esi, dword [ebp - 0x418]
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp - 0x418]
mov byte [ecx - 3], al
mov eax, dword [ebp - 0x40c]
inc eax
dec dword [ebp - 0x410]
mov dword [ebp - 0x40c], eax
jne 0x4559f0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
test ebx, 0x200
je 0x455aab
lea esi, [ecx + 4]
lea eax, [esi + 4]
jmp 0x455ab3
mov eax, ecx
lea esi, [eax + 4]
lea ecx, [esi + 4]
xor edx, edx
cmp dx, di
jge 0x455b15
sub eax, esi
mov dword [ebp - 0x410], edi
lea ebx, [ebp - 0x308]
mov dword [ebp - 0x420], eax
sub ecx, esi
mov edi, eax
movzx eax, byte [ebx - 0x100]
lea ebx, [ebx + 1]
mov edx, eax
lea esi, [esi + 6]
shl edx, 8
or edx, eax
movzx eax, byte [ebx - 1]
mov word [edi + esi - 6], dx
mov edx, eax
shl edx, 8
or edx, eax
movzx eax, byte [ebx + 0xff]
mov word [esi - 6], dx
mov edx, eax
shl edx, 8
or edx, eax
dec dword [ebp - 0x410]
mov word [ecx + esi - 6], dx
jne 0x455ad2
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret