Function at 0x10069410
Capabilities:
Check if file exists
Generate random numbers via winapi
Get common file path
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
or dword [ebp - 4], 0xffffffff
push ebx
push esi
mov esi, edx
xor ebx, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
push edi
test esi, esi
jne 0x10069536
push ebx
push ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.api_ms_win_core_file_l1_2_0.dll_GetTempPathW]
mov edi, eax
test edi, edi
je 0x1006964f
lea eax, [edi + edi]
push eax
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x10069471
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
mov dword [eax], 0xc
jmp 0x1006965c
push esi
push edi
call dword [sym.imp.api_ms_win_core_file_l1_2_0.dll_GetTempPathW]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x1006947e
sub ecx, edx
mov edx, esi
sar ecx, 1
push ecx
lea ecx, [ebp - 0x20]
call fcn.10064cec
push esi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_free]
pop ecx
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x100694ef
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 2
jne 0x1006964f
mov ecx, dword [ebp - 0x20]
call fcn.10069d6e
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x100694df
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
mov dword [eax], 0x16
jmp 0x1006965c
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1006964f
test al, 0x10
jne 0x10069504
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
mov dword [eax], 0x14
jmp 0x1006965c
mov esi, 0x1000000
lea ecx, [ebp - 0x20]
push esi
mov edx, 0x1001faf4
call fcn.10064cec
push esi
mov edx, 0x1001fbb4
lea ecx, [ebp - 0x20]
call fcn.10064cec
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
lea ebx, [ecx + eax*2]
lea edi, [ebx - 0x14]
jmp 0x10069572
push 0x58
pop eax
push eax
push esi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcschr]
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x100696be
movzx eax, word [edi]
mov ebx, edi
push 0x58
pop edx
mov ecx, eax
cmp ax, dx
jne 0x10069569
add ebx, 2
movzx eax, word [ebx]
cmp ax, dx
je 0x1006955c
mov ecx, eax
test cx, cx
jne 0x100696be
push 0
push 0
push 0x10012c10
lea eax, [ebp - 8]
push eax
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x1006964f
mov esi, ebx
sub esi, edi
and esi, 0xfffffffe
push 0
push esi
push edi
push dword [ebp - 8]
mov dword [ebp - 0x14], edi
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
js 0x1006964f
cmp edi, ebx
jae 0x100695d3
mov ecx, edi
movzx eax, word [ecx]
xor edx, edx
mov dword [ebp - 0x14], 0x3e
div dword [ebp - 0x14]
mov ax, word [edx*2 + 0x1001fb38]
mov word [ecx], ax
add ecx, 2
cmp ecx, ebx
jb 0x100695b2
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_free]
pop ecx
mov ecx, dword [ebp - 0x10]
call fcn.10069d6e
mov dword [ebp - 0xc], eax
test eax, eax
je 0x100694ce
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x20]
jne 0x10069604
mov ecx, 0x100
mov edx, 0x4000000
jmp 0x1006960b
mov ecx, 0x80
xor edx, edx
and dword [ebp - 0x24], 0
xorps xmm0, xmm0
mov dword [ebp - 0x34], ecx
lea ecx, [ebp - 0x38]
push ecx
push 1
push 0
push 0xc0010000
push eax
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x38], 0x18
mov dword [ebp - 0x30], edx
call dword [sym.imp.api_ms_win_core_file_l1_2_0.dll_CreateFile2]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x10069691
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x50
je 0x10069594
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
call fcn.1006a813
mov ebx, dword [ebp - 4]
cmp dword [ebp - 8], 0
je 0x10069670
push 0
push dword [ebp - 8]
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_free]
mov eax, dword [ebp - 0x10]
pop ecx
cmp eax, dword [ebp - 0x20]
jne 0x1006968a
lea ecx, [ebp - 0x20]
call fcn.10064c22
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
push 0x8002
push eax
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__open_osfhandle]
mov ebx, eax
pop ecx
pop ecx
cmp ebx, 0xffffffff
jne 0x1006965f
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
call fcn.1006a813
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
jmp 0x1006965f
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_abort]
int3