Function at 0x646cb840
Capabilities:
Access peb ldr_data
Check if process is running under wine
Get process heap flags
Get process heap force flags
Query or enumerate registry value

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0xc8
mov eax, dword [ecx]
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
test byte [0x646cf018], 8
jne 0x646cbe38
test ebx, ebx
je 0x646cbe6c
lea eax, [ebp - 0x5c]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], eax
lea eax, [ebp - 0x48]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x4c]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x50]
mov dword [esp + 0x28], 0x258
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x444
mov dword [esp + 0x10], 8
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x646d25d0
mov dword [esp], 1
call sub.nsi.dll_NsiAllocateAndGetTable
sub esp, 0x34
mov edi, eax
test eax, eax
jne 0x646cbe22
mov ecx, dword [ebp - 0x5c]
test ecx, ecx
je 0x646cbd80
imul ecx, ecx, 0x258
mov eax, dword [ebp - 0x48]
add ecx, eax
lea esi, [esi]
xor edx, edx
cmp dword [eax + 0x208], 0x18
setne dl
add eax, 0x258
add edi, edx
cmp ecx, eax
jne 0x646cb930
test edi, edi
je 0x646cbd80
lea eax, [ebp - 0x58]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], eax
lea eax, [ebp - 0x40]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x44]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x1c
mov dword [esp + 0x10], 0x10
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0x646d2630
mov dword [esp], 1
call sub.nsi.dll_NsiAllocateAndGetTable
sub esp, 0x34
test eax, eax
jne 0x646cbe88
lea eax, [edi + edi*4]
mov edx, dword [ebp - 0x6c]
shl eax, 7
mov esi, eax
mov eax, dword [ebp - 0x58]
lea eax, [eax + eax*4]
lea eax, [esi + eax*8]
test edx, edx
je 0x646cbea0
cmp dword [ebx], eax
jb 0x646cbea0
lea eax, [ebp - 0x54]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0x30
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0x646d2630
mov dword [esp], 1
call sub.nsi.dll_NsiAllocateAndGetTable
mov dword [ebp - 0x7c], 0
sub esp, 0x34
mov edi, eax
test eax, eax
jne 0x646cbd8c
lea eax, [ebp - 0x38]
mov dword [esp + 4], str.SoftwareWineNetwork
mov dword [esp + 8], eax
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegOpenKeyA]
sub esp, 0xc
test eax, eax
jne 0x646cbb0e
mov dword [ebp - 0x70], 2
mov eax, str.WinsServer
lea ebx, [ebp - 0x28]
mov dword [ebp - 0x84], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x34]
mov dword [ebp - 0x34], 0x10
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExA]
sub esp, 0x18
test eax, eax
je 0x646cc1da
cmp dword [ebp - 0x70], 1
mov eax, str.BackupWinsServer
jne 0x646cc178
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x84]
sub esp, 4
test eax, eax
jne 0x646cc22c
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x7c], 0
mov ecx, dword [ebp - 0x5c]
add esi, dword [ebp - 0x6c]
mov dword [ebp - 0x80], esi
test ecx, ecx
je 0x646cc166
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x90], edi
jmp 0x646cbb50
add dword [ebp - 0x74], 1
mov eax, dword [ebp - 0x74]
cmp dword [ebp - 0x5c], eax
jbe 0x646cc160
mov ebx, dword [ebp - 0x74]
mov eax, dword [ebp - 0x48]
imul esi, ebx, 0x258
add eax, esi
cmp dword [eax + 0x208], 0x18
je 0x646cbb40
mov edi, dword [ebp - 0x6c]
add eax, 0x218
lea edx, [edi + 0x280]
mov dword [edi + 4], 0
mov dword [edi], edx
mov dword [ebp - 0x8c], edx
lea edx, [edi + 8]
mov dword [esp + 4], edx
mov dword [esp + 8], 0x104
mov dword [esp], eax
call fcn.646c2fb0
mov edx, dword [ebp - 0x48]
lea eax, [edi + 0x10c]
sub esp, 0xc
add edx, esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
add edx, 6
mov dword [esp + 0x14], 0x83
mov dword [esp + 0x10], eax
movzx eax, word [edx - 2]
mov dword [esp + 8], edx
shr ax, 1
mov dword [esp + 4], 0
movzx eax, ax
mov dword [esp], 0
mov dword [esp + 0xc], eax
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
imul edx, ebx, 0x444
add edx, dword [ebp - 0x4c]
mov byte [edi + eax + 0x10c], 0
movzx eax, word [edx + 0x218]
sub esp, 0x20
cmp eax, 8
ja 0x646cc070
mov ecx, 8
sub ecx, eax
mov dword [ebp - 0x78], ecx
mov edi, dword [ebp - 0x6c]
lea ebx, [edx + 0x21a]
mov dword [edi + 0x190], eax
add edi, 0x194
mov dword [ebp - 0x70], edi
cmp eax, 4
jae 0x646cc010
test eax, eax
je 0x646cbc53
movzx edx, byte [edx + 0x21a]
mov byte [edi], dl
test al, 2
jne 0x646cc291
mov edi, dword [ebp - 0x70]
add edi, eax
mov eax, dword [ebp - 0x78]
cmp eax, 4
jae 0x646cc07e
test eax, eax
je 0x646cbc73
mov byte [edi], 0
test al, 2
jne 0x646cc2a3
mov eax, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x58]
add eax, esi
mov esi, dword [ebp - 0x6c]
mov edx, dword [eax]
mov dword [esi + 0x19c], edx
mov eax, dword [eax + 0x208]
mov dword [esi + 0x1a4], 1
mov dword [esi + 0x1a0], eax
mov dword [esi + 0x1a8], 0
test ebx, ebx
je 0x646cc184
mov eax, dword [ebp - 0x74]
xor esi, esi
xor edi, edi
lea edx, [eax*8]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x6c]
add eax, 0x1ac
mov dword [ebp - 0x88], eax
jmp 0x646cbd49
mov eax, dword [ebp - 0x80]
mov dword [edi], eax
mov edi, eax
add eax, 0x28
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x70], edx
add ebx, 8
mov dword [esp + 4], eax
imul eax, esi, 0x1c
add eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sym.iphlpapi.dll_ConvertLengthToIpv4Mask
lea eax, [edi + 4]
mov dword [edi], 0
sub esp, 8
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.ntdll.dll_RtlIpv4AddressToStringA
lea eax, [edi + 0x14]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.ntdll.dll_RtlIpv4AddressToStringA
mov dword [edi + 0x24], 0
mov edx, dword [ebp - 0x70]
sub esp, 8
add esi, 1
cmp dword [ebp - 0x58], esi
jbe 0x646cbeb8
mov eax, dword [ebp - 0x50]
mov ebx, esi
shl ebx, 4
add ebx, dword [ebp - 0x44]
mov ecx, dword [ebx]
xor ecx, dword [eax + edx]
mov dword [ebp - 0x70], ecx
mov ecx, dword [ebx + 4]
xor ecx, dword [eax + edx + 4]
mov eax, ecx
or eax, dword [ebp - 0x70]
jne 0x646cbd3d
test edi, edi
jne 0x646cbcd8
mov edi, dword [ebp - 0x88]
jmp 0x646cbce5
mov dword [ebp - 0x7c], 0
mov edi, 0xe8
mov esi, dword [ebp - 0x7c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x3c]
sub esp, 0xc
mov dword [esp], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call sub.nsi.dll_NsiFreeTable
mov eax, dword [ebp - 0x40]
sub esp, 0x10
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 8], 0
call sub.nsi.dll_NsiFreeTable
mov eax, dword [ebp - 0x48]
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call sub.nsi.dll_NsiFreeTable
sub esp, 0x10
lea esp, [ebp - 0x10]
mov eax, edi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 8
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.info__p__size__p_n
mov dword [esp + 8], str.GetAdaptersInfo
mov dword [esp + 4], 0x646cf018
mov dword [esp], 3
call fcn.646c3090
test ebx, ebx
jne 0x646cb89e
lea esp, [ebp - 0x10]
mov edi, 0x57
pop ecx
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 8
mov dword [ebp - 0x7c], 0
mov edi, eax
jmp 0x646cbd8c
mov dword [ebx], eax
mov edi, 0x6f
mov dword [ebp - 0x7c], 0
jmp 0x646cbd8c
test edi, edi
je 0x646cc18a
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x28], 0xffffffff
mov dword [ebp - 0x70], eax
test eax, eax
je 0x646cbf20
mov eax, dword [ebp - 0x50]
mov esi, dword [ebp - 0x74]
xor edx, edx
mov edi, dword [eax + esi*8]
mov esi, dword [eax + esi*8 + 4]
mov eax, dword [ebp - 0x3c]
jmp 0x646cbefb
add edx, 1
add eax, 0x30
cmp edx, dword [ebp - 0x70]
je 0x646cbf20
mov ecx, dword [eax + 0x18]
mov ebx, dword [eax + 0x1c]
xor ecx, edi
xor ebx, esi
or ecx, ebx
jne 0x646cbef0
mov ecx, dword [eax + 0x28]
test ecx, ecx
je 0x646cbef0
cmp byte [eax + 8], 0
jne 0x646cbef0
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x30], eax
lea esi, [esi]
mov esi, dword [ebp - 0x6c]
mov dword [esi + 0x1d4], 0
lea eax, [esi + 0x1d8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x30]
mov dword [esp], eax
call sub.ntdll.dll_RtlIpv4AddressToStringA
lea eax, [esi + 0x1e8]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.ntdll.dll_RtlIpv4AddressToStringA
mov edx, dword [ebp - 0x84]
xor eax, eax
mov dword [esi + 0x1f8], 0
sub esp, 8
mov byte [esi + 0x200], 0
test edx, edx
mov dword [esi + 0x1fc], 0
setne al
mov byte [esi + 0x210], 0
mov dword [esi + 0x220], 0
mov dword [esi + 0x224], eax
mov dword [esi + 0x228], 0
mov byte [esi + 0x22c], 0
mov byte [esi + 0x23c], 0
mov dword [esi + 0x24c], 0
mov dword [esi + 0x250], 0
mov byte [esi + 0x254], 0
mov byte [esi + 0x264], 0
mov dword [esi + 0x274], 0
jne 0x646cc0bd
mov eax, dword [ebp - 0x6c]
mov dword [eax + 0x278], 0
mov dword [eax + 0x27c], 0
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x6c], eax
jmp 0x646cbb40
mov edx, dword [edx + 0x21a]
mov edi, dword [ebp - 0x6c]
mov dword [edi + 0x194], edx
add edi, 0x198
mov edx, dword [ebx + eax - 4]
mov ecx, dword [ebp - 0x70]
and edi, 0xfffffffc
mov dword [ecx + eax - 4], edx
sub ecx, edi
sub ebx, ecx
add ecx, eax
and ecx, 0xfffffffc
cmp ecx, 4
jb 0x646cbc53
mov dword [ebp - 0x88], eax
and ecx, 0xfffffffc
xor edx, edx
mov eax, dword [ebx + edx]
mov dword [edi + edx], eax
add edx, 4
cmp edx, ecx
jb 0x646cc050
mov eax, dword [ebp - 0x88]
jmp 0x646cbc53
mov dword [ebp - 0x78], 8
xor eax, eax
jmp 0x646cbc1d
mov dword [edi], 0
lea eax, [edi + 4]
mov edx, dword [ebp - 0x78]
and eax, 0xfffffffc
mov dword [edi + edx - 4], 0
sub edi, eax
add edx, edi
and edx, 0xfffffffc
cmp edx, 4
jb 0x646cbc73
and edx, 0xfffffffc
xor ecx, ecx
mov dword [eax + ecx], 0
add ecx, 4
cmp ecx, edx
jb 0x646cc0aa
jmp 0x646cbc73
mov esi, dword [ebp - 0x6c]
mov dword [ebp - 0x28], 0xffffffff
lea eax, [esi + 0x22c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x7c]
add eax, 4
mov dword [esp], eax
call sub.ntdll.dll_RtlIpv4AddressToStringA
lea eax, [esi + 0x23c]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.ntdll.dll_RtlIpv4AddressToStringA
mov dword [esi + 0x24c], 0
sub esp, 8
cmp dword [ebp - 0x84], 1
je 0x646cbfe6
mov esi, dword [ebp - 0x6c]
mov dword [esi + 0x250], 0
lea eax, [esi + 0x254]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x7c]
add eax, 0x20
mov dword [esp], eax
call sub.ntdll.dll_RtlIpv4AddressToStringA
lea eax, [esi + 0x264]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.ntdll.dll_RtlIpv4AddressToStringA
mov dword [esi + 0x274], 0
sub esp, 8
jmp 0x646cbfe6
mov edi, dword [ebp - 0x90]
mov eax, dword [ebp - 0x6c]
mov dword [eax - 0x280], 0
jmp 0x646cbd8c
mov dword [ebp - 0x70], 1
jmp 0x646cbaa5
lea eax, [ebp - 0x28]
mov dword [ebp - 0x78], eax
mov esi, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x78]
mov dword [ebp - 0x28], 0
mov dword [esi + 0x1ac], 0
lea eax, [esi + 0x1b0]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.ntdll.dll_RtlIpv4AddressToStringA
lea eax, [esi + 0x1c0]
sub esp, 8
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.ntdll.dll_RtlIpv4AddressToStringA
mov dword [esi + 0x1d0], 0
sub esp, 8
jmp 0x646cbec0
mov edx, dword [ebp - 0x84]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
lea eax, [ebp + edx*4 - 0x30]
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sub.ntdll.dll_RtlIpv4StringToAddressA
sub esp, 0x10
test eax, eax
jne 0x646cbae2
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp + edx*4 - 0x30]
mov dword [ebp - 0x74], eax
sub eax, 1
cmp eax, 0xfffffffe
adc edx, 0
mov dword [ebp - 0x84], edx
jmp 0x646cbae2
mov ebx, dword [ebp - 0x84]
mov dword [esp + 4], 8
mov eax, dword fs:[0x18]
imul edx, ebx, 0x1c
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x7c], eax
sub esp, 0xc
mov edx, eax
test eax, eax
je 0x646cbb0e
mov eax, 2
mov word [edx], ax
mov eax, dword [ebp - 0x30]
mov dword [edx + 4], eax
cmp ebx, 1
je 0x646cbb1f
mov eax, dword [ebp - 0x2c]
mov ebx, 2
mov word [edx + 0x1c], bx
mov dword [edx + 0x20], eax
jmp 0x646cbb1f
movzx edx, word [ebx + eax - 2]
mov edi, dword [ebp - 0x70]
mov word [edi + eax - 2], dx
jmp 0x646cbc53
mov eax, dword [ebp - 0x78]
xor edx, edx
mov word [edi + eax - 2], dx
jmp 0x646cbc73