Function at 0x4039c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ebp, dword [ecx]
xor eax, eax
cmp byte [ebp], 0x22
jne 0x403c71
mov esi, ebp
jmp 0x4039ef
lea esi, [ebx + 2]
mov dword [ecx], esi
cmp byte [ebx + 2], 0
je 0x403c71
mov ebx, esi
inc esi
mov dword [ecx], esi
movzx edi, byte [ebx + 1]
cmp edi, 0x5c
je 0x4039e0
test edi, edi
je 0x403c71
cmp edi, 0x22
jne 0x4039ef
mov dword [esp + 8], edx
add ebx, 2
mov dword [ecx], ebx
mov edi, ebp
sub ebx, ebp
lea eax, [ebx - 1]
push eax
call dword [0x43d8e8]
add esp, 4
mov edx, eax
test eax, eax
je case.0x403a77.35
mov esi, edx
add ebx, 0xfffffffe
je 0x403c19
movzx eax, byte [edi + 1]
mov esi, edx
test al, al
je 0x403c19
mov ebp, edi
inc ebp
mov esi, edx
mov dword [esp + 0xc], ebp
mov dword [esp], edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp al, 0x5c
jne 0x403a90
movzx eax, byte [ebp + 1]
add eax, 0xffffffde
cmp eax, 0x53
ja case.0x403a77.35
lea edi, [ebp + 1]
jmp dword [eax*4 + 0x43a6bc]
mov byte [esi], 0x22
jmp 0x403a9c
cmp al, 0x20
jb case.0x403a77.35
mov byte [esi], al
mov edi, ebp
inc esi
movzx eax, byte [edi + 1]
test al, al
mov ebp, dword [esp + 0xc]
je 0x403c19
inc edi
mov ecx, edi
sub ecx, ebp
mov ebp, edi
cmp ecx, ebx
jb 0x403a60
jmp 0x403c19
mov byte [esi], 0xa
jmp 0x403a9c
mov byte [esi], 0x2f
jmp 0x403a9c
mov byte [esi], 8
jmp 0x403a9c
lea ecx, [ebp + 2]
lea edx, [esp + 0x14]
call fcn.00403c80
test eax, eax
jne 0x403c62
mov ecx, dword [esp + 0x14]
cmp ecx, 0x7f
ja 0x403b0e
mov byte [esi], cl
mov eax, 1
add edi, eax
add edi, 3
mov edx, dword [esp]
jmp 0x403a9c
mov byte [esi], 0x5c
jmp 0x403a9c
mov byte [esi], 0xd
jmp 0x403a9c
mov byte [esi], 0xc
jmp 0x403a9c
mov byte [esi], 9
jmp 0x403a9c
cmp ecx, 0x7ff
mov edx, dword [esp]
ja 0x403b2e
mov eax, ecx
shr eax, 6
or al, 0xc0
mov byte [esi], al
and cl, 0x3f
or cl, 0x80
mov byte [esi + 1], cl
inc esi
jmp 0x403b5e
lea eax, [ecx - 0xe000]
cmp eax, 0xfffff7ff
ja 0x403b6d
mov eax, ecx
shr eax, 0xc
and al, 0xf
or al, 0xe0
mov byte [esi], al
mov eax, ecx
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [esi + 1], al
and cl, 0x3f
or cl, 0x80
mov byte [esi + 2], cl
add esi, 2
mov eax, 1
add edi, eax
add edi, 3
jmp 0x403a9c
cmp ecx, 0xdbff
ja 0x403c62
cmp byte [ebp + 6], 0x5c
jne 0x403c62
cmp byte [ebp + 7], 0x75
jne 0x403c62
add ebp, 8
mov dword [esp + 4], ecx
mov ecx, ebp
lea edx, [esp + 0x10]
call fcn.00403c80
mov ecx, dword [esp + 4]
test eax, eax
jne 0x403c62
mov eax, dword [esp + 0x10]
cmp eax, 0xdc00
jb 0x403c62
cmp eax, 0xdfff
ja 0x403c62
shl ecx, 0xa
and ecx, 0xffc00
mov ebp, eax
mov edx, eax
and edx, 0x3ff
mov eax, ecx
add ecx, edx
add eax, edx
add eax, 0x10000
mov edx, eax
shr edx, 0x12
or dl, 0xf0
mov byte [esi], dl
shr eax, 0xc
and al, 0x3f
or al, 0x80
mov byte [esi + 1], al
shr ecx, 6
and cl, 0x3f
or cl, 0x80
mov byte [esi + 2], cl
mov eax, ebp
and al, 0x3f
or al, 0x80
mov byte [esi + 3], al
add esi, 3
mov eax, 7
jmp 0x403af0
mov byte [esi], 0
mov eax, esi
xor eax, edx
mov ebx, edx
not ebx
and ebx, esi
add ebx, ebx
sub ebx, eax
lea esi, [ebx + 1]
push esi
mov edi, edx
call dword [0x43d8e8]
mov edx, edi
add esp, 4
test eax, eax
je case.0x403a77.35
push esi
push edx
push eax
mov edi, eax
mov esi, edx
call fcn.00409540
add esp, 0xc
mov eax, dword [esp + 8]
mov dword [eax], ebx
push esi
call dword [0x43d8e4]
add esp, 4
mov eax, edi
jmp 0x403c71
mov edx, dword [esp]
push edx
call dword [0x43d8e4]
add esp, 4
xor eax, eax
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret