Function at 0x474bd0
Capabilities:
Access peb ldr_data
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x59efd0
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x30]
mov edi, ecx
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x28], esi
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov ecx, 1
mov byte [esp + 0x28], cl
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x402
or eax, ecx
jge 0x474c43
mov ecx, 0x402
lea eax, [esp + 0x14]
call fcn.00403d50
cmp edi, esi
jne 0x474c4b
xor eax, eax
jmp 0x474c5f
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x474c50
sub eax, edx
sar eax, 1
mov ebx, eax
push edi
lea eax, [esp + 0x18]
call fcn.00404050
push 0x41
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea eax, [esp + 0x1c]
push eax
call fcn.00403fc0
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
push 0
push esi
push reloc.WS2_32.dll_closesocket
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x474cf7
mov eax, dword [esi - 8]
mov ebx, dword [esp + 0x1c]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x402
or eax, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], 0x400
jge 0x474cda
mov ecx, 0x402
lea eax, [esp + 0x14]
call fcn.00403d50
mov esi, dword [esp + 0x14]
push str.AppData
lea ecx, [esp + 0x1c]
push ecx
lea edi, [esp + 0x24]
call fcn.0041adb0
test esi, esi
mov edi, eax
jne 0x474d2e
xor eax, eax
jmp 0x474d48
lea eax, [esi - 0x10]
mov byte [esp + 0x28], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x474d18
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x474d33
sub eax, edx
sar eax, 1
js 0x474e5f
cmp eax, dword [esi - 8]
jg 0x474e5f
test ebx, ebx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], 0
je 0x474d6d
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [esp + 0x18], ebx
jmp 0x474d71
mov ebx, dword [esp + 0x18]
test edi, edi
je 0x474daa
lea eax, [esi - 0x10]
mov byte [esp + 0x28], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x474d96
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x474d18
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x474d18
mov eax, dword [ebp]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, 0x402
or eax, ecx
jge 0x474dd0
mov ecx, 0x402
mov eax, ebp
call fcn.00403d50
mov eax, dword [ebp]
push 0x400
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edx, dword [ebp]
test edx, edx
jne 0x474deb
xor ecx, ecx
jmp 0x474e05
mov ecx, edx
lea ebx, [ecx + 2]
mov di, word [ecx]
add ecx, 2
test di, di
jne 0x474df0
sub ecx, ebx
sar ecx, 1
js 0x474e5f
mov ebx, dword [esp + 0x18]
cmp ecx, dword [edx - 8]
jg 0x474e5f
mov dword [edx - 0xc], ecx
mov edx, dword [ebp]
mov word [edx + ecx*2], 0
xor ecx, ecx
cmp ecx, eax
sbb edi, edi
lea eax, [esi - 0x10]
mov byte [esp + 0x28], cl
neg edi
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x474e3e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x474e49
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push 0x80070057
call fcn.00404550
int3