Function at 0x1004a5f4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [ebp - 0x20], ecx
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0x14]
lea eax, [ebp - 0x18]
mov dword [eax - 4], esp
mov dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x10055a60
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov dword fs:[0], eax
xor edx, edx
mov dword [esi], edx
mov esi, dword [edi + 0x1c]
lea ecx, [ebp - 0x2c]
mov dword [ecx], esi
mov dword [ebp - 0x28], esi
lock inc dword [esi + 4]
mov dword [eax + 8], edx
push 0x101be740
call fcn.100513c8
mov dword [ebp - 0x24], eax
mov bl, byte [ebp + 0x20]
xor eax, eax
dec eax
mov edi, dword [ebp - 0x28]
lock xadd dword [edi + 4], eax
test eax, eax
jne 0x1004a552
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, esi
call dword [section..00cfg]
mov ecx, edi
call esi
mov edi, dword [ebp + 0x10]
movsx eax, bl
lea ecx, [eax - 0x41]
cmp ecx, 0x38
ja case.default.0x1004a567
mov esi, dword [ebp + 0x1c]
jmp dword [ecx*4 + 0x1004ad78]
add esi, 0x10
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
mov edx, esi
push dword [ebp - 0x24]
push dword [ebp + 0x18]
push edi
push eax
call fcn.1004a316
jmp 0x1004a5ae
add esi, 0x18
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
mov edx, esi
push dword [ebp - 0x24]
push dword [ebp + 0x18]
push edi
push eax
call fcn.1004a196
add esp, 0x10
jmp 0x1004ad2c
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 2
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
lea edx, [eax - 1]
cmp edx, 0x1e
ja 0x1004aa3d
mov edx, ecx
and edx, 4
jne 0x1004aa3d
mov dword [esi + 0xc], eax
jmp 0x1004ad2c
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x1004a633
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
je 0x1004a608
movzx eax, word [eax]
jmp 0x1004a620
mov eax, dword [esi]
mov ebx, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
call ebx
cmp ax, 0xffff
je 0x1004a633
xor ecx, ecx
mov ebx, 0
test edi, edi
jne 0x1004a63f
jmp 0x1004a683
test edi, edi
je 0x1004aaca
mov cl, 1
xor esi, esi
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 0x10]
mov dword [ebp - 0x28], edi
je 0x1004a64f
movzx eax, word [eax]
jmp 0x1004a66d
mov eax, dword [edi]
mov ebx, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x20], ecx
mov ecx, ebx
call dword [section..00cfg]
mov ecx, edi
call ebx
mov ecx, dword [ebp - 0x20]
xor ebx, ebx
cmp ax, 0xffff
sete al
je 0x1004a67b
mov ebx, dword [ebp - 0x28]
cmp cl, al
je 0x1004aab2
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], ebx
je 0x1004a69d
movzx edi, word [eax]
mov dword [ebp - 0x10], 0xffffffff
jmp 0x1004a6b7
mov eax, dword [esi]
mov edi, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, edi
call dword [section..00cfg]
mov ecx, esi
call edi
mov edi, eax
mov esi, dword [ebp - 0x24]
mov eax, dword [esi]
mov ebx, dword [eax + 0xc]
mov ecx, ebx
call dword [section..00cfg]
movzx eax, di
mov ecx, esi
push eax
push 8
call ebx
test al, al
je 0x1004aaac
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
mov ebx, dword [ebp - 0x20]
je 0x1004a6f4
add eax, 2
mov dword [esi + 0xc], eax
mov edi, ebx
jmp 0x1004a5f7
mov eax, dword [esi]
mov edi, dword [eax + 0x24]
mov ecx, edi
call dword [section..00cfg]
mov ecx, esi
call edi
mov edi, ebx
jmp 0x1004a5f7
cmp eax, 0x25
jne case.0x1004a567.67
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x1004abd4
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
je 0x1004aba7
movzx eax, word [eax]
jmp 0x1004abbf
lea edx, [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, dword [ebp - 0x20]
push 0x1019e9b2
push 0x1019e9a2
jmp 0x1004a9f4
lea edx, [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, dword [ebp - 0x20]
push 0x1019e9c2
push 0x1019e9b2
jmp 0x1004a9f4
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 2
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
cmp eax, 0x17
jle 0x1004a7c4
jmp 0x1004aa3d
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 2
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
lea edx, [eax - 1]
cmp edx, 0xb
ja 0x1004aa3d
mov edx, ecx
and edx, 4
jne 0x1004aa3d
mov dword [esi + 8], eax
jmp 0x1004ad2c
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 2
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
cmp eax, 0x3b
jg 0x1004aa3d
mov edx, ecx
and edx, 4
jne 0x1004aa3d
mov dword [esi + 4], eax
jmp 0x1004ad2c
lea edx, [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, dword [ebp - 0x20]
push 0x1019e9e2
push 0x1019e9d8
jmp 0x1004a9f4
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 2
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
cmp eax, 0x3c
jg 0x1004aa3d
mov edx, ecx
and edx, 4
jne 0x1004aa3d
mov dword [esi], eax
jmp 0x1004ad2c
lea edx, [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, dword [ebp - 0x20]
push 0x1019e9f2
push 0x1019e9e2
jmp 0x1004a9f4
mov eax, dword [ebp - 0x20]
lea ecx, [eax + 8]
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + 8]
mov ebx, dword [eax + 0x18]
jmp 0x1004a8db
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 4
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
test byte [edi], 4
jne 0x1004ad2c
add eax, 0xfffff894
mov dword [esi + 0x14], eax
jmp 0x1004ad2c
mov eax, dword [ebp - 0x20]
lea ecx, [eax + 8]
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + 8]
mov ebx, dword [eax + 0xc]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, ebx
call dword [section..00cfg]
mov ecx, dword [ebp - 0x24]
call ebx
movzx ecx, byte [eax + 0xb]
test cl, cl
jns 0x1004a8fc
mov ecx, dword [eax + 4]
mov eax, dword [eax]
lea ebx, [eax + ecx*2]
lea edx, [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
push ebx
push eax
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [edx]
jmp 0x1004a9fd
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 3
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
cmp eax, 0x16d
jg 0x1004aa3d
mov edx, ecx
and edx, 4
jne 0x1004aa3d
mov dword [esi + 0x1c], eax
jmp 0x1004ad2c
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 2
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
dec eax
cmp eax, 0xb
ja 0x1004aa3d
mov edx, ecx
and edx, 4
jne 0x1004aa3d
mov dword [esi + 0x10], eax
jmp 0x1004ad2c
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebx + 8]
add ebx, 8
mov ecx, dword [eax + 8]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], 0xffffffff
call dword [section..00cfg]
mov ecx, ebx
call dword [ebp - 0x28]
mov ebx, eax
movzx eax, byte [eax + 0xb]
test al, al
jns 0x1004a9bd
mov eax, dword [ebx + 4]
movzx ecx, byte [ebx + 0x17]
test cl, cl
jns 0x1004a9c8
mov ecx, dword [ebx + 0x10]
add eax, ecx
jne 0x1004aad6
mov eax, dword [ebp + 0x18]
or byte [eax], 4
jmp 0x1004ad2c
lea edx, [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, dword [ebp - 0x20]
push 0x1019e9d8
push 0x1019e9c2
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push eax
call fcn.10049a40
add esp, 0x1c
jmp 0x1004ad2c
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0xc]
mov edx, edi
push 1
push dword [ebp - 0x24]
mov edi, dword [ebp + 0x18]
push edi
call fcn.1004ae5c
add esp, 0xc
mov ecx, dword [edi]
cmp eax, 6
jg 0x1004aa3d
mov edx, ecx
and edx, 4
jne 0x1004aa3d
mov dword [esi + 0x18], eax
jmp 0x1004ad2c
or ecx, 4
mov dword [edi], ecx
jmp 0x1004ad2c
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], 0xffffffff
call dword [section..00cfg]
mov ecx, ebx
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [ebp - 0x24]
mov esi, dword [ebp + 8]
push esi
call dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
jmp 0x1004ad3e
add esi, 0x14
mov dword [ebp - 0x10], 0xffffffff
lea edx, [ebp + 0xc]
mov ecx, esi
push dword [ebp - 0x24]
push dword [ebp + 0x18]
push edi
call fcn.1004a482
add esp, 0xc
jmp 0x1004ad2c
mov esi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x20]
mov dword [ebp + 0xc], esi
test esi, esi
je 0x1004ab43
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
je 0x1004ab10
movzx eax, word [eax]
jmp 0x1004ab28
mov dword [ebp + 0xc], 0
jmp 0x1004ab7f
lea eax, [ebx + 0x18]
lea ecx, [ebp + 0xc]
mov edx, edi
push 0
push dword [ebp + 0x18]
push dword [ebp - 0x24]
push eax
push ebx
call fcn.100417c0
add esp, 0x14
mov ecx, dword [esi + 8]
sub eax, ebx
jne 0x1004ab8a
cmp ecx, 0xc
jne 0x1004ab8a
mov dword [esi + 8], 0
jmp 0x1004ad2c
mov eax, dword [esi]
mov edi, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, edi
call dword [section..00cfg]
mov ecx, esi
call edi
cmp ax, 0xffff
je 0x1004ab3c
test ebx, ebx
je 0x1004ad2c
mov edi, ebx
xor ebx, ebx
jmp 0x1004ab4b
mov dword [ebp + 0xc], 0
mov edi, ebx
mov bl, 1
test edi, edi
je 0x1004ab7f
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 0x10]
je 0x1004ab58
movzx eax, word [eax]
jmp 0x1004ab70
mov eax, dword [edi]
mov esi, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, esi
call dword [section..00cfg]
mov ecx, edi
call esi
cmp ax, 0xffff
sete al
xor bl, al
jne 0x1004ad2c
mov eax, dword [ebp + 0x18]
or byte [eax], 2
jmp 0x1004ad2c
cmp eax, 0xc
jne 0x1004ad2c
cmp ecx, 0xb
jg 0x1004ad2c
add ecx, 0xc
mov dword [esi + 8], ecx
jmp 0x1004ad2c
mov eax, dword [esi]
mov ebx, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
call ebx
cmp ax, 0xffff
je 0x1004abcd
xor edx, edx
test edi, edi
jne 0x1004abdc
jmp 0x1004ac22
mov dword [ebp + 0xc], 0
test edi, edi
je 0x1004ac3d
mov dl, 1
xor esi, esi
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 0x10]
je 0x1004abe9
movzx eax, word [eax]
jmp 0x1004ac07
mov eax, dword [edi]
mov ebx, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, ebx
mov dword [ebp - 0x28], edx
call dword [section..00cfg]
mov ecx, edi
call ebx
mov edx, dword [ebp - 0x28]
xor ecx, ecx
cmp ax, 0xffff
cmove edi, ecx
sete al
mov ecx, 6
cmp dl, al
mov edx, edi
je 0x1004ad27
mov dword [ebp - 0x28], edx
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
je 0x1004ac47
movzx eax, word [eax]
mov word [ebp - 0x20], ax
mov dword [ebp - 0x10], 0xffffffff
jmp 0x1004ac63
mov ecx, 6
jmp 0x1004ad27
mov eax, dword [esi]
mov edi, dword [eax + 0x20]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, edi
call dword [section..00cfg]
mov ecx, esi
call edi
mov word [ebp - 0x20], ax
mov edi, dword [ebp - 0x24]
mov eax, dword [edi]
mov ebx, dword [eax + 0x34]
mov ecx, ebx
call dword [section..00cfg]
movzx eax, word [ebp - 0x20]
mov ecx, edi
push 0
push eax
call ebx
mov ecx, 4
cmp al, 0x25
mov edi, dword [ebp - 0x28]
jne 0x1004ad27
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
je 0x1004ac9e
add eax, 2
mov dword [esi + 0xc], eax
jmp 0x1004acb2
mov eax, dword [esi]
mov edi, dword [eax + 0x24]
mov ecx, edi
call dword [section..00cfg]
mov ecx, esi
call edi
mov edi, dword [ebp - 0x28]
test esi, esi
je 0x1004acec
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
je 0x1004acc3
movzx eax, word [eax]
jmp 0x1004acd7
mov eax, dword [esi]
mov edi, dword [eax + 0x20]
mov ecx, edi
call dword [section..00cfg]
mov ecx, esi
call edi
mov edi, dword [ebp - 0x28]
cmp ax, 0xffff
je 0x1004ace5
test edi, edi
je 0x1004ad2c
xor ebx, ebx
jmp 0x1004acf2
mov dword [ebp + 0xc], 0
mov bl, 1
test edi, edi
je 0x1004ad22
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 0x10]
je 0x1004acff
movzx eax, word [eax]
jmp 0x1004ad10
mov eax, dword [edi]
mov esi, dword [eax + 0x20]
mov ecx, esi
call dword [section..00cfg]
mov ecx, edi
call esi
cmp ax, 0xffff
sete al
xor bl, al
mov ecx, 2
je 0x1004ad27
jmp 0x1004ad2c
mov ecx, 2
mov eax, dword [ebp + 0x18]
or dword [eax], ecx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret 0x20