Function at 0x100302f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov eax, dword [0x10195040]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x18], 4
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebx]
push edi
mov dword [ebp - 0xbc], ebx
mov dword [eax + 8], 0
ja 0x10030cac
push ebx
call fcn.1002f730
add esp, 4
test eax, eax
jne 0x1003036a
push eax
mov eax, dword [ebx]
push dword [eax + 8]
push ebx
call fcn.1002eef0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008118d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x18]
test ecx, ecx
jne 0x10030384
mov eax, dword [ebx]
cmp dword [eax + 8], 3
setge cl
lea ecx, [ecx*2 + 1]
mov dword [ebp + 0x18], ecx
mov eax, dword [ebx]
mov eax, dword [eax + 8]
mov dword [ebp - 0xb4], eax
cmp eax, 3
jne 0x100303bb
cmp dword [ebx + 0x47ec], eax
je 0x100303ae
cmp dword [ebx + 0x47e8], 0
jne 0x100303bb
cmp dword [ebx + 0x47e4], 0
jne 0x100303bb
mov edx, 1
mov dword [ebp - 0xb8], edx
jmp 0x100303cc
xor edx, edx
mov dword [ebp - 0xb8], edx
cmp eax, 3
jne 0x10030490
cmp ecx, 3
jge 0x10030490
test edx, edx
jne 0x10030490
mov dword [ebp - 0xb4], 1
push esi
xorps xmm0, xmm0
mov dword [ebp - 0x88], 0
lea esi, [ebx + 0x46a0]
movups xmmword [ebp - 0xb0], xmm0
lea edi, [ebp - 0x74]
mov dword [ebp - 0x98], esi
nop dword [eax + eax]
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.1009cadf
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
je 0x10030c70
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [esi]
mov dword [edi + 0xc], 0
mov dword [ebp - 0x8c], eax
mov dword [edi - 4], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [esi + 4]
xor edx, edx
mov esi, eax
mov eax, dword [ebp - 0x8c]
mov ecx, esi
mov dword [edi], esi
sar ecx, 1
dec eax
mov dword [edi + 8], ecx
mov ecx, dword [ebx]
add eax, dword [ecx]
mov ecx, dword [ebp - 0x8c]
div ecx
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x98]
mov eax, dword [eax + 0x28]
mov dword [edi - 8], eax
mov dword [edi - 0xc], eax
cmp ecx, 1
jne 0x100304c2
cmp esi, ecx
jne 0x100304b6
mov eax, 0x1002f9b0
jmp 0x100304e5
test eax, eax
jg 0x100303e7
push 0
push eax
push ebx
call fcn.1002eef0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008118d
mov esp, ebp
pop ebp
ret
cmp esi, 2
jne 0x100304c2
mov eax, 0x1002f9c0
jmp 0x100304e5
cmp ecx, 2
jne 0x100304e0
cmp esi, 1
jne 0x100304d3
mov eax, 0x1002fbe0
jmp 0x100304e5
cmp esi, 2
jne 0x100304e0
mov eax, dword [ebx + 0x4814]
jmp 0x100304e5
mov eax, 0x1002fef0
mov esi, dword [ebp - 0x98]
mov dword [edi - 0x10], eax
add esi, 0x48
mov eax, dword [ebp - 0x88]
add edi, 0x20
inc eax
mov dword [ebp - 0x98], esi
mov dword [ebp - 0x88], eax
cmp eax, dword [ebp - 0xb4]
jl 0x10030410
mov eax, dword [ebx]
mov edi, dword [ebp + 0x18]
mov esi, dword [eax + 4]
mov ecx, dword [eax]
test edi, edi
js 0x10030c70
test ecx, ecx
js 0x10030c70
je 0x1003053f
mov eax, 0x7fffffff
cdq
idiv ecx
cmp edi, eax
jg 0x10030c70
mov eax, ecx
imul eax, edi
mov dword [ebp - 0x90], eax
test eax, eax
js 0x10030c70
test esi, esi
js 0x10030c70
je 0x10030570
mov eax, 0x7fffffff
cdq
idiv esi
cmp dword [ebp - 0x90], eax
jg 0x10030c70
mov eax, ecx
imul eax, esi
imul eax, edi
cmp eax, 0x7ffffffe
jg 0x10030c70
imul ecx, esi
imul ecx, edi
inc ecx
push ecx
call fcn.1009cadf
mov edi, eax
add esp, 4
mov eax, dword [ebx]
test edi, edi
je 0x10030c72
xor ecx, ecx
mov dword [ebp - 0x88], ecx
cmp dword [eax + 4], ecx
jbe 0x10030c18
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x98], edi
nop dword [eax]
mov esi, ecx
mov dword [ebp - 0x90], 0
imul esi, edx
imul esi, dword [eax]
add esi, edi
cmp dword [ebp - 0xb4], 0
mov dword [ebp - 0x94], esi
jbe 0x100306c7
mov esi, dword [ebp - 0x98]
lea eax, [ebx + 0x46bc]
mov dword [ebp - 0xa0], eax
lea edi, [ebp - 0x6c]
mov ebx, eax
nop
mov eax, dword [edi - 8]
lea ecx, [edi - 0x10]
sar eax, 1
lea edx, [edi - 0x14]
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0x98], edx
cmp dword [edi], eax
jl 0x10030627
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0x8c], ecx
jmp 0x1003063d
mov eax, ecx
mov dword [ebp - 0x98], edx
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0xa0], eax
mov eax, dword [ecx]
push dword [edi - 0xc]
push dword [edi - 4]
push eax
push dword [edx]
push dword [ebx + 0x18]
call dword [edi - 0x18]
mov ecx, dword [ebp - 0x90]
add esp, 0x14
mov dword [ebp + ecx*4 - 0xb0], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x10030693
mov edx, dword [ebp - 0x8c]
mov eax, dword [ebp - 0x98]
inc dword [edi + 4]
mov dword [edi], 0
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [edi + 4]
cmp eax, dword [ebx]
jge 0x10030693
mov eax, dword [ebx + 4]
add eax, edx
mov edx, dword [ebp - 0xa0]
mov dword [edx], eax
inc ecx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0x90], ecx
cmp ecx, dword [ebp - 0xb4]
jl 0x10030600
mov ebx, dword [ebp - 0xbc]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x98], esi
mov esi, dword [ebp - 0x94]
mov eax, dword [ebx]
cmp edx, 3
jl 0x10030935
mov ecx, dword [eax + 8]
cmp ecx, 3
jne 0x1003077c
cmp dword [ebp - 0xb8], 0
je 0x10030756
xor edi, edi
cmp dword [eax], edi
jbe 0x10030bfa
mov ecx, dword [ebp - 0xac]
add esi, 2
mov eax, dword [ebp - 0xb0]
mov ebx, dword [ebp - 0xa8]
sub eax, ecx
mov dword [ebp - 0x8c], ebx
sub dword [ebp - 0x8c], ecx
mov ebx, dword [ebp - 0xbc]
mov dword [ebp - 0x94], eax
movzx eax, byte [eax + ecx]
lea ecx, [ecx + 1]
mov byte [esi - 2], al
inc edi
movzx eax, byte [ecx - 1]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x8c]
movzx eax, byte [eax + ecx - 1]
mov byte [esi], al
mov byte [esi + 1], 0xff
add esi, edx
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0x94]
jb 0x10030720
jmp 0x10030bfa
push edx
push dword [eax]
mov eax, dword [ebx + 0x4810]
push dword [ebp - 0xa8]
push dword [ebp - 0xac]
push dword [ebp - 0xb0]
push esi
call eax
add esp, 0x18
jmp 0x10030bf7
cmp ecx, 4
jne 0x10030907
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x10030854
mov dword [ebp - 0x90], ecx
cmp dword [eax], ecx
jbe 0x10030bfa
mov ecx, dword [ebp - 0xac]
lea edi, [esi + 2]
mov esi, dword [ebp - 0xa4]
sub ecx, esi
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x94], ecx
sub eax, esi
mov ecx, dword [ebp - 0xa8]
sub ecx, esi
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], ecx
movzx ecx, byte [esi + eax]
lea esi, [esi + 1]
movzx edx, byte [esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 2], al
mov eax, dword [ebp - 0x94]
movzx ecx, byte [esi + eax - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 1], al
mov eax, dword [ebp - 0x9c]
movzx ecx, byte [esi + eax - 1]
imul ecx, edx
mov edx, dword [ebp + 0x18]
mov byte [edi + 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 [edi], al
add edi, edx
mov eax, dword [ebx]
mov dword [ebp - 0x90], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xa0]
jb 0x100307d4
jmp 0x10030bfa
mov eax, dword [eax]
mov edi, dword [ebx + 0x4810]
push edx
push eax
push dword [ebp - 0xa8]
push dword [ebp - 0xac]
push dword [ebp - 0xb0]
push esi
cmp ecx, 2
jne 0x100308fd
call edi
mov eax, dword [ebx]
xor edi, edi
add esp, 0x18
cmp dword [eax], edi
jbe 0x10030bf7
add esi, 2
nop
mov eax, dword [ebp - 0xa4]
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
mov edx, dword [ebp + 0x18]
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi], al
add esi, edx
mov eax, dword [ebx]
cmp edi, dword [eax]
jb 0x10030890
jmp 0x10030bfa
call edi
add esp, 0x18
jmp 0x10030bf7
xor ecx, ecx
cmp dword [eax], ecx
jbe 0x10030bfa
inc esi
mov eax, dword [ebp - 0xb0]
mov al, byte [ecx + eax]
inc ecx
mov byte [esi + 1], al
mov byte [esi], al
mov byte [esi - 1], al
mov byte [esi + 2], 0xff
add esi, edx
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x10030912
jmp 0x10030bfa
cmp dword [ebp - 0xb8], 0
je 0x10030a35
mov eax, dword [eax]
xor edi, edi
cmp edx, 1
jne 0x100309bf
test eax, eax
je 0x10030c00
mov edx, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xac]
sub eax, edx
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0xa8]
sub eax, edx
sub esi, edx
mov dword [ebp - 0x9c], eax
nop word [eax + eax]
movzx eax, byte [eax + edx]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
inc edi
mov eax, dword [ebp - 0x94]
movzx eax, byte [edx + eax - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
add ecx, eax
shr ecx, 8
mov byte [esi + edx - 1], cl
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0x9c]
jb 0x10030980
jmp 0x10030bf7
test eax, eax
je 0x10030c00
mov edx, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xac]
sub eax, edx
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0xa8]
sub eax, edx
mov dword [ebp - 0x9c], eax
nop dword [eax]
movzx eax, byte [eax + edx]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
lea esi, [esi + 2]
mov eax, dword [ebp - 0x94]
inc edi
movzx eax, byte [edx + eax - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
mov byte [esi - 1], 0xff
add ecx, eax
shr ecx, 8
mov byte [esi - 2], cl
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0x9c]
jb 0x100309f0
jmp 0x10030bf7
cmp dword [eax + 8], 4
jne 0x10030bb2
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x10030b3e
mov dword [ebp - 0x90], ecx
cmp dword [eax], ecx
jbe 0x10030bfa
mov ecx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xac]
mov edi, dword [ebp - 0xb0]
sub eax, ecx
mov dword [ebp - 0x94], eax
sub edi, ecx
mov eax, dword [ebp - 0xa8]
sub eax, ecx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x9c], eax
movzx edi, byte [ecx + edi]
movzx eax, byte [ecx]
mov edx, dword [ebp - 0x94]
mov ebx, dword [ebp - 0x9c]
imul edi, eax
movzx ecx, byte [edx + ecx]
mov edx, dword [ebp - 0x8c]
imul ecx, eax
sub edi, 0xffffff80
movzx edx, byte [ebx + edx]
imul edx, eax
sub ecx, 0xffffff80
mov ebx, dword [ebp - 0xbc]
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
mov edx, dword [ebp + 0x18]
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 - 0x90]
shr eax, 8
inc edi
movzx eax, al
imul eax, eax, 0x4d
mov dword [ebp - 0x90], edi
add ecx, eax
shr ecx, 8
mov byte [esi], cl
add esi, edx
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x8c]
inc ecx
mov dword [ebp - 0x8c], ecx
cmp edi, dword [eax]
mov edi, dword [ebp - 0xa0]
jb 0x10030a91
jmp 0x10030bfa
cmp ecx, 2
jne 0x10030bb2
cmp dword [eax], 0
mov dword [ebp - 0x90], 0
jbe 0x10030bfa
mov eax, dword [ebp - 0xb0]
mov edx, dword [ebp - 0xa4]
sub eax, edx
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x94], eax
nop dword [eax]
mov al, byte [edx + eax]
lea edx, [edx + 1]
not al
movzx ecx, al
movzx eax, byte [edx - 1]
imul ecx, eax
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
add esi, edi
mov eax, dword [ebx]
mov dword [ebp - 0x90], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0x94]
jb 0x10030b70
jmp 0x10030bf7
mov eax, dword [eax]
xor ecx, ecx
cmp edx, 1
jne 0x10030bd9
test eax, eax
je 0x10030bfa
mov edi, dword [ebp - 0xb0]
sub edi, esi
mov al, byte [esi + edi]
lea esi, [esi + 1]
mov byte [esi - 1], al
inc ecx
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x10030bc7
jmp 0x10030bfa
test eax, eax
je 0x10030bfa
mov edx, dword [ebp - 0xb0]
mov al, byte [ecx + edx]
lea esi, [esi + 2]
mov byte [esi - 2], al
inc ecx
mov byte [esi - 1], 0xff
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x10030be3
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x88]
mov eax, dword [ebx]
inc ecx
mov edi, dword [ebp - 0x98]
mov dword [ebp - 0x88], ecx
cmp ecx, dword [eax + 4]
jb 0x100305c0
push 0
push dword [eax + 8]
push ebx
call fcn.1002eef0
mov eax, dword [ebx]
add esp, 0xc
mov ecx, dword [ebp - 0xc0]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xc4]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov eax, dword [ebp - 0xc8]
test eax, eax
je 0x10030c5d
mov ecx, dword [ebx]
xor edx, edx
cmp dword [ecx + 8], 3
setge dl
lea edx, [edx*2 + 1]
mov dword [eax], edx
pop esi
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008118d
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
push 0
push dword [eax + 8]
push ebx
call fcn.1002eef0
mov ecx, dword [0x10197f58]
add esp, 0xc
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
pop edi
pop ebx
mov dword [eax + 0xc], str.outofmem
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008118d
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10197f58]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
mov eax, dword [eax + ecx*4]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov dword [eax + 0xc], str.bad_req_comp
xor eax, eax
call fcn.1008118d
mov esp, ebp
pop ebp
ret