Function at 0x100476f0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
sub esp, 0x250
mov eax, dword [0x10087040]
xor eax, esp
mov dword [esp + 0x24c], eax
push ebx
mov ebx, dword [esp + 0x258]
push edi
xor edi, edi
mov dword [esp + 0x10], ebx
mov eax, dword [ebx + 0xc0]
test eax, eax
je 0x10047730
push eax
call fcn.100446b0
mov edi, eax
add esp, 4
test edi, edi
je 0x1004783e
cmp dword [esp + 0x260], 0
je 0x10047760
test edi, edi
je 0x10047748
push edi
call dword [0x10087008]
add esp, 4
push str.CARES_HOSTS
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
push eax
call fcn.100446b0
add esp, 8
jmp 0x10047838
test edi, edi
jne 0x1004785a
push 0x103
lea eax, [esp + 0x51]
mov byte [esp + 0x50], 0
push edi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0xc], 0x104
lea eax, [esp + 8]
push eax
push 0x20019
push edi
push str.SystemCurrentControlSetServicesTcpipParameters
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x100477c1
lea eax, [edi + 4]
pop edi
pop ebx
mov ecx, dword [esp + 0x24c]
xor ecx, esp
call fcn.10052757
add esp, 0x250
ret
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x154]
push eax
push 0
push 0
push str.DatabasePath
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0x104
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x4c]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x10047808
mov eax, dword [str.hosts]
mov dword [ecx], eax
mov ax, word [0x10058ccc]
mov word [ecx + 4], ax
mov al, byte [0x10058cce]
mov byte [ecx + 6], al
lea eax, [esp + 0x4c]
push eax
call fcn.100446b0
add esp, 4
mov edi, eax
test edi, edi
jne 0x1004785a
pop edi
mov eax, 0xf
pop ebx
mov ecx, dword [esp + 0x24c]
xor ecx, esp
call fcn.10052757
add esp, 0x250
ret
push ebp
mov ebp, dword [ebx + 0xc8]
lea eax, [esp + 0x20]
push esi
push eax
xorps xmm0, xmm0
push edi
movlpd qword [esp + 0x24], xmm0
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32
add esp, 8
test eax, eax
jne 0x10047887
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x48]
jmp 0x1004788f
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
test ebp, ebp
je 0x100478c8
mov eax, ebx
or eax, esi
jne 0x100478ac
push eax
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
add esp, 4
mov ebx, eax
sub ebx, 0x3c
mov esi, edx
sbb esi, 0
push edi
push dword [ebp + 8]
call fcn.1004f1a0
add esp, 8
test eax, eax
jne 0x100478c8
cmp dword [ebp + 4], esi
jg 0x10047918
jl 0x100478c8
cmp dword [ebp], ebx
ja 0x10047918
mov ebx, dword [esp + 0x18]
add ebx, 0xc8
mov esi, dword [ebx]
test esi, esi
je 0x100478fb
push dword [esi + 8]
call dword [0x10087008]
push dword [esi + 0x10]
call fcn.10044380
push dword [esi + 0xc]
call fcn.10044380
push esi
call dword [0x10087008]
add esp, 0x10
push ebx
push edi
mov dword [ebx], 0
call fcn.10047a10
push edi
mov esi, eax
call dword [0x10087008]
add esp, 0xc
mov eax, esi
jmp 0x10047924
push edi
call dword [0x10087008]
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x25c]
pop esi
pop ebp
pop edi
pop ebx
xor ecx, esp
call fcn.10052757
add esp, 0x250
ret