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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
or dword [ebp - 8], 0xffffffff
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x2c], edx
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
lea ebx, [ecx + 0x10]
push ebx
mov dword [ebp - 0x1c], ecx
stosd dword es:[edi], eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
jne 0x101349d
test byte [0x102407c], 0x10
je 0x101358a
push 0x1002184
push 0x1a
push dword [0x1024074]
push dword [0x1024070]
call fcn.0100332b
jmp 0x101358a
mov dword [ebp - 0x20], esi
add esi, 0xd
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp - 0xc], edi
jne 0x10134e5
test byte [0x102407c], 0x10
je 0x10134d9
push 0x1002184
push 0x1b
push dword [0x1024074]
push dword [0x1024070]
call fcn.0100332b
mov dword [ebp - 4], 0xe
jmp 0x10138ac
push ebx
push esi
push edi
call fcn.01013046
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 4], eax
jge 0x1013521
test byte [0x102407c], 0x10
je 0x1013892
push eax
push 0x1002184
push 0x1c
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
jmp 0x1013892
push 0x100228c
push esi
push edi
call fcn.0101341d
cmp eax, ebx
mov dword [ebp - 4], eax
jge 0x101354b
test byte [0x102407c], 0x10
je 0x1013892
push eax
push 0x1002184
push 0x1d
jmp 0x101350b
push 0xf0000000
push 1
push ebx
push ebx
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1013596
test byte [0x102407c], 0x10
je 0x101358a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002184
push 0x1e
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
mov dword [ebp - 4], 0x8004020e
jmp 0x10138ac
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], 0xc
mov ebx, 0x1002184
cmp dword [ebp - 0x14], 0x100
jae 0x10136b4
push 0x1002240
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push 8
lea esi, [eax + ecx*2]
pop edi
lea eax, [ebp - 0x18]
push eax
push 4
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov eax, dword [ebp - 0x18]
xor edx, edx
div dword [ebp - 8]
mov dword [ebp - 0x18], edx
mov ax, word [edx*2 + 0x1002240]
mov word [esi], ax
inc esi
inc esi
dec edi
jne 0x10135d2
test byte [0x102407c], 0x10
je 0x101361c
push dword [ebp - 0xc]
push ebx
push 0x1f
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003351
push 0
push 0xc002006
push 1
lea eax, [ebp - 0x2c]
push eax
push 4
push 0xc0010000
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 8], edi
jne 0x101368a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 5
je 0x101367a
cmp eax, 0x50
jne 0x10136ea
test byte [0x102407c], 0x10
je 0x10136a8
push 8
push ebx
push 0x21
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
jmp 0x10136a8
test byte [0x102407c], 0x10
je 0x10136a8
push 8
push ebx
push 0x20
jmp 0x1013667
test byte [0x102407c], 0x10
je 0x10136a8
push edi
push ebx
push 0x23
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
inc dword [ebp - 0x14]
cmp edi, 0xffffffff
je 0x10135ab
cmp dword [ebp - 8], 0xffffffff
jne 0x10136fb
test byte [0x102407c], 0x10
je 0x10136de
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x24
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
mov dword [ebp - 4], 0x80040218
jmp 0x10138ac
test byte [0x102407c], 0x10
je 0x10136de
call esi
push eax
push ebx
push 0x22
jmp 0x10136cd
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1013735
test byte [0x102407c], 0x10
je 0x1013729
push dword [ebp - 4]
push ebx
push 0x25
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
mov dword [ebp - 4], 0x8004021e
jmp 0x1013897
test ah, 0x40
je 0x1013763
test byte [0x102407c], 0x10
je 0x1013757
push ebx
push 0x26
push dword [0x1024074]
push dword [0x1024070]
call fcn.0100332b
mov dword [ebp - 4], 0x80040229
jmp 0x1013897
xor esi, esi
test ah, 8
je 0x1013865
xor eax, eax
test byte [0x102407c], 0x10
mov dword [ebp - 0x40], esi
lea edi, [ebp - 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x20], esi
stosd dword es:[edi], eax
je 0x101379a
push ebx
push 0x27
push dword [0x1024074]
push dword [0x1024070]
call fcn.0100332b
push esi
push esi
push 1
push esi
mov dword [ebp - 4], 0x80040228
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, esi
mov dword [ebp - 0x30], eax
jne 0x10137e0
test byte [0x102407c], 0x10
je 0x1013897
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x28
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
jmp 0x1013897
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x18]
push eax
push esi
push esi
push 2
lea eax, [ebp - 0x20]
push eax
push 0x9c040
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
cmp edi, esi
jne 0x1013826
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1013826
push 1
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edi, eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, esi
jne 0x1013848
test byte [0x102407c], 0x10
je 0x1013897
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x29
jmp 0x10137ca
test byte [0x102407c], 0x10
je 0x1013885
push ebx
push 0x2a
push dword [0x1024074]
push dword [0x1024070]
call fcn.0100332b
test byte [0x102407c], 0x10
je 0x1013885
push dword [ebp - 8]
push ebx
push 0x2b
push dword [0x1024074]
push dword [0x1024070]
call fcn.01003407
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov dword [ebp - 4], esi
xor ebx, ebx
cmp dword [ebp - 4], ebx
jge 0x10138ac
cmp dword [ebp - 8], 0xffffffff
je 0x10138ac
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
or dword [eax], 0xffffffff
xor esi, esi
cmp dword [ebp - 0x10], esi
je 0x10138bd
push esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0xc], esi
pop edi
pop esi
pop ebx
je 0x10138ce
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
leave
ret