Function at 0x591b91f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xe4
mov eax, dword [0x591d4f78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x24]
push ebx
xor edx, edx
cmp eax, edx
push esi
push edi
mov dword [ebp - 0x20], edx
je 0x591b921f
mov ecx, dword [eax]
and ecx, 0xfff
mov dword [ebp - 0x20], ecx
cmp eax, edx
mov dword [ebp - 0x40], edx
je 0x591b9233
movzx ecx, word [eax + 2]
and ecx, 0xfff
mov dword [ebp - 0x40], ecx
mov esi, dword [ebp + 0x28]
mov ebx, dword [ebp + 0x2c]
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov edi, dword [ebx + 8]
sub edx, dword [esi]
sub ecx, dword [esi + 4]
sub edi, dword [ebx]
test eax, eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x50], edi
mov byte [ebp - 5], 0
je 0x591b9264
mov eax, dword [eax]
shr eax, 0xf
and al, 1
mov byte [ebp - 5], al
cmp dword [ebp - 0x20], 0
je 0x591b979d
cmp dword [ebp - 0x40], 0
je 0x591b979d
test edx, edx
je 0x591b979d
test ecx, ecx
je 0x591b979d
test edi, edi
je 0x591b979d
mov eax, dword [ebx + 0xc]
sub eax, dword [ebx + 4]
je 0x591b979d
mov edi, dword [ebp + 0x30]
test edi, edi
je 0x591b979d
push 0x6c
lea ecx, [ebp - 0xe4]
push 0
push ecx
call sub.MSVCR80.dll_memset
mov edx, dword [edi]
mov ecx, dword [edx + 0x64]
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0xe4]
push eax
push 0
push edi
mov dword [ebp - 0xe4], 0x6c
call ecx
test eax, eax
jl 0x591b979d
mov edx, dword [ebp - 0xd4]
mov ecx, dword [ebx]
mov esi, dword [esi + 8]
mov eax, dword [ebp + 0x28]
mov edi, dword [ebx + 8]
mov dword [ebp - 0x78], edx
mov edx, dword [eax]
mov eax, dword [ebp + 0x38]
sub ecx, edx
mov dword [ebp - 0x4c], edx
not eax
and ecx, eax
mov edx, esi
sub edx, edi
and edx, dword [ebp + 0x38]
mov dword [ebp - 0xc], eax
add ecx, edx
imul ecx, dword [ebp - 0x20]
xor edx, edx
mov eax, ecx
div dword [ebp - 0x1c]
xor edx, edx
sub edi, dword [ebp - 0x4c]
mov byte [ebp - 6], 1
and edi, dword [ebp - 0xc]
mov dword [ebp - 0x70], eax
imul eax, dword [ebp - 0x1c]
sub ecx, eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebx + 4]
mov ebx, ecx
imul ecx, dword [ebp - 0xd4]
sub ebx, dword [eax + 4]
add ecx, dword [ebp - 0xc0]
imul ebx, dword [ebp - 0x40]
mov eax, ebx
div dword [ebp - 0x58]
mov edx, dword [ebp + 0x2c]
sub esi, dword [edx]
xor edx, edx
and esi, dword [ebp + 0x38]
mov dword [ebp - 0x6c], eax
imul eax, dword [ebp - 0x58]
sub ebx, eax
lea eax, [edi + esi - 1]
imul eax, dword [ebp - 0x20]
div dword [ebp - 0x1c]
mov edx, dword [ebp + 0x2c]
mov esi, dword [ebp - 0x50]
add esi, 8
mov dword [ebp - 0x2c], ebx
mov edi, eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x48], eax
mov eax, dword [edx]
add edi, 1
cmp esi, 0x1fff
lea eax, [ecx + eax*4]
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x44], eax
ja 0x591b93ab
mov eax, esi
call fcn.59120454
mov eax, esp
push 0xcccc
jmp 0x591b93ba
push 0xdddd
push esi
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
push eax
call fcn.5913a00e
cmp esi, 0x1fff
mov dword [ebp - 0x18], eax
ja 0x591b93db
mov eax, esi
call fcn.59120454
mov eax, esp
push 0xcccc
jmp 0x591b93ea
push 0xdddd
push esi
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
push eax
call fcn.5913a00e
cmp esi, 0x1fff
mov dword [ebp - 0x30], eax
ja 0x591b940b
mov eax, esi
call fcn.59120454
mov eax, esp
push 0xcccc
jmp 0x591b941a
push 0xdddd
push esi
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
push eax
call fcn.5913a00e
cmp esi, 0x1fff
mov dword [ebp - 0x14], eax
ja 0x591b943b
mov eax, esi
call fcn.59120454
mov eax, esp
push 0xcccc
jmp 0x591b944a
push 0xdddd
push esi
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
push eax
call fcn.5913a00e
mov ecx, dword [ebp + 0x2c]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 0xc]
mov dword [ebp - 0x4c], eax
jae 0x591b9762
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp + 0x38]
mov ecx, dword [ebp - 0xc]
and ecx, edx
add ecx, eax
and edx, eax
mov dword [ebp - 0x38], ecx
lea ecx, [eax + eax + 1]
add edx, eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x60], edx
cmp byte [ebp - 6], 0
je 0x591b9533
cmp byte [ebp - 5], 0
jne 0x591b95e1
mov edx, dword [ebp + 0x34]
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
push edx
mov edx, dword [ebp + 0x18]
push edi
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
mov eax, dword [ebp - 0x48]
call fcn.5913bb89
mov edi, dword [ebp - 0x70]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x74]
sub eax, edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
sub eax, edx
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x28]
mov ecx, edi
xor edi, edi
sub eax, edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + ecx]
mov ebx, dword [ebp - 0x10]
add esi, dword [ebp - 0x20]
mov byte [ebx + edx], al
mov eax, dword [ebp + 0x18]
movzx eax, byte [eax + ecx]
mov ebx, dword [ebp - 0x54]
cmp esi, dword [ebp - 0x1c]
mov byte [edx], al
mov eax, dword [ebp + 0x1c]
movzx eax, byte [eax + ecx]
mov byte [ebx + edx], al
mov eax, dword [ebp + 0x20]
movzx eax, byte [eax + ecx]
mov ebx, dword [ebp - 0xc]
mov byte [ebx + edx], al
sbb eax, eax
not eax
mov ebx, eax
and ebx, dword [ebp - 0x1c]
and eax, 1
add edi, 1
sub esi, ebx
add ecx, eax
add edx, 1
cmp edi, dword [ebp - 0x50]
jb 0x591b94dc
mov ebx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x68]
cmp byte [ebp - 5], 0
jne 0x591b9638
mov edx, dword [ebp - 0x60]
cmp edx, dword [ebp - 0x38]
mov dword [ebp - 0x10], edx
je 0x591b9725
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x14]
movzx ebx, byte [ebp + 0x10]
mov esi, dword [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x28]
add edx, ecx
sub eax, ecx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0xc], eax
mov eax, dword [esi]
mov ecx, eax
movzx edi, ah
and eax, 0xff
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x54]
movzx eax, byte [edx + eax]
sub eax, edi
imul eax, ebx
sar eax, 8
add eax, edi
mov edi, dword [ebp - 0xc]
movzx edi, byte [edi + edx]
sub edi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x34]
imul edi, dword [ebp - 0x34]
sar edi, 8
add edi, dword [ebp - 0x3c]
shl eax, 8
or eax, edi
movzx edi, byte [edx]
shr ecx, 0x10
and ecx, 0xff
sub edi, ecx
imul edi, ebx
sar edi, 8
add edi, ecx
mov ecx, dword [ebp - 0x5c]
shl edi, 0x10
or eax, edi
mov dword [esi], eax
mov eax, dword [ebp - 0x10]
add eax, ecx
add esi, 4
add edx, ecx
cmp eax, dword [ebp - 0x38]
mov dword [ebp - 0x10], eax
jne 0x591b956b
mov ebx, dword [ebp - 0x2c]
jmp 0x591b9722
mov ecx, dword [ebp + 0x34]
mov esi, dword [ebp + 0x20]
mov ebx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 0xc]
push edi
push esi
push ebx
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
mov ecx, dword [ebp - 0x48]
push edx
call fcn.591a558c
cmp byte [ebp + 0x10], 0xff
je 0x591b94b7
mov eax, edi
mov edi, dword [ebp - 0x70]
lea ecx, [esi + edi]
mov esi, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0x18]
lea edx, [edi + ebx]
push edx
lea edx, [ecx + edi]
mov ecx, dword [ebp + 0x14]
sub eax, edi
add ecx, edi
push esi
call fcn.59158e8f
jmp 0x591b94ba
mov esi, dword [ebp - 0x60]
cmp esi, dword [ebp - 0x38]
mov dword [ebp - 0x10], esi
je 0x591b9725
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x44]
lea eax, [ecx + esi]
mov ecx, dword [ebp - 0x14]
sub edx, ecx
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x28]
sub edx, ecx
mov dword [ebp - 0x2c], edx
mov edx, ecx
sub edx, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0xc], edx
mov edi, edi
mov cl, byte [eax]
test cl, cl
je 0x591b9709
cmp cl, 0xff
lea esi, [eax + edx]
mov edx, dword [ebp - 0x3c]
movzx edx, byte [edx + esi]
mov byte [ebp - 0x22], dl
movzx edx, byte [esi]
mov byte [ebp - 0x23], dl
mov edx, dword [ebp - 0x2c]
movzx edx, byte [edx + esi]
mov byte [ebp - 0x24], dl
je 0x591b96fe
mov eax, dword [edi]
not cl
movzx edx, cl
mov ecx, eax
and ecx, 0xff00ff
imul ecx, edx
shr eax, 8
add ecx, 0x800080
and eax, 0xff00ff
imul eax, edx
mov edx, ecx
shr edx, 8
and edx, 0xff00ff
add edx, ecx
add eax, 0x800080
mov ecx, eax
shr ecx, 8
and ecx, 0xffff00ff
add ecx, eax
shr edx, 8
xor edx, ecx
mov ecx, eax
shr ecx, 8
and ecx, 0xff00ff
add ecx, eax
mov eax, dword [ebp - 0x34]
and edx, 0xff00ff
xor edx, ecx
add dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x10]
mov dword [edi], edx
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x5c]
add esi, ecx
add eax, ecx
add edi, 4
cmp esi, dword [ebp - 0x38]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x34], eax
jne 0x591b9670
mov edi, dword [ebp - 0x68]
add ebx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x58]
cmp ebx, ecx
sbb eax, eax
not eax
mov edx, eax
and edx, ecx
mov ecx, eax
and al, 1
and ecx, 1
add dword [ebp - 0x48], ecx
mov ecx, dword [ebp + 0x2c]
sub ebx, edx
mov edx, dword [ebp - 0x78]
add dword [ebp - 0x44], edx
mov byte [ebp - 6], al
mov eax, dword [ebp - 0x4c]
add eax, 1
cmp eax, dword [ecx + 0xc]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x4c], eax
jb 0x591b9483
mov edx, dword [ebp - 0x28]
push edx
call fcn.5913a6b8
mov eax, dword [ebp - 0x14]
push eax
call fcn.5913a6b8
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.5913a6b8
mov edx, dword [ebp - 0x18]
push edx
call fcn.5913a6b8
mov eax, dword [ebp + 0x30]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x80]
add esp, 0x10
push 0
push eax
call edx
mov al, 1
jmp 0x591b979f
xor al, al
lea esp, [ebp - 0xf0]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.5911c55f
mov esp, ebp
pop ebp
ret 0x34