Function at 0x1002f1e
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
lea eax, [ebp - 4]
push eax
add ebx, 0x34c
push ebx
lea eax, [ebp - 8]
push eax
push 0
push 0x10014b8
push dword [ebp + 0xc]
mov edi, 0x100
mov dword [ebp - 4], edi
call esi
test eax, eax
je 0x1002f6d
cmp eax, 2
jne 0x10031f1
and dword [ebp - 4], 0
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 1
jne 0x1003038
cmp dword [ebp - 4], 0
je 0x1002f89
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
test eax, eax
pop ecx
jne 0x1002fb6
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 8]
push eax
push 0
push 0x10014a0
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
call esi
test eax, eax
je 0x1002fb6
cmp eax, 2
jne 0x10031f1
and dword [ebp - 4], 0
and word [ebx], 0
mov ebx, 0x320
jmp 0x1003013
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push 0x1001494
push dword [ebp + 0xc]
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
test edi, edi
je 0x1003032
test esi, esi
je 0x1002ffe
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
cmp edi, 2
je 0x1003027
cmp edi, 0xea
jne 0x10031ef
add ebx, ebx
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x1002fbd
jmp 0x1003181
and dword [ebp - 4], 0
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 1
je 0x1003040
push 0xd
pop eax
jmp 0x10031f1
cmp dword [ebp - 4], 0
je 0x1003061
test esi, esi
je 0x100306c
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100304f
sub eax, edx
mov dword [ebp - 0xc], eax
jne 0x10030e7
test esi, esi
je 0x100306c
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, 0x320
jmp 0x10030c9
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push 0x1001484
push dword [ebp + 0xc]
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
test edi, edi
je 0x10030e7
test esi, esi
je 0x10030b4
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
cmp edi, 2
je 0x10030dd
cmp edi, 0xea
jne 0x10031ef
add ebx, ebx
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x1003073
jmp 0x1003181
mov dword [ebp - 4], esi
mov dword [ebp - 8], 1
cmp dword [ebp - 4], 0
je 0x10031e0
test esi, esi
je 0x10031eb
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10030fe
sub eax, edx
mov dword [ebp + 0xc], eax
je 0x10031e0
xor ebx, ebx
xor ecx, ecx
cmp dword [ebp - 4], ebx
jbe 0x1003132
mov al, byte [ecx + esi]
cmp al, 0x20
je 0x1003128
cmp al, 0x2c
je 0x1003128
cmp al, 0x3b
jne 0x100312c
mov byte [ecx + esi], 0
inc ecx
cmp ecx, dword [ebp - 4]
jb 0x1003119
mov eax, dword [ebp - 4]
mov byte [eax + esi], 0
mov eax, esi
mov ecx, esi
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1003140
jmp 0x1003168
mov eax, ecx
inc ebx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100314f
sub eax, edi
lea ecx, [ecx + eax + 1]
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1003161
sub eax, edi
mov dword [ebp + 0xc], eax
jne 0x1003149
mov eax, ebx
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
jne 0x1003189
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10031f1
mov ebx, dword [ebp + 8]
and dword [ebp + 0xc], 0
mov dword [ebx + 0x33c], eax
cmp byte [esi], 0
mov edi, esi
je 0x10031d7
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, dword [ebx + 0x33c]
mov edx, dword [ebp + 0xc]
mov dword [ecx + edx*4], eax
mov eax, dword [ebx + 0x33c]
mov ecx, edx
cmp dword [eax + ecx*4], 0
je 0x10031c1
inc dword [ebp + 0xc]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10031c6
sub eax, edx
lea edi, [edi + eax + 1]
cmp byte [edi], cl
jne 0x100319d
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x340], eax
test esi, esi
je 0x10031eb
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x10031f1
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8