Function at 0x42cf50
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 4], edi
test ebx, ebx
je 0x42d149
test eax, eax
je 0x42d149
test edi, edi
je 0x42d149
mov eax, dword [eax]
push esi
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 1
push 0
push str.SYSTEMCurrentControlSetServicesVMware_NAT_ServiceParameters
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
je 0x42cfe7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.GetNATFilePath:_Could_not_open_NAT_registry_path:_0x_08x_0x_08x
push 1
call fcn.00446b80
add esp, 0x10
push dword [ebp + 0x14]
push edi
push dword [ebp - 8]
push ebx
call fcn.0041c740
add esp, 0x10
test eax, eax
jne 0x42d113
push str.GetNATFilePath:_could_not_obtain_config_file_path
push 1
call fcn.00446b80
add esp, 8
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
add eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 0
push 0
push str.ConfigPath
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xc]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x42cfb7
mov esi, ebx
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x42d020
sub esi, ecx
mov ecx, edi
sar esi, 1
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x42d034
sub ecx, edx
sar ecx, 1
push str.GetNATFilePath:_read_NAT_config_path_from_registry
push 0x20
mov dword [ebp - 0x10], ecx
call fcn.00446b80
mov ecx, ebx
add esp, 8
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x42d060
sub ecx, edx
mov edx, dword [ebp - 0x10]
sar ecx, 1
cmp word [ebx + ecx*2 - 2], 0x5c
jne 0x42d087
inc edx
add edx, esi
cmp edx, dword [ebp - 8]
ja 0x42d091
lfence
jmp 0x42d0c9
add edx, 2
add edx, esi
cmp edx, dword [ebp - 8]
jbe 0x42d0ad
push ebx
push str.GetNATFilePath:_path_too_long_to_append_filename:__S
push 1
lfence
call fcn.00446b80
add esp, 0xc
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
lfence
lea edi, [ebx - 2]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x42d0b3
mov eax, dword [0x49a1f0]
mov dword [edi], eax
mov edi, dword [ebp - 4]
mov esi, edi
nop dword [eax + eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x42d0d0
sub edi, esi
add ebx, 0xfffffffe
mov dword [ebp - 4], edi
mov ax, word [ebx + 2]
add ebx, 2
test ax, ax
jne 0x42d0e3
mov eax, dword [ebp - 4]
mov edi, ebx
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
pop edi
mov dword [eax], edx
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push str.GetNATFilePath:_configuration_file_path:__S
push 0x20
call fcn.00446b80
add esp, 0xc
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x42d126
sub ebx, ecx
mov ecx, dword [ebp + 0xc]
sar ebx, 1
pop esi
pop edi
lea eax, [ebx + 1]
mov dword [ecx], eax
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push eax
push ebx
push str.GetNATFilePath:_invalid_parameters:_0x_08x_0x_08x
push 1
call fcn.00446b80
add esp, 0x14
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret