Function at 0x403730
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
push esi
push edi
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xd0b8]
mov ecx, dword [edx + 0x64]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x10], eax
mov eax, dword [edx + 0xcc]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + esi*4 + 0xa00]
mov dword [ebp - 0x34], ecx
mov ecx, dword [eax + esi*4 + 0xa18]
mov dword [ebp - 0x14], ecx
lea ecx, [esi + 4]
shl ecx, 8
add ecx, eax
mov dword [ebp - 0x24], ecx
lea ecx, [esi + 7]
shl ecx, 8
add ecx, eax
mov dword [ebp - 8], ecx
lea ecx, [esi + esi*2]
add ecx, ecx
cmp dword [ebp - 0x14], 0
mov edi, dword [eax + ecx*4 + 0xa30]
mov ecx, dword [eax + ecx*4 + 0xa34]
mov di, word [edi]
mov cx, word [ecx]
mov word [ebp - 0x18], di
mov word [ebp - 0x16], cx
mov dword [ebp - 0xc], 0
jle 0x40393d
lea edx, [esi + esi*2]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax + ecx*4]
xor eax, eax
mov dword [ebp - 0x20], edx
movzx edx, ax
mov eax, edx
shl edx, 0x10
or eax, edx
mov ecx, 0x20
lea edi, [ebp - 0xcc]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + ecx*4]
mov edx, eax
xor ecx, ecx
and edx, 0x700
cmp edx, 0x100
setne cl
shr eax, 2
and eax, 0x3f
add eax, dword [ebp - 0x2c]
xor edi, edi
lea eax, [ecx + eax*2 + 0x28c]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 0x3c], edx
lea ecx, [ecx]
mov eax, dword [ebp - 8]
cmp dword [eax + edi*4], 0
mov dword [ebp - 0x40], edi
jne 0x4038f0
mov eax, dword [ebp - 0x24]
mov esi, dword [eax + edi*4]
mov ecx, dword [ebp - 0x10]
movzx edx, byte [esi + ecx]
mov eax, dword [edx*4 + 0x4b87b0]
inc esi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x44], esi
cmp edx, 0xf
jae 0x40387c
xor ecx, ecx
cmp edx, 0xc
setl cl
xor edx, edx
neg ecx
and ecx, 0x15
cmp dword [ebp - 0x28], 2
setl dl
neg edx
and edx, 0xfffffff3
add ecx, edx
mov edx, dword [ebp - 0x10]
movzx edx, byte [esi + edx]
shl edx, cl
add eax, edx
mov edx, dword [ebp - 0x28]
inc esi
mov ecx, eax
sar ecx, 8
and ecx, 0xfff
test edx, edx
jne 0x40389f
mov edx, dword [ebp - 0x10]
movzx edx, byte [esi + edx]
shl edx, 8
inc esi
add ecx, edx
jne 0x40389f
mov ecx, closesocket
mov edx, dword [ebp - 8]
mov dword [edx + edi*4], ecx
mov edx, dword [ebp - 0x24]
mov dword [edx + edi*4], esi
movzx edx, al
add edi, edx
mov edx, eax
and edx, 0x100000
neg edx
sar edx, 0x15
sar eax, 0x15
xor edx, eax
mov eax, dword [ebp - 0x3c]
imul dx, word [eax + edi*2]
mov eax, dword [ebp - 0x30]
movzx eax, byte [edi + eax]
mov esi, dword [ebp + 0x10]
mov word [ebp + eax*2 - 0xcc], dx
xor edx, edx
test ecx, ecx
sete dl
add edi, edx
cmp edi, 0x40
jl 0x403820
jmp 0x4038f3
dec dword [eax + edi*4]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov dx, word [ecx + eax*4 + 2]
mov ecx, dword [ebp - 0x38]
mov word [ebp - 0xcc], dx
movzx edx, word [ebp + ecx*2 - 0x18]
mov ecx, dword [ebp - 0x40]
push edx
push ecx
lea edx, [ebp - 0xcc]
push edx
push esi
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [eax + 0x54]
call eax
mov eax, dword [ebp - 0xc]
inc eax
add esp, 0x18
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x14]
jl 0x4037be
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
add ecx, ecx
add ecx, ecx
add dword [eax + esi*4 + 0xa00], ecx
mov ecx, dword [eax + esi*4 + 0xa24]
mov edi, ecx
push esi
neg edi
push 1
add edi, edi
push 2
add edi, edi
add dword [eax + esi*4 + 0xa0c], edi
mov eax, dword [eax + esi*4 + 0xa0c]
push ecx
push eax
push edx
mov edx, dword [edx + 0x58]
call edx
add esp, 0x18
pop edi
pop esi
mov esp, ebp
pop ebp
ret