Function at 0x4be170
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edx
xor edx, edx
push 0x206
mov dword [ebp - 0x22c], eax
push edx
lea eax, [ebp - 0x216]
push eax
mov dword [ebp - 0x224], ecx
mov word [ebp - 0x218], dx
call fcn.004e8ba0
add esp, 0xc
mov ecx, str.HKEY_LOCAL_MACHINE
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4be1e8
test dx, dx
je 0x4be1e4
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4be1e8
add eax, 4
add ecx, 4
test dx, dx
jne 0x4be1c2
xor eax, eax
jmp 0x4be1ed
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4be1f8
mov esi, reloc.WS2_32.dll_bind
jmp 0x4be238
mov ecx, str.HKEY_CURRENT_USER
mov eax, esi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4be226
test dx, dx
je 0x4be222
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4be226
add eax, 4
add ecx, 4
test dx, dx
jne 0x4be200
xor eax, eax
jmp 0x4be22b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4be745
mov esi, reloc.WS2_32.dll_accept
mov dword [ebp - 0x21c], 0
call fcn.004bc0d0
test eax, eax
jne 0x4be256
lea ecx, [ebp - 0x21c]
push ecx
push 1
jmp 0x4be262
lea edx, [ebp - 0x21c]
push edx
push 0x101
push 0
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4be2d5
push ebx
lea eax, [ebp - 0x218]
push str.__s__RegQuery_OpenKey_Failed_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
push 0x54a0bc
xor edx, edx
xor ecx, ecx
call fcn.004a3a40
mov edx, dword [ebp - 0x224]
mov eax, str.NULL
add esp, 8
sub edx, eax
jmp 0x4be2b0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4be2b0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor eax, eax
lea edx, [ebp - 0x220]
push edx
mov edx, dword [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x228]
push ecx
push eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x21c]
push edx
push eax
call edi
mov esi, eax
test esi, esi
jne 0x4be6b9
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x4be6b9
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x4be6b9
cmp eax, 1
je 0x4be3a5
cmp eax, 4
je 0x4be3a5
cmp eax, 3
je 0x4be3a5
cmp eax, 7
je 0x4be3a5
cmp eax, 0xb
je 0x4be3a5
cmp eax, 2
je 0x4be3a5
mov ecx, dword [ebp - 0x21c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x228]
push edx
push ebx
lea eax, [ebp - 0x218]
push str.__s__RegQuery_Type__u__Exception_1__
push eax
mov dword [ebp - 0x21c], esi
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [ebp - 0x218]
push ecx
push 0x54a0bc
xor edx, edx
xor ecx, ecx
call fcn.004a3a40
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
push ecx
call fcn.004e5420
mov esi, eax
add esp, 4
mov dword [ebp - 0x230], esi
test esi, esi
jne 0x4be435
mov edx, dword [ebp - 0x21c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
lea eax, [ebp - 0x218]
push str.__s__Alloc_Data_Bufffer_Failed_
push eax
mov dword [ebp - 0x21c], esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
push 0x54a0bc
xor edx, edx
xor ecx, ecx
call fcn.004a3a40
mov edx, dword [ebp - 0x224]
mov eax, str.NULL
add esp, 8
sub edx, eax
jmp 0x4be410
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4be410
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x220]
push edx
push 0
push esi
call fcn.004e8ba0
mov edx, dword [ebp - 0x22c]
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
mov eax, dword [ebp - 0x21c]
push esi
lea ecx, [ebp - 0x228]
push ecx
push 0
push edx
push eax
call edi
test eax, eax
je 0x4be505
mov ecx, dword [ebp - 0x21c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x220]
push edx
push 0
push esi
mov dword [ebp - 0x21c], 0
call fcn.004e8ba0
add esp, 0xc
push esi
call fcn.004e577a
add esp, 4
push ebx
lea eax, [ebp - 0x218]
push str.__s__RegQuery_QueryValue_Failed_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
push 0x54a0bc
xor edx, edx
xor ecx, ecx
call fcn.004a3a40
mov edx, dword [ebp - 0x224]
mov eax, str.NULL
add esp, 8
sub edx, eax
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4be4e0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x228]
cmp eax, 1
je 0x4be65a
cmp eax, 2
je 0x4be65a
cmp eax, 4
je 0x4be643
cmp eax, 0xb
je 0x4be643
cmp eax, 3
jne 0x4be5d0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x220]
add eax, eax
cmp ecx, eax
jbe 0x4be54a
lea ecx, [eax - 2]
xor eax, eax
xor edx, edx
xor ebx, ebx
mov dword [ebp - 0x22c], ecx
mov word [ebp - 0x10], dx
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
test ecx, ecx
jle 0x4be671
movzx eax, byte [ebx + esi]
push eax
lea ecx, [ebp - 0x10]
push str._02X
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x10]
add esp, 0xc
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4be584
mov edi, dword [ebp - 0x224]
sub eax, edx
add edi, 0xfffffffe
lea ebx, [ebx]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4be5a0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x230]
cmp ebx, dword [ebp - 0x22c]
jl 0x4be568
jmp 0x4be671
cmp eax, 7
jne 0x4be671
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp + 0x14]
shr eax, 1
cmp eax, ecx
jbe 0x4be5eb
lea eax, [ecx - 1]
cmp word [esi + eax*2 - 2], 0
lea ecx, [esi + eax*2 - 2]
jne 0x4be601
sub ecx, 2
dec eax
cmp word [ecx], 0
je 0x4be5f7
test eax, eax
jle 0x4be671
mov edx, dword [ebp - 0x224]
mov ecx, esi
sub edx, esi
mov ebx, eax
movzx eax, word [ecx]
test ax, ax
jne 0x4be637
mov edi, dword [ebp - 0x224]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4be622
mov eax, dword [0x51ca08]
mov dword [edi], eax
jmp 0x4be63b
mov word [edx + ecx], ax
add ecx, 2
dec ebx
jne 0x4be611
jmp 0x4be671
mov ecx, dword [esi]
mov edx, dword [ebp - 0x224]
push ecx
push 0x54ab94
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
jmp 0x4be66e
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp - 0x224]
push eax
push esi
push ecx
call fcn.004ebc70
add esp, 0xc
mov edx, dword [ebp - 0x21c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x220]
push eax
push 0
push esi
mov dword [ebp - 0x21c], 0
call fcn.004e8ba0
add esp, 0xc
push esi
call fcn.004e577a
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x21c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x228]
push edx
push eax
push esi
push ebx
lea ecx, [ebp - 0x218]
push str.__s__Initialize_RegQuery_QueryValue_Failed__ReturnCode__i___Tyep__i___DataLen__i_
push ecx
mov dword [ebp - 0x21c], 0
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x218]
push edx
push 0x54a0bc
xor edx, edx
xor ecx, ecx
call fcn.004a3a40
mov edx, dword [ebp - 0x224]
mov eax, str.NULL
add esp, 0x20
sub edx, eax
jmp 0x4be720
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4be720
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [ebp - 0x218]
push str.__s__RegQuery_MainKey_Exception_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
push 0x54a0bc
xor edx, edx
xor ecx, ecx
call fcn.004a3a40
mov ecx, dword [ebp - 4]
add esp, 8
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret