Function at 0x10046d70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x30
push 1
push 0x100c5a1a
push dword [ebp + 0x10]
call fcn.1008dcc0
add esp, 0xc
test al, al
je 0x10046ba6
mov al, 1
jmp 0x10046d42
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
xor ecx, ecx
lea edi, [edx + eax]
mov dword [ebp - 0x14], edi
sub eax, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x1c], eax
je 0x10046d19
mov esi, dword [ebp - 0x10]
lea ecx, [edx + esi]
jmp 0x10046bef
add ecx, 2
cmp eax, dword [ebp - 0x14]
mov edi, 2
cmovne eax, ecx
nop dword [eax + eax]
mov ecx, dword [ebp - 0x14]
add esi, edi
cmp eax, ecx
mov ecx, eax
je 0x10046d19
movzx ebx, byte [ecx]
lea eax, [ecx + 1]
mov edi, 1
test bl, bl
jns 0x10046be0
cmp bl, 0xe0
jb 0x10046bca
mov edi, dword [ebp - 0x14]
cmp bl, 0xed
jne 0x10046c39
cmp eax, edi
je 0x10046d19
lea eax, [ecx + 2]
cmp eax, edi
je 0x10046d19
movzx edi, byte [ecx + 1]
movzx edi, di
cmp edi, 0x9f
ja 0x10046c69
add ecx, 3
mov edi, 3
mov eax, ecx
jmp 0x10046be0
add ecx, 2
cmp eax, edi
cmove ecx, eax
xor eax, eax
cmp ecx, edi
setne al
add eax, ecx
cmp bl, 0xf0
mov ebx, edi
mov edi, 3
jb 0x10046be0
xor ecx, ecx
cmp eax, ebx
mov edi, 4
setne cl
add eax, ecx
jmp 0x10046be0
movzx eax, byte [eax]
and edi, 0x1f
mov ecx, dword [ebp - 0x10]
shl edi, 6
and eax, 0x3f
lea eax, [edi + eax + 0xd800]
mov word [ebp - 0x16], ax
mov eax, esi
sub eax, ecx
jb 0x10046d58
cmp esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
ja 0x10046d4a
mov ebx, edx
add ecx, edx
mov edx, ecx
mov ecx, edi
push eax
call 0x10046d70
add esp, 4
test al, al
jne 0x10046b9f
lea eax, [ebp - 0x16]
mov dword [ebp - 0x3c], 0x100c6f48
mov dword [ebp - 0x38], 2
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], fcn.10099370
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x30], 1
push eax
push dword [edi + 0x18]
push dword [edi + 0x14]
call fcn.1008d2e0
add esp, 0xc
test al, al
jne 0x10046b9f
mov eax, dword [ebp + 0xc]
add esi, 3
mov edx, ebx
mov ecx, esi
cmp esi, eax
jbe 0x10046bb4
push 0x100c6f8c
push eax
push esi
call fcn.1008f790
mov esi, dword [ebp + 0x10]
add edx, dword [ebp - 0x10]
mov ecx, esi
push dword [ebp - 0x1c]
call 0x10046d70
add esp, 4
test al, al
mov al, 1
jne 0x10046d42
push 1
push 0x100c5a1a
push esi
call fcn.1008dcc0
add esp, 0xc
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x100c6f34
push dword [ebp + 0xc]
push esi
call fcn.1008f7f0
push 0x100c6f34
push esi
push ecx
call fcn.1008f850
nop word cs:[eax + eax]
nop
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x48
call 0x10046d7e
pop eax
mov byte [ebp - 0x54], 0x81
mov byte [ebp - 0x48], 0x81
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x2c], ecx
mov cl, 0x81
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
movzx eax, byte [ebp - 0x4a]
mov edi, dword [ebp - 0x4e]
mov esi, dword [ebp - 0x52]
mov dword [ebp - 0x10], eax
movzx eax, byte [ebp - 0x49]
mov dword [ebp - 0x28], eax
movzx eax, byte [ebp - 0x53]
mov dword [ebp - 0x14], eax
jmp 0x10046de8
mov dword [ebp - 0x14], eax
xor eax, eax
xor ebx, ebx
xor edi, edi
mov ecx, dword [ebp - 0x24]
shld edi, ebx, 0x10
shl ebx, 0x10
movzx esi, ax
or esi, ebx
cmp cl, 0x81
je 0x10046e07
movzx eax, cl
cmp eax, 0x80
je 0x10047044
mov eax, dword [ebp - 0x28]
cmp byte [ebp - 0x10], al
jb 0x10047079
test edx, edx
je 0x100470ba
cmp edx, dword [ebp - 0x34]
je 0x100470ba
movzx ebx, byte [edx]
test bl, bl
js 0x10046e40
inc edx
mov al, 2
cmp ebx, 0x27
mov dword [ebp - 0x28], eax
jbe 0x10046ec0
jmp 0x10046f2f
mov esi, edx
movzx edx, byte [edx + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x10046e9c
movzx ecx, byte [esi + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x10046f19
movzx ebx, byte [esi + 3]
and eax, 7
shl ecx, 6
shl eax, 0x12
and ebx, 0x3f
or ebx, ecx
or ebx, eax
cmp ebx, 0x110000
je 0x100470ba
mov edx, esi
add edx, 4
mov al, 2
cmp ebx, 0x27
mov dword [ebp - 0x28], eax
jbe 0x10046ec0
jmp 0x10046f2f
shl eax, 6
add esi, 2
or eax, edx
mov edx, esi
mov ebx, eax
mov al, 2
cmp ebx, 0x27
mov dword [ebp - 0x28], eax
ja 0x10046f2f
nop word cs:[eax + eax]
nop dword [eax]
mov ecx, dword [ebx*4 + 0x100470c4]
mov al, 0x30
mov dword [ebp - 0x10], 0
xor edi, edi
mov dword [ebp - 0x14], eax
mov al, 0x5c
mov dword [ebp - 0x24], eax
xor eax, eax
add ecx, dword [ebp - 0x30]
jmp ecx
shl eax, 0xc
add esi, 3
or ecx, eax
mov edx, esi
mov ebx, ecx
mov al, 2
cmp ebx, 0x27
mov dword [ebp - 0x28], eax
jbe 0x10046ec0
cmp ebx, 0x5c
jne 0x10046f47
mov al, 0x5c
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], eax
mov al, 0x5c
jmp 0x10046dd0
mov esi, edx
cmp ebx, 0x2ff
jbe 0x10046f5e
push ebx
call fcn.1009fba0
add esp, 4
test al, al
jne 0x10046f80
mov al, pe_nt_image_headers32
mov dword [ebp - 0x24], eax
push ebx
call fcn.10092090
add esp, 4
test al, al
je 0x10046f80
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], eax
mov edx, esi
jmp 0x10046dd9
mov eax, ebx
mov byte [ebp - 0x1c], 0
mov word [ebp - 0x1e], 0
or eax, 1
bsr eax, eax
xor eax, 0x1c
shr eax, 2
lea ecx, [eax - 2]
mov dword [ebp - 0x10], ecx
mov ecx, ebx
shr ecx, 0x14
movzx ecx, byte [ecx + 0x100c4ad0]
mov byte [ebp - 0x1b], cl
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xf
movzx ecx, byte [ecx + 0x100c4ad0]
mov byte [ebp - 0x1a], cl
mov ecx, ebx
shr ecx, 0xc
and ecx, 0xf
movzx ecx, byte [ecx + 0x100c4ad0]
mov byte [ebp - 0x19], cl
mov ecx, ebx
shr ecx, 8
and ecx, 0xf
movzx ecx, byte [ecx + 0x100c4ad0]
mov byte [ebp - 0x18], cl
mov ecx, ebx
and ebx, 0xf
shr ecx, 4
and ecx, 0xf
movzx ecx, byte [ecx + 0x100c4ad0]
mov byte [ebp - 0x17], cl
movzx ecx, byte [ebx + 0x100c4ad0]
mov byte [ebp - 0x16], cl
mov byte [ebp - 0x15], 0x7d
mov word [ebp + eax - 0x20], 0x755c
mov byte [ebp + eax - 0x1e], 0x7b
mov eax, dword [ebp - 0x1c]
movzx edx, byte [ebp - 0x1d]
movzx ecx, byte [ebp - 0x1e]
mov edi, dword [ebp - 0x18]
mov ebx, eax
mov dword [ebp - 0x14], edx
mov edx, esi
shrd ebx, edi, 0x10
shr edi, 0x10
cmp cl, 0x81
je 0x100470ba
mov dword [ebp - 0x24], ecx
mov cl, 0xa
mov dword [ebp - 0x28], ecx
jmp 0x10046dd9
mov eax, edi
xorps xmm0, xmm0
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 0
shld eax, esi, 0x10
xor esi, esi
movsd qword [ebp - 0x54], xmm0
jmp 0x1004709d
mov ebx, ecx
mov byte [ebp - 0x54], cl
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x24], edx
mov byte [ebp - 0x53], al
movzx eax, cl
mov dword [ebp - 0x52], esi
mov dword [ebp - 0x4e], edi
inc cl
movzx eax, byte [ebp + eax - 0x54]
mov dword [ebp - 0x10], ecx
push eax
push dword [ebp - 0x2c]
call fcn.1008e740
add esp, 8
mov edx, dword [ebp - 0x24]
test al, al
mov ecx, ebx
je 0x10046de8
mov al, 1
jmp 0x100470bc
xor eax, eax
add esp, 0x48
pop esi
pop edi
pop ebx
pop ebp
ret