Function at 0x100238d0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x100e150f
push eax
mov eax, 0x2a40
mov dword fs:[0], esp
call fcn.10066330
push ebx
push esi
push edi
push 0x2000
lea eax, [ebp - 0x2a48]
mov ebx, ecx
push 0
push eax
call fcn.100a57f0
xor eax, eax
mov dword [ebp - 0x10], 7
add esp, 0xc
mov dword [ebp - 0x14], 0
mov word [ebp - 0x24], ax
mov dword [ebp - 4], eax
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x14]
cmp ecx, 8
jb 0x10023933
mov esi, dword [edi]
jmp 0x10023935
mov esi, edi
cmp ecx, 8
jb 0x1002393e
mov edx, dword [edi]
jmp 0x10023940
mov edx, edi
mov eax, dword [edi + 0x10]
lea edx, [edx + eax*2]
cmp ecx, 8
jb 0x1002394f
mov ecx, dword [edi]
jmp 0x10023951
mov ecx, edi
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], fcn.100acb7b
push eax
push esi
call fcn.10021aa0
add esp, 8
lea ecx, [ebp - 0x3c]
mov edx, edi
call fcn.100216b0
xor edx, edx
mov byte [ebp - 4], 1
push 0
push ecx
lea ecx, [edx + 0xa]
call fcn.1001d600
add esp, 8
test al, al
jne 0x100239a6
push 7
push ecx
push str.ext_ms_
lea ecx, [ebp - 0x3c]
call fcn.10024610
test eax, eax
jne 0x100239a6
push 4
push eax
lea ecx, [ebp - 0x3c]
call fcn.10013b80
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x3c]
push eax
mov dword [ebp - 0x48], ecx
lea edx, [ebp - 0x48]
lea ecx, [ebp - 0x4c]
push dword [eax]
call fcn.10025680
add esp, 8
mov esi, dword [eax]
cmp esi, dword [ebx + 4]
je 0x10023a59
mov ebx, dword [esi + 0x20]
mov ecx, ebx
push dword [ebp + 0xc]
call fcn.10014bc0
test eax, eax
jne 0x100239e2
mov ebx, dword [esi + 0x24]
add ebx, 0xffffffe8
cmp edi, ebx
je 0x100239f2
push 0xffffffffffffffff
push 0
push ebx
mov ecx, edi
call fcn.10013110
push dword [ebp + 0x1c]
push edi
call fcn.10024020
test eax, eax
je 0x10023e69
test byte [ebp + 0x14], 2
je 0x10023a95
push 0x1fe
lea eax, [ebp - 0x648]
push 0
push eax
call fcn.100a57f0
add esp, 0xc
lea eax, [ebp - 0x648]
push 0xff
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push edi
lea edx, [ebp - 0x648]
lea ecx, [ebp - 0x64]
call fcn.1001e580
add esp, 4
mov ecx, edi
push eax
call fcn.100122b0
lea ecx, [ebp - 0x64]
call fcn.10010e80
jmp 0x10023a95
mov ebx, dword [ebp + 0x14]
test bl, 1
jne 0x10023fb7
push dword [ebp + 0x1c]
push edi
call fcn.10024020
test eax, eax
je 0x10023a95
test bl, 4
jne 0x10023fb7
cmp dword [edi + 0x14], 8
jb 0x10023a85
mov eax, dword [edi]
jmp 0x10023a87
mov eax, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
cmp eax, 0xffffffff
je 0x10023aac
mov eax, dword fs:[0x18]
xor esi, esi
mov dword [eax + 0xbf4], 0
jmp 0x10023fcc
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push 0x101219a0
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov ebx, eax
test ebx, ebx
jne 0x10023ba7
xor esi, esi
test ebx, ebx
jne 0x10023b98
push 0x1fe
lea eax, [ebp - 0xa48]
push ebx
push eax
call fcn.100a57f0
add esp, 0xc
lea eax, [ebp - 0x448]
push 0x1fe
push ebx
push eax
call fcn.100a57f0
add esp, 0xc
mov dword [ebp + 0x14], 0xff
lea eax, [ebp + 0x14]
mov dword [ebp + 0x1c], ebx
push eax
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp + 0x1c]
push eax
push ebx
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0xa48]
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp dword [ebp - 0x28], 8
mov ebx, eax
lea eax, [ebp - 0x3c]
cmovae eax, dword [ebp - 0x3c]
push eax
lea eax, [ebp - 0x448]
push eax
call fcn.100b9463
add esp, 8
test eax, eax
jne 0x10023b8b
push 0x1fe
push eax
lea eax, [ebp - 0x848]
push eax
call fcn.100a57f0
add esp, 0xc
mov dword [ebp + 0x14], 0xff
lea eax, [ebp - 0x848]
push 0xff
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test ebx, ebx
je 0x10023e70
inc esi
cmp esi, 0x1000
jl 0x10023ad3
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edx, dword [ebp + 0x10]
cmp dword [edx + 0x10], 0
je 0x10023c11
push ecx
lea ecx, [ebp - 0xdc]
call fcn.100250e0
add esp, 4
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
push ecx
mov edx, eax
lea ecx, [ebp - 0xc4]
call fcn.100251b0
add esp, 4
lea ecx, [ebp - 0x24]
push eax
call fcn.100122b0
lea ecx, [ebp - 0xc4]
call fcn.10010e80
lea ecx, [ebp - 0xdc]
mov byte [ebp - 4], 1
call fcn.10010e80
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
cmovae eax, dword [ebp - 0x24]
push eax
call esi
cmp eax, 0xffffffff
jne 0x10023e56
push dword [ebp + 0x18]
lea eax, [ebp - 0x124]
push eax
call fcn.10024350
push 0x10121a1c
mov edx, eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10c]
call fcn.1001e470
add esp, 4
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
push ecx
mov edx, eax
lea ecx, [ebp - 0xf4]
call fcn.100251b0
add esp, 4
lea ecx, [ebp - 0x24]
push eax
call fcn.100122b0
lea ecx, [ebp - 0xf4]
call fcn.10010e80
lea ecx, [ebp - 0x10c]
call fcn.10010e80
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.10010e80
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
cmovae eax, dword [ebp - 0x24]
push eax
call esi
cmp eax, 0xffffffff
jne 0x10023e56
push 0x1000
lea eax, [ebp - 0x2a48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x2a48]
push eax
lea ecx, [ebp - 0x16c]
call fcn.10012320
push 0x10121a20
mov edx, eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x154]
call fcn.1001e470
add esp, 4
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 8
push ecx
mov edx, eax
lea ecx, [ebp - 0x13c]
call fcn.100251b0
add esp, 4
lea ecx, [ebp - 0x24]
push eax
call fcn.100122b0
lea ecx, [ebp - 0x13c]
call fcn.10010e80
lea ecx, [ebp - 0x154]
call fcn.10010e80
lea ecx, [ebp - 0x16c]
mov byte [ebp - 4], 1
call fcn.10010e80
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
cmovae eax, dword [ebp - 0x24]
push eax
call esi
cmp eax, 0xffffffff
jne 0x10023e56
push 0x1000
lea eax, [ebp - 0x2a48]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x2a48]
push eax
lea ecx, [ebp - 0x1b4]
call fcn.10012320
push 0x10121a24
mov edx, eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x19c]
call fcn.1001e470
add esp, 4
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
push ecx
mov edx, eax
lea ecx, [ebp - 0x184]
call fcn.100251b0
add esp, 4
lea ecx, [ebp - 0x24]
push eax
call fcn.100122b0
lea ecx, [ebp - 0x184]
call fcn.10010e80
lea ecx, [ebp - 0x19c]
call fcn.10010e80
lea ecx, [ebp - 0x1b4]
mov byte [ebp - 4], 1
call fcn.10010e80
lea ecx, [ebp - 0x24]
call fcn.10021a80
test al, al
jne 0x10023e56
lea eax, [ebp - 0x2a48]
push eax
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x2a48]
push eax
lea ecx, [ebp - 0x1fc]
call fcn.10012320
push 0x10121a28
mov edx, eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x1e4]
call fcn.1001e470
add esp, 4
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xc
push ecx
mov edx, eax
lea ecx, [ebp - 0x1cc]
call fcn.100251b0
add esp, 4
lea ecx, [ebp - 0x24]
push eax
call fcn.100122b0
lea ecx, [ebp - 0x1cc]
call fcn.10010e80
lea ecx, [ebp - 0x1e4]
call fcn.10010e80
lea ecx, [ebp - 0x1fc]
mov byte [ebp - 4], 1
call fcn.10010e80
lea ecx, [ebp - 0x24]
call fcn.10021a80
test al, al
je 0x10023ee9
lea eax, [ebp - 0x24]
cmp edi, eax
je 0x10023e69
push 0xffffffffffffffff
push 0
push eax
mov ecx, edi
call fcn.10013110
xor esi, esi
jmp 0x10023fcc
lea eax, [ebp - 0x848]
push eax
lea ecx, [ebp - 0xac]
call fcn.10012320
push 0x1012199c
mov edx, eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x94]
call fcn.1001e470
add esp, 4
lea ecx, [ebp - 0x448]
mov byte [ebp - 4], 3
push ecx
mov edx, eax
lea ecx, [ebp - 0x7c]
call fcn.1001e470
add esp, 4
mov ecx, edi
push eax
call fcn.100122b0
lea ecx, [ebp - 0x7c]
call fcn.10010e80
lea ecx, [ebp - 0x94]
call fcn.10010e80
lea ecx, [ebp - 0xac]
call fcn.10010e80
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
jmp 0x10023fcc
push 0x1000
lea eax, [ebp - 0x2a48]
push eax
push 0x10121a2c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x2a48]
push 0x10121a38
push eax
call fcn.100b9681
add esp, 0xc
test eax, eax
je 0x10023fb7
push eax
lea ecx, [ebp - 0x244]
call fcn.10012320
push 0x10121a40
mov edx, eax
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x22c]
call fcn.1001e470
add esp, 4
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xe
push ecx
mov edx, eax
lea ecx, [ebp - 0x214]
call fcn.100251b0
add esp, 4
lea ecx, [ebp - 0x24]
push eax
call fcn.100122b0
lea ecx, [ebp - 0x214]
call fcn.10010e80
lea ecx, [ebp - 0x22c]
call fcn.10010e80
lea ecx, [ebp - 0x244]
mov byte [ebp - 4], 1
call fcn.10010e80
lea ecx, [ebp - 0x24]
call fcn.10021a80
test al, al
jne 0x10023e56
lea eax, [ebp - 0x40]
push eax
push 0x10121a3c
push dword [ebp - 0x40]
call fcn.100b9681
add esp, 0xc
test eax, eax
jne 0x10023f20
mov eax, dword fs:[0x18]
mov esi, 0xc0000225
mov dword [eax + 0xbf4], 0xc0000225
mov eax, dword [ebp - 0x28]
cmp eax, 8
jb 0x10023fe1
inc eax
lea ecx, [ebp - 0x3c]
push eax
push dword [ebp - 0x3c]
call fcn.10013a40
mov ecx, dword [ebp - 0x10]
xor eax, eax
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], ax
cmp ecx, 8
jb 0x1002400a
inc ecx
push ecx
push dword [ebp - 0x24]
lea ecx, [ebp - 0x24]
call fcn.10013a40
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x18