Function at 0x803770
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x130
push ebx
mov ebx, dword [esp + 0x138]
push ebp
xor ebp, ebp
mov ecx, dword [ebx + 0xcc]
mov eax, dword [ebx + 0xd0b8]
mov edx, dword [ebx + 0xfc]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x144]
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], edx
xor eax, eax
xor edx, edx
add ecx, 0xfc
push esi
mov dword [esp + 0x1c], ecx
lea esi, [ebx + 0xcab8]
lea ecx, [ebx + 0x100]
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ecx
jmp 0x8037dc
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edi, dword [ecx]
mov ecx, 0x40
add eax, edi
lea edi, [esp + 0x40]
mov dword [esp + 0x14], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 0x300], edx
mov dword [esi], eax
mov eax, dword [esp + 0x14]
sub eax, ebp
mov esi, edx
cmp eax, edx
jge 0x80380f
mov esi, eax
mov dword [esp + 0x24], esi
sub edx, esi
mov ecx, esi
dec esi
test ecx, ecx
jle 0x80383f
mov eax, dword [esp + 0x2c]
inc esi
lea ecx, [eax + ebp*4]
add ebp, esi
mov eax, dword [ecx]
mov edi, dword [esp + 0x28]
add ecx, 4
lea eax, [edi + eax*4]
mov edi, dword [eax]
and edi, 0xffff
dec esi
mov dword [eax], edi
jne 0x803826
cmp ebp, dword [esp + 0x14]
jge 0x8039b8
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x148]
inc ecx
sar ecx, 1
lea eax, [edx + ecx*4]
lea ecx, [ebx + 0xc964]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0x3c]
mov eax, dword [edx]
mov edx, dword [esp + 0x34]
mov ecx, dword [ebx + eax*4 + 0xc978]
push ecx
push edx
call fcn.0057feb5
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x40]
mov ebx, eax
add esp, 8
mov byte [esi + edi], bl
inc esi
cmp ebx, 0xf
mov dword [esp + 0x10], esi
jae 0x8038e9
mov ecx, dword [esp + 0x34]
xor eax, eax
mov al, byte [ebx + 0x8a1cb0]
push eax
push ecx
call fcn.0057ae1f
add esp, 8
mov byte [esi + edi], al
inc esi
test ebx, ebx
mov dword [esp + 0x10], esi
jne 0x8038c9
mov edx, eax
sar edx, 8
mov byte [esi + edi], dl
inc esi
mov dword [esp + 0x10], esi
xor ecx, ecx
cmp ebx, 0xc
setl cl
neg ecx
and ecx, 0x15
xor edx, edx
cmp ebx, 2
setl dl
neg edx
and edx, 0xfffffff3
add ecx, edx
shl eax, cl
jmp 0x8038eb
xor eax, eax
mov ebx, dword [ebx*4 + 0x8a1cc0]
add ebx, eax
mov edx, ebx
sar edx, 8
and edx, 0xfff
test ebx, ebx
jne 0x80390a
mov edx, closesocket
jmp 0x80390e
test edx, edx
je 0x803960
mov ebx, dword [esp + 0x14]
xor ecx, ecx
mov eax, ebx
mov esi, dword [esp + 0x24]
sub eax, ebp
cmp eax, edx
mov eax, ebx
setl cl
sub eax, edx
neg ecx
sub eax, ebp
and ecx, eax
add ecx, edx
mov eax, ecx
add esi, eax
sub edx, eax
dec eax
mov dword [esp + 0x24], esi
test ecx, ecx
jle 0x8039a9
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
lea esi, [eax + 1]
lea ecx, [ecx + ebp*4]
add ebp, esi
mov eax, dword [ecx]
and dword [edi + eax*4], 0xffff
add ecx, 4
dec esi
lea eax, [edi + eax*4]
jne 0x80394c
jmp 0x8039a9
mov eax, ebx
mov ecx, ebx
and eax, 0x100000
and ecx, 0xff
neg eax
xor eax, ebx
sar eax, 0x15
test ecx, ecx
je 0x80397c
xor eax, eax
mov edi, dword [esp + ecx*4 + 0x40]
lea ecx, [esp + ecx*4 + 0x40]
mov esi, dword [esp + 0x28]
inc edi
mov dword [ecx], edi
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x14]
mov ecx, dword [ecx + ebp*4]
shl eax, 0x10
lea ecx, [esi + ecx*4]
mov esi, dword [ecx]
and esi, 0xffff
or eax, esi
inc ebp
mov dword [ecx], eax
cmp ebp, ebx
mov ebx, dword [esp + 0x144]
jl 0x803868
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x13c]
add ecx, eax
lea eax, [esp + 0x138]
mov dword [esp + 0x13c], ecx
mov ecx, 0x3f
mov esi, dword [eax + 4]
mov edi, dword [eax]
add edi, esi
dec ecx
mov dword [eax], edi
sub eax, 4
test ecx, ecx
ja 0x8039d8
mov eax, dword [esp + 0x20]
lea esi, [esp + 0x13c]
mov ecx, 0x40
mov edi, dword [esi]
sub esi, 4
sub dword [eax], edi
dec ecx
sub eax, 4
test ecx, ecx
ja 0x8039f9
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add ecx, 4
inc eax
mov dword [esp + 0x18], ecx
mov ecx, 0x100
add edi, ecx
add esi, ecx
cmp eax, 3
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], esi
jl 0x8037d4
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov dword [ebx + 0xd0c0], ecx
pop ebp
mov eax, edx
pop ebx
add esp, 0x130
ret