Function at 0x7d712bd0
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0
je 0x7d712bf2
cmp dword [ebp + 0x10], 0
jne 0x7d712bfc
mov eax, 0x57
jmp 0x7d712e7f
cmp dword [ebp + 0x20], 0
je 0x7d712c87
mov eax, dword [ebp + 0x20]
movzx ecx, word [eax]
test ecx, ecx
je 0x7d712c87
mov edx, dword [0x7d727a40]
movzx eax, byte [edx]
and eax, 1
je 0x7d712c7d
mov ecx, 1
imul ecx, ecx, 0
movsx edx, byte [ecx + str.D:DevelopOne_CoreOne_Core_Apiwrappers_basekernelbase_wrapper_reg.c]
cmp edx, 0x2e
jne 0x7d712c3b
mov dword [ebp - 0x20], 0x12
jmp 0x7d712c42
mov dword [ebp - 0x20], 0x21
push 0x7d7242c0
push 0x2c6
push 0x7d727d00
mov eax, dword [ebp - 0x20]
add eax, str.D:DevelopOne_CoreOne_Core_Apiwrappers_basekernelbase_wrapper_reg.c
push eax
mov ecx, dword [0x7d727a40]
push ecx
push 0
call fcn.7d71f8f0
add esp, 0x18
cmp eax, 0xffffffff
je 0x7d712c7d
push str.BaseDir_parameter_not_yet_supported__n
call fcn.7d71f960
add esp, 4
mov eax, 0x57
jmp 0x7d712e7f
lea edx, [ebp - 0xc]
push edx
push 0
lea eax, [ebp - 0x14]
push eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call sym.kernelbase.dll_RegQueryValueExW
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x7d712cae
jmp 0x7d712e5a
cmp dword [ebp - 0x14], 1
je 0x7d712cba
cmp dword [ebp - 0x14], 2
jne 0x7d712cc0
cmp dword [ebp - 0xc], 0
jne 0x7d712ccc
mov dword [ebp - 8], 2
jmp 0x7d712e5a
mov eax, dword [ebp - 0xc]
push eax
push 0
call sym.kernelbase.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x7d712cf2
mov dword [ebp - 8], 8
jmp 0x7d712e5a
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call sym.kernelbase.dll_RegQueryValueExW
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x7d712d1b
jmp 0x7d712e5a
cmp dword [ebp - 0x14], 2
jne 0x7d712d73
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call sym.kernelbase.dll_ExpandEnvironmentStringsW
shl eax, 1
mov dword [ebp - 0xc], eax
jne 0x7d712d3a
jmp 0x7d712e5a
mov ecx, dword [ebp - 0xc]
push ecx
push 0
call sym.kernelbase.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x7d712d60
mov dword [ebp - 8], 8
jmp 0x7d712e5a
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call sym.kernelbase.dll_ExpandEnvironmentStringsW
jmp 0x7d712d9b
mov edx, dword [ebp - 0xc]
push edx
push 0
call sym.kernelbase.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
call sub.ntext.dll_memcpy
add esp, 0xc
mov dword [ebp - 8], 0
mov eax, dword [ebp - 4]
movzx ecx, word [eax]
cmp ecx, 0x40
je 0x7d712dc5
mov edx, dword [ebp + 0x14]
shr edx, 1
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call sym.kernelbase.dll_lstrcpynW
jmp 0x7d712e5a
push 0x2c
mov edx, dword [ebp - 4]
push edx
call sub.ntext.dll_wcsrchr
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x7d712df0
mov eax, 2
shl eax, 0
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx + eax]
cmp edx, 0x2d
je 0x7d712df9
mov dword [ebp - 8], 0x3f2
jmp 0x7d712e5a
mov eax, dword [ebp - 0x18]
add eax, 4
push eax
call sub.ntext.dll__wtoi
add esp, 4
mov dword [ebp - 0x24], eax
xor ecx, ecx
mov edx, dword [ebp - 0x18]
mov word [edx], cx
push 2
push 0
mov eax, dword [ebp - 4]
add eax, 2
push eax
call sub.kernel32.dll_LoadLibraryExW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x7d712e4a
mov ecx, dword [ebp + 0x14]
shr ecx, 1
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.7d7150b0
add esp, 0x10
test eax, eax
jne 0x7d712e51
mov dword [ebp - 8], 0x3f2
mov edx, dword [ebp - 0x1c]
push edx
call sym.kernelbase.dll_FreeLibrary
mov eax, dword [ebp - 0x10]
push eax
push 0
call sym.kernelbase.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapFree
mov ecx, dword [ebp - 4]
push ecx
push 0
call sym.kernelbase.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapFree
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 0x1c