Function at 0x4092c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x49594c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xd8], eax
push esi
mov eax, dword [ebx]
push edi
mov dword [ebp - 0xd0], edx
mov dword [ebp - 0xc8], ebx
mov dword [eax + 8], 0
call fcn.00408580
mov esi, dword [ebx]
mov edx, dword [esi + 8]
mov dword [ebp - 0xcc], edx
test eax, eax
jne 0x409331
push eax
mov ecx, ebx
call fcn.00407d60
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00461fbb
mov esp, ebp
pop ebp
ret
xor ecx, ecx
cmp edx, 3
setge cl
lea ecx, [ecx*2 + 1]
mov dword [ebp - 0xac], ecx
jne 0x409370
cmp dword [ebx + 0x47ec], 3
je 0x409363
cmp dword [ebx + 0x47e8], 0
jne 0x409370
cmp dword [ebx + 0x47e4], 0
jne 0x409370
mov eax, 1
mov dword [ebp - 0xc4], eax
jmp 0x40937d
xor eax, eax
mov dword [ebp - 0xc4], eax
cmp edx, 3
jne 0x409393
cmp edx, 3
jge 0x409393
test eax, eax
jne 0x409393
mov eax, 1
mov dword [ebp - 0xc0], eax
jmp 0x40939b
mov eax, edx
mov dword [ebp - 0xc0], edx
mov edx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
xorps xmm0, xmm0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0x90], edx
movups xmmword [ebp - 0xa8], xmm0
test eax, eax
jle 0x4094bc
lea edi, [ebx + 0x46a0]
lea esi, [ebp - 0x80]
mov dword [ebp - 0x94], edi
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call edx
add esp, 4
mov dword [edi + 0x34], eax
test eax, eax
je 0x409521
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [edi]
mov dword [esi + 0x10], 0
mov dword [ebp - 0xbc], eax
mov dword [esi], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [edi + 4]
xor edx, edx
mov edi, eax
mov eax, dword [ebp - 0xbc]
mov ecx, edi
mov dword [esi + 4], edi
sar ecx, 1
dec eax
mov dword [esi + 0xc], ecx
mov ecx, dword [ebx]
mov ecx, dword [ecx]
add eax, ecx
mov ecx, dword [ebp - 0xbc]
div ecx
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x28]
mov dword [esi - 4], eax
mov dword [esi - 8], eax
cmp ecx, 1
jne 0x40945d
cmp edi, ecx
jne 0x409451
mov eax, 0x408940
jmp 0x409480
cmp edi, 2
jne 0x40947b
mov eax, 0x408950
jmp 0x409480
cmp ecx, 2
jne 0x40947b
cmp edi, 1
jne 0x40946e
mov eax, 0x408ba0
jmp 0x409480
cmp edi, 2
jne 0x40947b
mov eax, dword [ebx + 0x4814]
jmp 0x409480
mov eax, 0x408ec0
mov edi, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
add edi, 0x48
mov dword [esi - 0xc], eax
add esi, 0x20
mov eax, dword [ebp - 0xb0]
inc eax
mov dword [ebp - 0x94], edi
mov dword [ebp - 0xb0], eax
cmp eax, dword [ebp - 0xc0]
jl 0x4093d2
mov esi, dword [ebx]
mov ecx, dword [ebp - 0xac]
mov edi, dword [esi + 4]
mov esi, dword [esi]
test esi, esi
js 0x40954f
je 0x4094d7
mov eax, 0x7fffffff
cdq
idiv esi
cmp ecx, eax
jg 0x40954f
mov eax, esi
imul eax, ecx
mov dword [ebp - 0xb0], eax
test eax, eax
js 0x40954f
test edi, edi
js 0x40954f
je 0x4094fc
mov eax, 0x7fffffff
cdq
idiv edi
cmp dword [ebp - 0xb0], eax
jg 0x40954f
imul esi, edi
imul esi, ecx
cmp esi, 0x7ffffffe
jg 0x40954f
lea eax, [esi + 1]
push eax
call dword [ebp - 0x90]
add esp, 4
mov dword [ebp - 0xbc], eax
mov ecx, eax
jmp 0x409557
mov edx, dword [ebx]
mov edx, dword [edx + 8]
mov ecx, ebx
push 0
call fcn.00407d60
add esp, 4
mov dword [0x4983b8], 0x487950
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00461fbb
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov dword [ebp - 0xbc], ecx
mov edx, dword [ebx]
test ecx, ecx
je 0x409523
xor eax, eax
mov dword [ebp - 0xb0], eax
cmp dword [edx + 4], eax
jbe 0x409c1c
mov edi, dword [ebp - 0xa8]
mov esi, eax
mov dword [ebp - 0x90], 0
mov eax, dword [ebp - 0xac]
imul esi, eax
imul esi, dword [edx]
add esi, ecx
cmp dword [ebp - 0xc0], 0
mov dword [ebp - 0xb4], esi
jle 0x409644
mov esi, dword [ebp - 0xc0]
lea eax, [ebx + 0x46bc]
mov dword [ebp - 0x94], eax
lea edi, [ebp - 0x74]
mov ebx, eax
mov eax, dword [edi - 8]
sar eax, 1
cmp dword [edi], eax
jl 0x4095c6
mov edx, dword [edi - 0x14]
jmp 0x4095c9
mov edx, dword [edi - 0x10]
jl 0x4095d0
mov eax, dword [edi - 0x10]
jmp 0x4095d3
mov eax, dword [edi - 0x14]
push dword [edi - 0xc]
push dword [edi - 4]
push edx
push eax
push dword [ebx + 0x18]
call dword [edi - 0x18]
mov ecx, dword [ebp - 0x90]
add esp, 0x14
mov dword [ebp + ecx*4 - 0xa8], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x409619
inc dword [edi + 4]
mov eax, dword [edi + 4]
mov edx, dword [edi - 0x10]
mov dword [edi], 0
mov dword [edi - 0x14], edx
cmp eax, dword [ebx]
jge 0x409619
mov eax, dword [ebx + 4]
add eax, edx
mov dword [edi - 0x10], eax
inc ecx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0x90], ecx
cmp ecx, esi
jl 0x4095b8
mov ebx, dword [ebp - 0xc8]
mov esi, dword [ebp - 0xb4]
mov edi, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xac]
mov edx, dword [ebx]
mov ecx, dword [ebp - 0xcc]
cmp ecx, 3
jl 0x409903
mov ecx, dword [edx + 8]
cmp ecx, 3
jne 0x409711
cmp dword [ebp - 0xc4], 0
je 0x4096ee
cmp dword [edx], 0
mov dword [ebp - 0xb4], 0
jbe 0x4098fc
mov ecx, dword [ebp - 0xa4]
mov eax, edi
mov edx, dword [ebp - 0xa0]
sub eax, ecx
mov edi, dword [ebp - 0xac]
add esi, 2
sub edx, ecx
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], edx
mov edx, dword [ebp - 0xb4]
nop dword [eax]
movzx eax, byte [eax + ecx]
lea ecx, [ecx + 1]
mov byte [esi - 2], al
inc edx
movzx eax, byte [ecx - 1]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x90]
movzx eax, byte [eax + ecx - 1]
mov byte [esi], al
mov byte [esi + 1], 0xff
add esi, edi
mov eax, dword [ebx]
cmp edx, dword [eax]
mov eax, dword [ebp - 0x94]
jb 0x4096b0
mov edi, dword [ebp - 0xa8]
mov edx, dword [ebx]
jmp 0x409c00
push eax
push dword [edx]
mov eax, dword [ebx + 0x4810]
push dword [ebp - 0xa0]
push dword [ebp - 0xa4]
push edi
push esi
call eax
mov edx, dword [ebx]
add esp, 0x18
jmp 0x409c00
cmp ecx, 4
jne 0x4098d6
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x4097f9
mov dword [ebp - 0x90], ecx
cmp dword [edx], ecx
jbe 0x4098fc
mov edx, dword [ebp - 0x9c]
mov eax, edi
mov ecx, dword [ebp - 0xa4]
sub eax, edx
sub ecx, edx
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], ecx
add esi, 2
mov ecx, dword [ebp - 0xa0]
mov edi, edx
sub ecx, edx
mov dword [ebp - 0xb8], ecx
nop word [eax + eax]
movzx ecx, byte [eax + edi]
lea edi, [edi + 1]
movzx edx, byte [edi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 2], al
mov eax, dword [ebp - 0x94]
movzx ecx, byte [eax + edi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 1], al
mov eax, dword [ebp - 0xb8]
movzx ecx, byte [eax + edi - 1]
imul ecx, edx
mov byte [esi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x90]
shr eax, 8
inc ecx
mov byte [esi], al
mov eax, dword [ebx]
add esi, dword [ebp - 0xac]
mov dword [ebp - 0x90], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0x98]
jb 0x409770
mov edi, dword [ebp - 0xa8]
mov edx, dword [ebx]
jmp 0x409c00
mov edx, dword [edx]
mov edi, dword [ebx + 0x4810]
mov dword [ebp - 0x90], edi
mov edi, dword [ebp - 0xa8]
push eax
push edx
push dword [ebp - 0xa0]
push dword [ebp - 0xa4]
push edi
push esi
cmp ecx, 2
jne 0x4098c6
call dword [ebp - 0x90]
mov eax, dword [ebx]
add esp, 0x18
mov dword [ebp - 0x98], 0
cmp dword [eax], 0
jbe 0x4098fc
mov edi, dword [ebp - 0x98]
add esi, 2
nop dword [eax]
mov eax, dword [ebp - 0x9c]
movzx edx, byte [edi + eax]
inc edi
movzx eax, byte [esi - 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 2], al
movzx eax, byte [esi - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 1], al
movzx eax, byte [esi]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi], al
mov eax, dword [ebx]
add esi, dword [ebp - 0xac]
cmp edi, dword [eax]
jb 0x409850
mov edi, dword [ebp - 0xa8]
mov edx, eax
jmp 0x409c00
call dword [ebp - 0x90]
mov edx, dword [ebx]
add esp, 0x18
jmp 0x409c00
xor ecx, ecx
cmp dword [edx], ecx
jbe 0x4098fc
inc esi
nop dword [eax]
mov al, byte [ecx + edi]
inc ecx
mov byte [esi + 1], al
mov byte [esi], al
mov byte [esi - 1], al
mov byte [esi + 2], 0xff
mov eax, dword [ebx]
add esi, dword [ebp - 0xac]
cmp ecx, dword [eax]
jb 0x4098e0
mov edx, dword [ebx]
jmp 0x409c00
cmp dword [ebp - 0xc4], 0
je 0x409a21
mov eax, dword [edx]
mov dword [ebp - 0x90], 0
cmp ecx, 3
jge 0x40999b
test eax, eax
je 0x409c00
mov eax, dword [ebp - 0xa8]
mov edi, eax
mov ecx, dword [ebp - 0xa4]
sub ecx, eax
mov dword [ebp - 0x98], ecx
mov ecx, dword [ebp - 0xa0]
sub ecx, eax
sub esi, eax
mov dword [ebp - 0xb8], ecx
nop
movzx eax, byte [ecx + edi]
lea edi, [edi + 1]
imul ecx, eax, 0x1d
mov eax, dword [ebp - 0x98]
movzx eax, byte [eax + edi - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edi - 1]
imul eax, eax, 0x4d
add ecx, eax
mov eax, dword [ebp - 0x90]
shr ecx, 8
inc eax
mov byte [esi + edi - 1], cl
mov edx, dword [ebx]
mov ecx, dword [ebp - 0xb8]
mov dword [ebp - 0x90], eax
cmp eax, dword [edx]
jb 0x409950
jmp 0x409bfa
test eax, eax
je 0x409c00
mov eax, dword [ebp - 0xa8]
mov edi, eax
mov ecx, dword [ebp - 0xa4]
sub ecx, eax
mov dword [ebp - 0x98], ecx
mov ecx, dword [ebp - 0xa0]
sub ecx, eax
mov dword [ebp - 0xb8], ecx
nop word [eax + eax]
movzx eax, byte [edi + ecx]
lea edi, [edi + 1]
imul ecx, eax, 0x1d
lea esi, [esi + 2]
mov eax, dword [ebp - 0x98]
movzx eax, byte [edi + eax - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edi - 1]
imul eax, eax, 0x4d
mov byte [esi - 1], 0xff
add ecx, eax
mov eax, dword [ebp - 0x90]
shr ecx, 8
inc eax
mov byte [esi - 2], cl
mov edx, dword [ebx]
mov ecx, dword [ebp - 0xb8]
mov dword [ebp - 0x90], eax
cmp eax, dword [edx]
jb 0x4099d0
jmp 0x409bfa
cmp dword [edx + 8], 4
jne 0x409ba6
mov eax, dword [ebx + 0x47e8]
test eax, eax
jne 0x409b2e
mov dword [ebp - 0x90], eax
cmp dword [edx], eax
jbe 0x409c00
mov edx, dword [ebp - 0x9c]
mov ecx, edx
mov eax, dword [ebp - 0xa4]
mov edi, dword [ebp - 0xa8]
sub eax, edx
mov dword [ebp - 0x98], eax
sub edi, edx
mov eax, dword [ebp - 0xa0]
sub eax, edx
mov dword [ebp - 0x94], edx
mov dword [ebp - 0xb4], edi
mov dword [ebp - 0xb8], eax
nop
movzx eax, byte [ecx]
movzx edi, byte [ecx + edi]
mov edx, dword [ebp - 0x98]
mov ebx, dword [ebp - 0xb8]
imul edi, eax
movzx ecx, byte [ecx + edx]
mov edx, dword [ebp - 0x94]
imul ecx, eax
sub edi, 0xffffff80
movzx edx, byte [edx + ebx]
imul edx, eax
sub ecx, 0xffffff80
mov ebx, dword [ebp - 0xc8]
mov eax, ecx
mov byte [esi + 1], 0xff
shr eax, 8
add eax, ecx
shr eax, 8
sub edx, 0xffffff80
movzx eax, al
imul ecx, eax, 0x96
mov eax, edx
shr eax, 8
add eax, edx
shr eax, 8
movzx eax, al
imul eax, eax, 0x1d
add ecx, eax
mov eax, edi
shr eax, 8
add eax, edi
mov edi, dword [ebp - 0xb4]
shr eax, 8
movzx eax, al
imul eax, eax, 0x4d
add ecx, eax
mov eax, dword [ebp - 0x90]
shr ecx, 8
inc eax
mov byte [esi], cl
mov edx, dword [ebx]
mov ecx, dword [ebp - 0x94]
add esi, dword [ebp - 0xac]
inc ecx
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x94], ecx
cmp eax, dword [edx]
jb 0x409a80
jmp 0x409bfa
cmp eax, 2
jne 0x409ba6
cmp dword [edx], 0
mov dword [ebp - 0x90], 0
jbe 0x409c00
mov eax, dword [ebp - 0xa8]
mov edi, dword [ebp - 0x9c]
sub eax, edi
mov dword [ebp - 0x98], eax
nop word [eax + eax]
mov al, byte [eax + edi]
lea edi, [edi + 1]
not al
movzx ecx, al
movzx eax, byte [edi - 1]
imul ecx, eax
mov byte [esi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi], al
mov eax, dword [ebp - 0x90]
mov edx, dword [ebx]
inc eax
add esi, dword [ebp - 0xac]
mov dword [ebp - 0x90], eax
cmp eax, dword [edx]
mov eax, dword [ebp - 0x98]
jb 0x409b60
jmp 0x409bfa
mov eax, dword [edx]
cmp ecx, 3
jge 0x409bd2
xor ecx, ecx
test eax, eax
je 0x409c00
mov edi, dword [ebp - 0xa8]
sub edi, esi
nop dword [eax + eax]
mov al, byte [edi + esi]
lea esi, [esi + 1]
mov byte [esi - 1], al
inc ecx
mov edx, dword [ebx]
cmp ecx, dword [edx]
jb 0x409bc0
jmp 0x409bfa
xor ecx, ecx
test eax, eax
je 0x409c00
nop dword [eax + eax]
mov eax, dword [ebp - 0xa8]
lea esi, [esi + 2]
mov al, byte [ecx + eax]
inc ecx
mov byte [esi - 2], al
mov byte [esi - 1], 0xff
mov edx, dword [ebx]
cmp ecx, dword [edx]
jb 0x409be0
mov edi, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xb0]
mov ecx, dword [ebp - 0xbc]
inc eax
mov dword [ebp - 0xb0], eax
cmp eax, dword [edx + 4]
jb 0x409574
mov edx, dword [edx + 8]
mov ecx, ebx
push 0
call fcn.00407d60
mov eax, dword [ebx]
add esp, 4
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ebp - 0xd8]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xd4]
mov eax, dword [eax + 4]
mov dword [ecx], eax
test edx, edx
je 0x409c62
mov eax, dword [ebx]
xor ecx, ecx
cmp dword [eax + 8], 3
setge cl
lea ecx, [ecx*2 + 1]
mov dword [edx], ecx
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xbc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00461fbb
mov esp, ebp
pop ebp
ret