Function at 0x1097da8
Capabilities:
Generate random numbers via winapi

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x10d0620]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x6c], eax
xor eax, eax
cmp dword [ebp + 0xc], 2
push edi
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
je 0x1097e15
cmp dword [ebp + 0xc], 1
je 0x1097e15
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01097a84
mov edi, eax
test edi, edi
je 0x1097e09
push edi
push 0x7e301a4
jmp 0x1097f49
mov ebx, dword [ebp - 0x58]
mov dword [ebp + 0xc], 1
jmp 0x1097e18
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x50]
push eax
push esi
push 1
push ebx
call dword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
jne 0x1097e3c
call fcn.01091f43
mov edi, eax
push edi
push 0x7f201a4
jmp 0x1097f49
lea eax, [ebp - 0x48]
push eax
push 1
push dword [ebp + 0x14]
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x1097e62
call fcn.01091f43
mov edi, eax
push edi
push 0x7fa01a4
jmp 0x1097f49
lea eax, [ebp - 0x44]
push eax
push 0x40
pop esi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x1097e87
call fcn.01091f43
mov edi, eax
push edi
push 0x80201a4
jmp 0x1097f49
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x60]
push eax
push esi
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x48]
call fcn.01095531
mov edi, eax
test edi, edi
je 0x1097ead
push edi
push 0x81201a4
jmp 0x1097f49
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x4c]
push eax
push 1
push dword [ebp - 0x50]
push dword [ebp - 0x48]
call fcn.010932b3
mov edi, eax
test edi, edi
je 0x1097ed0
push edi
push 0x81e01a4
jmp 0x1097f49
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and dword [ebp - 0x48], 0
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x1097efe
call fcn.01091f43
mov edi, eax
push edi
push 0x83101a4
jmp 0x1097f49
lea eax, [ebp - 0x48]
push eax
push 1
push dword [ebp - 0x54]
push dword [ebp - 0x64]
push dword [ebp - 0x4c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1097f27
call fcn.01091f43
mov edi, eax
push edi
push 0x83c01a4
jmp 0x1097f49
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x70]
push dword [ebp - 0x60]
push dword [ebp - 0x48]
call fcn.0109334b
mov edi, eax
test edi, edi
je 0x1097f50
push edi
push 0x84401a4
call fcn.0108c55a
jmp 0x1097f86
mov edx, dword [ebp - 0x6c]
and dword [edx], 0
cmp dword [ebp - 0x68], esi
jne 0x1097f72
mov edi, dword [ebp - 0x5c]
mov ecx, esi
lea esi, [ebp - 0x44]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x1097f6e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1097f84
push 0
push 0x85401a4
mov dword [edx], 0x80090003
call fcn.0108c55a
xor edi, edi
xor ebx, ebx
cmp dword [ebp - 0x50], ebx
je 0x1097f96
push dword [ebp - 0x50]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0x48], ebx
je 0x1097fa4
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0x54], ebx
je 0x1097fb2
push dword [ebp - 0x54]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x60], ebx
je 0x1097fc2
push dword [ebp - 0x60]
call esi
cmp dword [ebp - 0x5c], ebx
je 0x1097fcc
push dword [ebp - 0x5c]
call esi
cmp dword [ebp - 0x4c], ebx
je 0x1097fd6
push dword [ebp - 0x4c]
call esi
cmp dword [ebp - 0x58], ebx
je 0x1097fe5
push ebx
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01077dc7
leave
ret 0x14