Function at 0x1059a6f
Capabilities:
Encrypt data using rc4 via winapi

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 0x18]
push ebx
xor ebx, ebx
cmp dword [ebp + 0x1c], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [eax], ebx
je 0x1059ab6
lea eax, [ebp - 0x10]
push eax
call fcn.0105998e
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1059aad
push eax
push 0x33601a4
call fcn.01053610
jmp 0x1059c79
push ebx
push dword [ebp - 0x10]
call fcn.01059a43
mov eax, dword [ebp + 0x1c]
neg eax
sbb eax, eax
push esi
and eax, 0x10000008
add eax, 0xf0000000
push eax
xor esi, esi
inc esi
push esi
push ebx
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1059af7
call fcn.0106d6ff
push eax
push 0x34501a4
mov dword [ebp - 8], eax
call fcn.01053610
jmp 0x1059c78
lea eax, [ebp - 0xc]
push eax
push esi
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1059b1d
call fcn.0106d6ff
push eax
push 0x35101a4
jmp 0x1059aea
push edi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp - 4]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], esi
call edi
test eax, eax
jne 0x1059b96
call fcn.0106d6ff
push eax
push eax
push 0x35d01a4
call fcn.0105362d
push 2
pop eax
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [ebp - 4]
mov dword [ebp - 0x18], eax
call edi
test eax, eax
jne 0x1059b91
call fcn.0106d6ff
push eax
push 0x36301a4
mov dword [ebp - 8], eax
call fcn.01053610
jmp 0x1059c77
mov eax, dword [ebp + 0x18]
mov dword [eax], esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov edi, dword [ebp + 0x1c]
cmp edi, ebx
mov dword [ebp - 0xc], ebx
je 0x1059bd7
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push ebx
push esi
push ebx
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1059bd7
call fcn.0106d6ff
push eax
push 0x37701a4
jmp 0x1059b84
cmp dword [ebp - 0x18], 2
jne 0x1059bfc
push 0x8004
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.0105949a
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1059c2b
push eax
push 0x37d01a4
jmp 0x1059c19
push 0x6801
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.01059652
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1059c2b
push eax
push 0x38201a4
call fcn.01053610
push dword [ebp - 8]
push 0x38601a4
jmp 0x1059b87
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push ebx
push dword [ebp - 0x18]
push dword [ebp - 4]
call fcn.0105841b
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1059c53
push eax
push 0x39001a4
jmp 0x1059b87
cmp dword [ebp - 0x14], ebx
jne 0x1059c68
mov eax, 0x8007000d
push eax
push 0x39501a4
jmp 0x1059b84
cmp edi, ebx
je 0x1059c77
push 7
pop ecx
lea esi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x10], ebx
pop edi
pop esi
cmp dword [ebp - 0xc], ebx
je 0x1059c87
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 4], ebx
je 0x1059c96
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0x10], ebx
je 0x1059cad
push ebx
push dword [ebp - 0x10]
call fcn.01059a43
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 8]
pop ebx
leave
ret 0x18