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

Disassembly:
sub esp, 0x1c
mov edx, dword [esp + 0x20]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
xor ebx, ebx
push edi
or edi, 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
test edx, edx
jne 0x100e281d
mov ebp, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebx
push ebx
call ebp
mov edi, eax
test edi, edi
jne 0x100e27c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.100e8110
add esp, 4
or edi, 0xffffffff
jmp 0x100e2a05
lea eax, [edi + edi]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x100e27e9
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
jmp 0x100e29fc
push esi
push edi
call ebp
mov ecx, esi
mov dword [esp + 0x24], ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100e27f6
sub ecx, edx
lea eax, [esp + 0x20]
sar ecx, 1
push ecx
push esi
push eax
call fcn.100e61a0
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x10
jmp 0x100e2861
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100e2822
sub ecx, esi
lea eax, [esp + 0x20]
push ecx
push edx
push eax
call fcn.100e5ed0
add esp, 0xc
test eax, eax
js 0x100e29ff
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp word [eax + ecx*2 - 2], 0x2f
je 0x100e2861
lea eax, [esp + 0x20]
push 0x2f
push eax
call fcn.100e5d80
add esp, 8
push dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xffffffff
jne 0x100e28b2
call edi
cmp eax, 2
jne 0x100e29f1
push dword [esp + 0x20]
call fcn.100e8580
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x100e28a6
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
jmp 0x100e29fc
push ebx
call esi
cmp eax, 0xffffffff
je 0x100e29f1
test al, 0x10
jne 0x100e28c7
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x14
jmp 0x100e29fc
push dword [0x1020954c]
lea eax, [esp + 0x24]
push eax
call fcn.100e5de0
push dword [0x10209550]
lea eax, [esp + 0x2c]
push eax
call fcn.100e5de0
mov ecx, dword [esp + 0x30]
add esp, 0x10
mov eax, dword [esp + 0x24]
lea esi, [ecx + eax*2]
mov ecx, dword [str.XXXXXXXXXX]
mov dword [esp + 0x14], esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100e2902
sub ecx, edx
mov ebp, esi
push 0xf0000000
sar ecx, 1
push 1
push 0
push 0
lea eax, [ecx + ecx]
sub ebp, eax
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.DLL_CryptAcquireContextW]
test eax, eax
je 0x100e29f1
mov eax, esi
mov dword [esp + 0x18], 0x3e
sub eax, ebp
mov dword [esp + 0x30], eax
and eax, 0xfffffffe
mov dword [esp + 0x1c], eax
lea ecx, [ecx]
push ebp
push eax
push dword [esp + 0x18]
mov esi, ebp
call dword [sym.imp.ADVAPI32.DLL_CryptGenRandom]
test eax, eax
je 0x100e29f1
mov eax, dword [esp + 0x30]
xor ecx, ecx
inc eax
shr eax, 1
cmp dword [esp + 0x14], ebp
sbb edi, edi
not edi
and edi, eax
jbe 0x100e299d
jmp 0x100e2980
movzx eax, word [esi]
lea esi, [esi + 2]
xor edx, edx
inc ecx
div dword [esp + 0x18]
mov ax, word [edx*2 + str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]
mov word [esi - 2], ax
cmp ecx, edi
jb 0x100e2980
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
call esi
push dword [esp + 0x24]
call fcn.100e8580
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x100e2a4f
push 0
push 0x4000100
push 1
push 0
push 0
push 0xc0010000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100e2a30
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x50
mov eax, dword [esp + 0x1c]
je 0x100e2950
call edi
push eax
call fcn.100e8110
add esp, 4
or edi, 0xffffffff
mov esi, dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x100e2a16
push 0
push eax
call dword [sym.imp.ADVAPI32.DLL_CryptReleaseContext]
push ebx
call esi
lea eax, [esp + 0x24]
push eax
call fcn.100e6170
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push 0x8002
push esi
call dword [sym.imp.MSVCRT.dll__open_osfhandle]
mov edi, eax
add esp, 8
cmp edi, 0xffffffff
jne 0x100e29ff
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100e29ff
call dword [sym.imp.MSVCRT.dll__errno]
or edi, 0xffffffff
mov dword [eax], 0x16
jmp 0x100e2a05