Function at 0x1020814
Capabilities:
Create directory
Generate random numbers via winapi

Disassembly:
push 0x254
mov eax, 0x103a662
call fcn.0102af8a
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x258], eax
xor eax, eax
push 0x206
mov word [ebp - 0x23c], ax
xor ebx, ebx
lea eax, [ebp - 0x23a]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x254], ebx
mov dword [ebp - 0x24c], ebx
mov dword [ebp - 0x250], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x244], ebx
push 0x103e7d8
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 1
call fcn.01022033
mov eax, dword [esi]
mov byte [ebp - 4], 2
cmp dword [eax - 0xc], ebx
jne 0x10209e2
push 0x125
lea ecx, [ebp - 0x244]
call fcn.0101fb6a
movzx eax, al
cmp eax, ebx
jne 0x102090e
push 0x1001d3c
mov eax, 0x8007000e
push 0x1001d24
push eax
mov dword [ebp - 0x240], eax
call fcn.010262cc
mov ecx, dword [ebp - 0x248]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.0101fb10
push dword [ebp - 0x244]
mov byte [ebp - 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
cmp dword [ebp - 0x24c], 0
je 0x1020900
push 0
push dword [ebp - 0x24c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0x240]
call fcn.0102aff5
ret 0xc
push 0x104
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp eax, ebx
jne 0x1020965
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, ebx
jle 0x102093a
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov dword [ebp - 0x240], eax
jl 0x102094e
mov dword [ebp - 0x240], 0x80004005
push 0x1001ce0
push 0x1001cc8
call esi
push eax
call fcn.010263be
jmp 0x10208c8
xor eax, eax
mov word [ebp - 0x236], ax
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x248]
call fcn.01020429
mov edi, dword [ebp - 0x248]
push 0xf0000000
push 1
push ebx
push ebx
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
cmp eax, ebx
jne 0x1020a51
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, ebx
jle 0x10209ba
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov dword [ebp - 0x240], eax
jl 0x10209ce
mov dword [ebp - 0x240], 0x80004005
push 0x1001c88
push 0x1001c6c
call esi
push eax
call fcn.010263be
jmp 0x1020a46
push esi
lea ecx, [ebp - 0x248]
call fcn.010203d2
push 0x5c
lea ecx, [ebp - 0x248]
call fcn.01020478
push 0x5c
lea ecx, [ebp - 0x248]
call fcn.0102039e
mov edi, dword [ebp - 0x248]
mov eax, dword [edi - 0xc]
add eax, 0x21
push eax
lea ecx, [ebp - 0x244]
call fcn.0101fb6a
movzx eax, al
cmp eax, ebx
jne 0x1020986
mov eax, 0x8007000e
push 0x1001d3c
mov dword [ebp - 0x240], eax
push 0x1001c54
push eax
call fcn.010262cc
add esp, 0xc
lea ecx, [edi - 0x10]
jmp 0x10208d4
lea eax, [ebp - 0x34]
push eax
push 0x10
push dword [ebp - 0x24c]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x1020aa0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x1020a7d
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x240], eax
test eax, eax
jl 0x1020a91
mov dword [ebp - 0x240], 0x80004005
push 0x1001c10
push 0x1001bf8
jmp 0x10209d8
push edi
push 0x1001bf0
push 0x104
push dword [ebp - 0x244]
call fcn.0102000f
add esp, 0x10
mov dword [ebp - 0x240], eax
test eax, eax
jge 0x1020ad2
push 0x1001b90
push 0x1001b78
jmp 0x1020a40
movzx ebx, byte [ebp - 0x34]
and ebx, 7
add ebx, 9
xor esi, esi
cmp esi, ebx
jae 0x1020b2d
movzx ecx, byte [ebp + esi - 0x34]
mov eax, dword [edi - 0xc]
push ecx
mov ecx, 0x82
sub ecx, esi
add ecx, ecx
sub ecx, eax
push 0x1001b6c
push ecx
mov ecx, dword [ebp - 0x244]
lea eax, [eax + esi*2]
lea eax, [ecx + eax*2]
push eax
call fcn.0102000f
add esp, 0x10
mov dword [ebp - 0x240], eax
test eax, eax
jge 0x1020b2a
push 0x1001b10
push 0x1001af4
jmp 0x1020a40
inc esi
jmp 0x1020ade
push dword [ebp - 0x258]
push dword [ebp - 0x244]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1020b82
mov dword [ebp - 0x254], 1
inc dword [ebp - 0x250]
cmp dword [ebp - 0x254], 0
jne 0x1020b6c
cmp dword [ebp - 0x250], 0x2710
jb 0x1020a51
push dword [ebp - 0x244]
mov ecx, dword [ebp - 0x25c]
call fcn.010206ee
jmp 0x1020a49
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
je 0x1020b4d
call esi
test eax, eax
jle 0x1020ba1
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x240], eax
test eax, eax
jl 0x1020bb5
mov dword [ebp - 0x240], 0x80004005
push dword [ebp - 0x244]
push 0x1001aa8
push 0x1001a90
call esi
push eax
call fcn.010263be
add esp, 0x10
jmp 0x1020a49