Function at 0x4122c0
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe4
mov eax, dword [0x4e7018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp + 0x10]
push 0x64
mov dword [ebp - 0xd0], eax
lea eax, [ebp - 0x68]
push 0
push eax
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0xd8], 0
call fcn.0040f160
mov eax, dword [ebp - 0xd0]
add esp, 0xc
test eax, eax
je 0x4127fd
test esi, esi
je 0x4127fd
test ebx, ebx
je 0x4127fd
push 0x32
lea ecx, [ebp - 0x68]
push ecx
push eax
call fcn.004181c0
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0xd0]
push eax
jne 0x41236f
push str.GetVnetParameter:_couldnt_convert_parameter__s_to_wide_string
push 1
call fcn.004439a0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xd4]
mov ecx, 0x4975e2
test edx, edx
mov eax, ecx
cmovne eax, edx
test edi, edi
push eax
cmovne ecx, edi
push ecx
push str.GetVnetParameter:_vmnet:__s__s__s
push 0x20
call fcn.004439a0
add esp, 0x14
cmp dword [ebp + 0x14], 0
jne 0x4123c7
cmp dword [ebx], 4
je 0x4123c7
push ebx
push 4
push str.GetVnetParameter:_parameter_length_is_not__d:__d
push 1
call fcn.004439a0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xdc]
push eax
push 1
push 0
push str.SOFTWAREVMware__Inc.VMnetLibVMnetConfig
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0xd0], eax
test eax, eax
je 0x412445
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov eax, dword [ebp - 0xd0]
cmp eax, 2
jne 0x412421
push str.GetVnetParameter:_vnetlib_path_doesnt_exist_so_cant_open
push 4
call fcn.004439a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push ecx
push eax
push str.GetVnetParameter:_could_not_open_vnetlib_path:_0x_08x_0x_08x
push 4
call fcn.004439a0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push str.GetVnetParameter:_opened_vnetlib_path
push 0x10
call fcn.004439a0
add esp, 8
test edi, edi
je 0x41256e
push 0x64
lea eax, [ebp - 0xcc]
push 0
push eax
call fcn.0040f160
mov eax, dword [ebp - 0xd4]
add esp, 0xc
test eax, eax
je 0x412498
cmp byte [eax], 0
je 0x412498
push eax
push edi
push str._S_S
lea eax, [ebp - 0xcc]
push 0x32
push eax
call fcn.004159a0
add esp, 0x14
jmp 0x4124af
push edi
push 0x497f38
lea eax, [ebp - 0xcc]
push 0x32
push eax
call fcn.004159a0
add esp, 0x10
lea eax, [ebp - 0xe0]
push eax
push 1
push 0
lea eax, [ebp - 0xcc]
push eax
push dword [ebp - 0xdc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0xd4], eax
test eax, eax
je 0x412556
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov eax, dword [ebp - 0xd4]
cmp eax, 2
jne 0x41251f
lea eax, [ebp - 0xcc]
push eax
push str.GetVnetParameter:_vmnet_config_not_found:__S
push 4
call fcn.004439a0
add esp, 0xc
push dword [ebp - 0xdc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0xcc]
push edx
push ecx
push eax
push str.GetVnetParameter:_could_not_open_vmnet:_0x_08x_0x_08x__S
push 1
call fcn.004439a0
add esp, 0x14
push dword [ebp - 0xdc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xcc]
push eax
push str.GetVnetParameter:_opened_vmnet:__S
push 0x10
call fcn.004439a0
add esp, 0xc
jmp 0x41257d
push str.GetVnetParameter:_not_opening_vmnet_since_not_provided
push 0x20
call fcn.004439a0
add esp, 8
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xd4], 0
push eax
push 0
lea eax, [ebp - 0xd8]
test edi, edi
push eax
push 0
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0xdc]
cmovne eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x412614
cmp eax, 2
jne 0x4125d1
lea eax, [ebp - 0x68]
push eax
push str.GetVnetParameter:_registry_value__S_not_found
push 4
call fcn.004439a0
add esp, 0xc
jmp 0x4125e5
push eax
lea eax, [ebp - 0x68]
push eax
push str.GetVnetParameter:_could_not_query_type_of__S:_0x_08x
push 1
call fcn.004439a0
add esp, 0x10
test edi, edi
je 0x4125f5
push dword [ebp - 0xe0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0xdc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xd8]
lea eax, [ebp - 0x68]
push eax
push str.GetVnetParameter:_type_of__S:_0x_08x
push 0x20
call fcn.004439a0
mov eax, dword [ebp - 0xd8]
add esp, 0x10
cmp dword [ebp + 0x14], 0
jne 0x4126ed
cmp eax, 4
je 0x412659
cmp eax, 5
je 0x412659
push eax
push str.GetVnetParameter:_DWORD_requested__but_registry_type_is_not_a_DWORD:_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
jmp 0x4125e5
push ebx
push esi
lea eax, [ebp - 0xd8]
test edi, edi
push eax
push 0
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0xdc]
cmovne eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
je 0x4126a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
lea eax, [ebp - 0x68]
push eax
push str.GetVnetParameter:_could_not_query__S:_0x_08x_0x_08x
push 1
call fcn.004439a0
add esp, 0x14
jmp 0x4125e5
movsx eax, byte [esi]
push eax
lea eax, [ebp - 0x68]
push eax
push str.GetVnetParameter:_queried__S_as_DWORD:_0x_08x
push 0x10
call fcn.004439a0
add esp, 0x10
test edi, edi
je 0x4126cb
push dword [ebp - 0xe0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0xdc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
cmp eax, 4
je 0x412747
cmp eax, 5
je 0x412747
push ebx
push esi
lea eax, [ebp - 0xd8]
test edi, edi
push eax
push 0
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0xdc]
cmovne eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
je 0x41272f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
jmp 0x41268c
lea eax, [ebp - 0x68]
push eax
push str.GetVnetParameter:_queried__S_as_string_binary
push 0x10
call fcn.004439a0
add esp, 0xc
jmp 0x4126bb
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xd0], 0
push eax
lea eax, [ebp - 0xd0]
mov dword [ebp - 0xd4], 4
push eax
lea eax, [ebp - 0xd8]
test edi, edi
push eax
push 0
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0xdc]
cmovne eax, dword [ebp - 0xe0]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0xe4], eax
test eax, eax
je 0x4127a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0xe4]
jmp 0x41268c
push dword [ebp - 0xd0]
lea eax, [ebp - 0x68]
push eax
push str.GetVnetParameter:_queried__S__converting_to_string:__d
push 0x30
call fcn.004439a0
push dword [ebp - 0xd0]
mov eax, dword [ebx]
push 0x4995b8
shr eax, 1
push eax
push esi
call fcn.004159a0
add esp, 0x20
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4127e0
sub esi, ecx
sar esi, 1
lea eax, [esi*2 + 2]
mov dword [ebx], eax
jmp 0x4126bb
push ebx
push esi
push eax
push str.GetVnetParameter:_invalid_parameters:_0x_08x_0x_08x_0x_08x
push 1
call fcn.004439a0
mov ecx, dword [ebp - 4]
add esp, 0x14
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.00401bf1
mov esp, ebp
pop ebp
ret