Function at 0x4dc370
Capabilities:
Encrypt data using rc4 via winapi
Generate random numbers via winapi

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x5184d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x70], eax
mov esi, edx
xor eax, eax
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x64], eax
mov ebx, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x48], eax
push edi
mov edi, ecx
cmp esi, 2
je 0x4dc3e8
cmp esi, 1
je 0x4dc3e8
lea eax, [ebp - 0x64]
push eax
call fcn.004dc019
mov esi, eax
test esi, esi
je 0x4dc3de
push esi
push 0x8a501a4
call dword [sym.imp.certcli.dll_Ordinal_357]
mov edi, dword [ebp - 0x48]
jmp 0x4dc55e
mov edi, dword [ebp - 0x64]
mov dword [ebp - 0x60], 1
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x68]
push 1
push edi
call dword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
jne 0x4dc40b
call fcn.004c73cc
mov esi, eax
push esi
push 0x8b401a4
jmp 0x4dc3d0
lea eax, [ebp - 0x4c]
push eax
push 1
push 0x6801
push edi
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x4dc430
call fcn.004c73cc
mov esi, eax
push esi
push 0x8bc01a4
jmp 0x4dc3d0
lea eax, [ebp - 0x44]
push eax
push 0x40
push edi
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x4dc450
call fcn.004c73cc
mov esi, eax
push esi
push 0x8c401a4
jmp 0x4dc3d0
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x5c]
push eax
push ecx
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x44]
call fcn.004d530a
mov esi, eax
test esi, esi
je 0x4dc475
push esi
push 0x8d401a4
jmp 0x4dc3d0
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x6c]
mov ecx, dword [ebp - 0x4c]
push eax
lea eax, [ebp - 0x50]
push eax
push 1
call fcn.004d526d
mov esi, eax
test esi, esi
je 0x4dc4a4
push esi
push 0x8e001a4
call dword [sym.imp.certcli.dll_Ordinal_357]
mov ebx, dword [ebp - 0x50]
jmp 0x4dc3d6
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and dword [ebp - 0x4c], ebx
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x60]
push edi
call dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x4dc4d1
call fcn.004c73cc
mov esi, eax
push esi
push 0x8f301a4
jmp 0x4dc496
mov ebx, dword [ebp - 0x50]
lea eax, [ebp - 0x4c]
push eax
push 1
push dword [ebp - 0x58]
push dword [ebp - 0x6c]
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x4dc4fe
call fcn.004c73cc
mov esi, eax
push esi
push 0x8fe01a4
jmp 0x4dc3d0
mov edx, dword [ebp - 0x5c]
lea eax, [ebp - 0x60]
mov ecx, dword [ebp - 0x4c]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x68]
call fcn.004d53fd
mov esi, eax
test esi, esi
je 0x4dc525
push esi
push 0x90601a4
jmp 0x4dc3d0
mov edx, dword [ebp - 0x70]
mov edi, dword [ebp - 0x48]
and dword [edx], 0
cmp dword [ebp - 0x60], 0x40
jne 0x4dc549
lea esi, [ebp - 0x44]
xor ecx, ecx
mov eax, dword [esi + ecx*4]
cmp eax, dword [edi + ecx*4]
jne 0x4dc549
inc ecx
cmp ecx, 0x10
jne 0x4dc539
jmp 0x4dc55c
push 0
push 0x91601a4
mov dword [edx], 0x80090003
call dword [sym.imp.certcli.dll_Ordinal_357]
xor esi, esi
cmp dword [ebp - 0x54], 0
je 0x4dc56d
push dword [ebp - 0x54]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0x4c], 0
je 0x4dc57c
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0x58], 0
je 0x4dc58b
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0x5c], 0
je 0x4dc59a
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x4dc5a5
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x4dc5b0
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x4dc5c0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005036b0
leave
ret 0xc