Function at 0x499220
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, ecx
lea eax, [ebp - 0x18]
mov dword [eax - 4], esp
mov dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x4293e0
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov edi, dword [ebp + 0x10]
mov dword fs:[0], eax
test byte [edi + 4], 1
jne 0x4992c6
movzx eax, byte [ebp + 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [esi]
mov ebx, dword [eax + 0x18]
mov ecx, ebx
call dword [0x4e097c]
movzx eax, word [ebp + 0x14]
mov ecx, esi
push dword [ebp - 0x24]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call ebx
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
jmp 0x4992b7
mov ebx, dword [ebp - 0x34]
shr bl, 7
mov ecx, dword [ebp - 0x38]
mov edx, ebx
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov dword [esi], eax
test dl, dl
je 0x4992ac
push ecx
call fcn.0045702d
add esp, 4
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
shr dl, 7
jmp 0x499297
lea esi, [ebp - 0x30]
mov ecx, edi
push esi
call fcn.00442810
mov dword [ebp - 0x10], 0
mov ecx, esi
push 0x4ee288
call fcn.004433a0
mov esi, eax
mov edi, dword [ebp - 0x30]
cmp edi, 0x4ee190
mov ebx, dword [ebp + 0xc]
je 0x49931b
xor eax, eax
dec eax
lock xadd dword [edi + 4], eax
test eax, eax
jne 0x49931b
mov eax, dword [edi]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, ebx
call dword [0x4e097c]
mov ecx, edi
call ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x20], ebx
xor eax, eax
dec eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov ecx, dword [esi]
mov dl, byte [ebp + 0x18]
xor dl, 1
movzx edx, dl
mov edi, dword [ecx + edx*4 + 0x14]
mov dword [ebp - 0x10], eax
mov ecx, edi
call dword [0x4e097c]
mov ecx, esi
lea ebx, [ebp - 0x30]
push ebx
call edi
movzx edx, byte [ebp - 0x25]
test dl, dl
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
mov esi, edx
cmovs esi, eax
test esi, esi
je 0x4992c1
mov dword [ebp - 0x34], edx
test dl, dl
mov esi, ebx
mov dword [ebp - 0x38], ecx
cmovs esi, ecx
mov dword [ebp - 0x24], esi
jmp 0x4993d4
mov dword [ebp - 0x20], 0
lea esi, [ebp - 0x30]
mov edx, dword [ebp - 0x38]
mov ebx, eax
mov eax, dword [ebp - 0x34]
jmp 0x4993ad
lea ecx, [eax + 2]
mov dword [ebx + 0x18], ecx
mov word [eax], si
xor edi, edi
cmp si, 0xffff
je 0x49939e
mov edi, ebx
mov al, byte [ebp - 0x25]
mov edx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edi
lea esi, [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
add ecx, 2
test al, al
mov dword [ebp - 0x38], edx
cmovs esi, edx
mov dword [ebp - 0x34], eax
movzx edi, al
cmovs edi, ebx
lea esi, [esi + edi*2]
mov dword [ebp - 0x24], ecx
cmp ecx, esi
mov eax, ebx
je 0x49928c
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x499377
mov eax, dword [ebp - 0x24]
movzx esi, word [eax]
mov eax, dword [ebx + 0x18]
cmp eax, dword [ebx + 0x1c]
jne 0x49938b
mov eax, dword [ebx]
mov edi, dword [eax + 0x30]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, edi
call dword [0x4e097c]
mov dword [ebp - 0x10], 1
movzx eax, si
mov ecx, ebx
push eax
call edi
mov esi, eax
mov ebx, dword [ebp - 0x20]
jmp 0x499394