Function at 0x61176306
Capabilities:
Encrypt data using des via winapi
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
xor eax, eax
xor ebx, ebx
push esi
push edi
lea edi, [ebp - 0x44]
mov dword [ebp - 0x10], ebx
stosd dword es:[edi], eax
mov esi, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 8], ebx
stosd dword es:[edi], eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x30], ebx
stosd dword es:[edi], eax
mov dword [ebp - 0xc], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, ebx
mov edi, ecx
test edi, edi
je 0x611766a3
cmp dword [ebp + 0x10], eax
je 0x611766a3
xor ecx, ecx
inc ecx
cmp dword [ebp + 0xc], eax
je 0x6117635e
test edx, 0x8000
cmovne eax, ecx
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
push dword [edi + 4]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x6117637b
push 0x8009000d
jmp 0x611766a5
push str.1.2.840.113549.1.1.1
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x611763e8
push str.1.2.840.10045.2.1
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x611763e8
push str.1.2.643.7.1.1.1.1
push dword [edi + 8]
mov dword [ebp - 0x44], str.1.2.840.113549.1.12.1.80
mov dword [ebp - 0x2c], 0x661e
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x14], 1
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x611763df
push str.1.2.643.7.1.1.1.2
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x611763fd
mov dword [ebp - 0x30], 1
jmp 0x611763fd
mov dword [ebp - 0x44], str.1.2.840.113549.1.12.1.3
mov dword [ebp - 0x2c], 0x6603
mov dword [ebp - 0x24], 0x19
push 0x18
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, eax
mov dword [ebp - 0x18], ecx
test ecx, ecx
jne 0x6117641a
mov esi, 0x8007000e
jmp 0x61176619
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x61176462
mov dword [ecx], 0x10041630
cmp dword [ebp + 0xc], ebx
je 0x61176448
lea eax, [ecx + 4]
push eax
push 0x10
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x61176619
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov word [ecx + 0x14], 0x202
mov dword [ebp - 0x20], 0x7d0
ror word [ebp - 0x20], 8
mov ax, word [ebp - 0x20]
mov word [ecx + 0x16], ax
mov dword [ebp - 0x40], 0x18
mov dword [ebp - 0x3c], ecx
test edx, edx
jne 0x61176492
lea eax, [ebp - 4]
push eax
push 1
push dword [ebp - 0x2c]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x611764e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x61176619
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x61176619
xor edx, edx
call fcn.61173330
test al, al
je 0x611764bb
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x61176619
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 4]
mov edx, dword [edi]
push eax
movzx eax, byte [ecx + 3]
push eax
lea eax, [ecx + 4]
mov ecx, dword [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x20]
push 0x7d0
push dword [eax + 4]
call fcn.6117b655
add esp, 0x14
jmp 0x61176481
cmp dword [ebp - 0x14], ebx
je 0x6117650f
mov eax, dword [ebp - 0x30]
push ebx
lea eax, [eax*2 + 0x661f]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
push 7
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x61176485
lea eax, [ebp - 8]
push eax
push ebx
push 0x1000
push dword [ebp - 0x24]
push dword [ebp - 4]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x61176485
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x61176410
cmp dword [ebp - 0xc], ebx
jne 0x6117655b
push dword [ebp - 8]
push 0x69
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x6117657c
lea ecx, [ebp - 8]
push ecx
push eax
push 0x1000
push dword [ebp - 0x24]
push dword [ebp - 4]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x61176485
cmp dword [ebp - 0x14], ebx
je 0x611765af
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
push dword [ebp - 8]
mov edx, dword [ebp - 4]
mov ecx, dword [edi]
push eax
push dword [edi + 8]
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x18]
add eax, 4
push eax
call fcn.6117619d
add esp, 0x18
test eax, eax
jne 0x611765c1
jmp 0x61176485
mov eax, dword [ebp - 8]
add eax, 0xfffffff8
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x1c]
add eax, 8
mov dword [ebp - 0x34], eax
mov edi, dword [sym.imp.CRYPT32.dll_CryptEncodeObject]
lea eax, [ebp - 0x28]
push eax
push ebx
lea eax, [ebp - 0x44]
push eax
push 0x2d
push 0x10001
call edi
test eax, eax
je 0x61176485
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x10]
cmp dword [ebp + 0xc], ebx
jne 0x611765f0
mov dword [ecx], eax
jmp 0x61176616
cmp dword [ecx], eax
jae 0x611765fd
mov esi, 0xea
mov dword [ecx], eax
jmp 0x61176619
push ecx
push dword [ebp + 0xc]
lea eax, [ebp - 0x44]
push eax
push 0x2d
push 0x10001
call edi
test eax, eax
je 0x61176485
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x14], 0
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x6117662a
push dword [ebp - 0x34]
call edi
push dword [ebp - 0x18]
call edi
push dword [ebp - 0x1c]
call edi
cmp dword [ebp - 0x10], 0
mov edi, dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
je 0x61176645
push dword [ebp - 0x10]
call edi
cmp dword [ebp - 4], 0
je 0x61176650
push dword [ebp - 4]
call edi
test ebx, ebx
jne 0x6117669f
mov ecx, 0x80090003
lea eax, [ecx + 0x13]
cmp esi, eax
ja 0x6117667e
je 0x61176698
cmp esi, 0x4c7
je 0x61176698
cmp esi, ecx
je 0x61176698
cmp esi, 0x8009000b
je 0x61176698
cmp esi, 0x80090010
jmp 0x61176694
cmp esi, 0x80090022
je 0x61176698
cmp esi, 0x80090345
je 0x61176698
cmp esi, 0x8010006e
je 0x61176698
mov esi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
jmp 0x611766ad
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret