Function at 0x403380
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov dword [ebp - 0x40], edx
mov edx, ecx
push ebx
push esi
push edi
mov eax, dword [edx + 0xd0b8]
xor ebx, ebx
mov dword [ebp - 0x3c], eax
xor edi, edi
mov eax, dword [edx + 0xcc]
xor ecx, ecx
mov dword [ebp - 0x20], eax
xor esi, esi
mov eax, dword [edx + 0xfc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
add eax, 0x100
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x24], eax
lea eax, [edx + 0xcab8]
add edx, 0x100
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x34], edx
lea ecx, [ecx]
add ecx, dword [edx]
lea eax, [ebp - 0x144]
push pe_nt_image_headers32
push 0
push eax
mov dword [ebp - 8], ecx
call sub.MSVCR120.dll_memset
mov eax, dword [ebp - 0x18]
add esp, 0xc
mov ecx, esi
mov dword [eax + 0x300], esi
mov dword [eax], ebx
mov eax, dword [ebp - 8]
sub eax, edi
cmp eax, esi
cmovl ecx, eax
sub esi, ecx
mov edx, ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], esi
test ecx, ecx
jle 0x403442
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebx + edi*4]
dec ecx
xor esi, esi
inc edi
mov word [edx + eax*4 + 2], si
test ecx, ecx
jg 0x403426
mov esi, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x10], edi
cmp edi, dword [ebp - 8]
jge 0x403674
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x40]
inc eax
sar eax, 1
lea eax, [ecx + eax*4]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
lea ebx, [ecx + 0xc964]
mov dword [ebp - 0x38], ebx
jmp 0x403470
mov eax, dword [eax]
mov edi, dword [ecx + eax*4 + 0xc978]
mov dword [ebp - 0x30], edi
mov al, byte [edi]
test al, al
je 0x40351d
mov edx, dword [ebx + 0xc]
lea esp, [esp]
mov esi, dword [ebx]
movzx eax, al
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x4034a0
xor esi, esi
jmp 0x403501
cmp eax, edx
jle 0x4034f8
mov edi, dword [ebx + 4]
mov eax, edx
cmp edi, dword [ebx + 8]
jae 0x4034d1
cmp edx, 0x18
jg 0x4034d6
movzx edx, byte [edi]
add eax, 8
mov ecx, 0x20
inc edi
sub ecx, eax
shl edx, cl
or esi, edx
cmp edi, dword [ebx + 8]
jae 0x4034d1
cmp eax, 0x18
jle 0x4034b3
jmp 0x4034d6
mov eax, 0x40000000
mov dword [ebx + 4], edi
cmp dword [ebp - 0xc], eax
jle 0x4034eb
movzx edx, byte [edi]
movzx ecx, al
and ecx, 7
shr edx, cl
or esi, edx
mov edi, dword [ebp - 0x30]
mov edx, eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx], esi
mov ecx, 0x20
sub ecx, eax
shr esi, cl
mov edi, dword [edi + esi*4 + 4]
mov dword [ebp - 0x30], edi
movzx ecx, byte [edi + 2]
shl dword [ebx], cl
sub edx, ecx
mov dword [ebx + 0xc], edx
mov al, byte [edi]
test al, al
jne 0x403490
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x3c]
movzx ebx, byte [edi + 1]
mov byte [ecx + eax], bl
inc ecx
mov dword [ebp - 4], ecx
cmp ebx, 0xf
jae 0x4035b1
mov edi, dword [ebp - 0x38]
movzx esi, byte [ebx + 0x4a6b78]
mov edx, dword [edi]
mov eax, dword [edi + 0xc]
test esi, esi
jne 0x40354a
xor edx, edx
jmp 0x403577
cmp eax, esi
jge 0x40355c
mov edx, esi
mov ecx, edi
call fcn.00409270
mov edx, eax
mov eax, dword [edi + 0xc]
sub eax, esi
lea ecx, [esi - 1]
mov dword [edi + 0xc], eax
lea eax, [edx + edx]
shl eax, cl
mov ecx, 0x20
sub ecx, esi
mov dword [edi], eax
shr edx, cl
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 0x3c]
mov byte [ecx + esi], dl
inc ecx
mov dword [ebp - 4], ecx
test ebx, ebx
jne 0x403591
mov eax, edx
sar eax, 8
mov byte [ecx + esi], al
inc ecx
mov dword [ebp - 4], ecx
xor ecx, ecx
cmp ebx, 0xc
setl cl
xor eax, eax
neg ecx
and ecx, 0x15
cmp ebx, 2
setl al
neg eax
and eax, 0xfffffff3
add ecx, eax
shl edx, cl
jmp 0x4035b3
xor edx, edx
mov ebx, dword [ebx*4 + 0x4a69c0]
add ebx, edx
mov esi, ebx
sar esi, 8
and esi, 0xfff
test ebx, ebx
jne 0x4035d2
mov esi, closesocket
jmp 0x4035d6
test esi, esi
je 0x403625
mov ebx, dword [ebp - 8]
xor ecx, ecx
mov edi, dword [ebp - 0x10]
mov eax, ebx
mov edx, dword [ebp - 0x14]
sub eax, edi
cmp eax, esi
mov eax, ebx
setl cl
sub eax, esi
neg ecx
sub eax, edi
and ecx, eax
add ecx, esi
add edx, ecx
sub esi, ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], esi
test ecx, ecx
jle 0x403660
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
lea ebx, [ebx]
mov eax, dword [esi + edi*4]
dec ecx
xor ebx, ebx
inc edi
mov word [edx + eax*4 + 2], bx
test ecx, ecx
jg 0x403610
mov esi, dword [ebp - 0xc]
jmp 0x403657
mov edi, dword [ebp - 0x10]
mov ecx, ebx
and ecx, 0x100000
movzx eax, bl
neg ecx
xor edx, edx
xor ecx, ebx
sar ecx, 0x15
test bl, bl
cmovne ecx, edx
inc dword [ebp + eax*4 - 0x144]
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edi*4]
inc edi
mov word [edx + eax*4 + 2], cx
mov edx, dword [ebp - 0x14]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x10], edi
mov eax, dword [ebp - 0x44]
cmp edi, ebx
mov ebx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x2c]
jl 0x403470
mov ebx, dword [ebp - 4]
add dword [ebp - 0x48], edx
mov ecx, 0x3f
lea esp, [esp]
mov eax, dword [ebp + ecx*4 - 0x144]
dec ecx
add dword [ebp + ecx*4 - 0x144], eax
test ecx, ecx
jg 0x403680
mov edx, dword [ebp - 0x24]
mov ecx, 0x40
jmp 0x4036a0
mov eax, dword [ebp + ecx*4 - 0x148]
lea edx, [edx - 4]
sub dword [edx], eax
dec ecx
test ecx, ecx
jg 0x4036a0
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x34]
inc eax
add dword [ebp - 0x18], 0x100
add edx, 4
add dword [ebp - 0x24], 0x100
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x34], edx
cmp eax, 3
jl 0x4033e0
mov edx, dword [ebp - 0x2c]
mov eax, esi
pop edi
pop esi
mov dword [edx + 0xd0c0], ebx
pop ebx
mov esp, ebp
pop ebp
ret