Function at 0x1002c20
Capabilities:
Query or enumerate registry value

Disassembly:
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, 0x344
push ebx
lea eax, [ebp - 8]
push eax
push 0
push 0x1001488
push dword [ebp + 0xc]
mov edi, 0x100
mov dword [ebp - 4], edi
call esi
test eax, eax
je 0x1002c6d
cmp eax, 2
jne 0x1002ef1
and dword [ebp - 4], 0
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 1
jne 0x1002d38
cmp dword [ebp - 4], 0
je 0x1002c89
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
test eax, eax
pop ecx
jne 0x1002cb6
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 8]
push eax
push 0
push 0x1001470
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
call esi
test eax, eax
je 0x1002cb6
cmp eax, 2
jne 0x1002ef1
and dword [ebp - 4], 0
and word [ebx], 0
mov ebx, 0x320
jmp 0x1002d13
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 0x1001464
push dword [ebp + 0xc]
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
test edi, edi
je 0x1002d32
test esi, esi
je 0x1002cfe
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
cmp edi, 2
je 0x1002d27
cmp edi, 0xea
jne 0x1002eef
add ebx, ebx
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x1002cbd
jmp 0x1002e81
and dword [ebp - 4], 0
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 1
je 0x1002d40
push 0xd
pop eax
jmp 0x1002ef1
cmp dword [ebp - 4], 0
je 0x1002d61
test esi, esi
je 0x1002d6c
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002d4f
sub eax, edx
mov dword [ebp - 0xc], eax
jne 0x1002de7
test esi, esi
je 0x1002d6c
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, 0x320
jmp 0x1002dc9
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 0x1001454
push dword [ebp + 0xc]
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
test edi, edi
je 0x1002de7
test esi, esi
je 0x1002db4
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
cmp edi, 2
je 0x1002ddd
cmp edi, 0xea
jne 0x1002eef
add ebx, ebx
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x1002d73
jmp 0x1002e81
mov dword [ebp - 4], esi
mov dword [ebp - 8], 1
cmp dword [ebp - 4], 0
je 0x1002ee0
test esi, esi
je 0x1002eeb
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002dfe
sub eax, edx
mov dword [ebp + 0xc], eax
je 0x1002ee0
xor ebx, ebx
xor ecx, ecx
cmp dword [ebp - 4], ebx
jbe 0x1002e32
mov al, byte [ecx + esi]
cmp al, 0x20
je 0x1002e28
cmp al, 0x2c
je 0x1002e28
cmp al, 0x3b
jne 0x1002e2c
and byte [ecx + esi], 0
inc ecx
cmp ecx, dword [ebp - 4]
jb 0x1002e19
mov eax, dword [ebp - 4]
and byte [eax + esi], 0
mov eax, esi
mov ecx, esi
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1002e40
jmp 0x1002e68
mov eax, ecx
inc ebx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1002e4f
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 0x1002e61
sub eax, edi
mov dword [ebp + 0xc], eax
jne 0x1002e49
mov eax, ebx
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
jne 0x1002e89
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1002ef1
mov ebx, dword [ebp + 8]
and dword [ebp + 0xc], 0
mov dword [ebx + 0x33c], eax
cmp byte [esi], 0
mov edi, esi
je 0x1002ed7
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 0x1002ec1
inc dword [ebp + 0xc]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002ec6
sub eax, edx
lea edi, [edi + eax + 1]
cmp byte [edi], cl
jne 0x1002e9d
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x340], eax
test esi, esi
je 0x1002eeb
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x1002ef1
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8