Function at 0x4042c7
Capabilities:
Create directory
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1a74
call fcn.0040b430
push ebx
push esi
push edi
xor esi, esi
inc esi
push esi
push dword [0x41ac9c]
mov edi, 0x80000001
push 0x401780
push 0x401550
push edi
mov dword [ebp - 0x20], 0x4016d4
mov dword [ebp - 0x1c], 0x4016ec
mov dword [ebp - 0x18], 0x4016f4
mov dword [ebp - 0x14], 0x40170c
mov dword [ebp - 0x10], 0x401734
mov dword [ebp - 8], esi
call fcn.00406721
add esp, 0x14
test eax, eax
jne 0x404326
and dword [ebp - 8], eax
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push esi
push 0
push 0x4015a8
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov ebx, 0x400
jne 0x4043a6
lea eax, [ebp - 0x1270]
push eax
push 0x401764
lea esi, [ebp - 4]
mov eax, ebx
call fcn.00406645
test eax, eax
pop ecx
pop ecx
je 0x4043a6
lea eax, [ebp - 0x1a70]
mov esi, 0x4015a8
push eax
mov edx, esi
call fcn.00405151
lea ecx, [ebp - 0x1270]
lea eax, [ebp - 0x1a70]
call fcn.0040512d
lea eax, [ebp - 0xa70]
push eax
mov edx, esi
call fcn.00405151
pop ecx
pop ecx
mov ecx, 0x401610
lea eax, [ebp - 0xa70]
call fcn.0040512d
lea eax, [ebp - 4]
push eax
push 1
xor esi, esi
push esi
lea eax, [ebp - 0x1a70]
push eax
push edi
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4043fa
lea eax, [ebp - 0x1270]
push eax
push 0x4016d4
lea esi, [ebp - 4]
mov eax, ebx
call fcn.00406645
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4043fa
mov eax, 0x401660
lea edx, [ebp - 0x1270]
call fcn.004050b3
test eax, eax
je 0x4044ba
and dword [ebp - 4], 0
test esi, esi
je 0x4044be
cmp dword [ebp - 4], 5
jge 0x404478
and dword [ebp - 0xc], 0
lea eax, [ebp - 0xc]
push eax
push 1
push 0
lea eax, [ebp - 0x1a70]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40442e
xor esi, esi
jmp 0x404471
mov eax, dword [ebp - 4]
mov eax, dword [ebp + eax*4 - 0x20]
lea ecx, [ebp - 0x1270]
push ecx
push eax
lea esi, [ebp - 0xc]
mov eax, ebx
call fcn.00406645
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x404471
push 1
lea eax, [ebp - 0x1270]
push eax
mov eax, dword [ebp - 4]
push dword [ebp + eax*4 - 0x20]
lea eax, [ebp - 0xa70]
push eax
push edi
call fcn.00406721
add esp, 0x14
mov esi, eax
inc dword [ebp - 4]
test esi, esi
jne 0x404406
test esi, esi
je 0x4044be
push 1
push 0x401660
push 0x4016d4
lea eax, [ebp - 0x1a70]
push eax
push edi
call fcn.00406721
add esp, 0x14
test eax, eax
je 0x4044be
push 1
push 0x401678
push 0x4016ec
lea eax, [ebp - 0x1a70]
push eax
push edi
call fcn.00406721
add esp, 0x14
mov esi, eax
test esi, esi
jne 0x4044c2
and dword [ebp - 8], 0
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ebx
lea eax, [ebp - 0xa70]
push eax
push 0x401798
call edi
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0xa70]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40453d
test byte [ebp - 0x270], 0x10
je 0x40453d
lea eax, [ebp - 0x1270]
push eax
mov edx, 0x401810
call fcn.00405151
mov ecx, dword [0x41ac9c]
lea eax, [ebp - 0x1270]
call fcn.0040512d
mov esi, eax
mov dword [esp], 0x4017b8
call fcn.0040667e
test eax, eax
pop ecx
jne 0x404534
and dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
lea eax, [ebp - 0xa70]
push eax
mov esi, 0x401860
push esi
call edi
mov ecx, 0x401d70
lea eax, [ebp - 0xa70]
call fcn.0040512d
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0xa70]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x404686
test byte [ebp - 0x270], 0x10
je 0x404686
lea eax, [ebp - 0xa70]
push eax
mov edx, esi
call fcn.00405151
lea ecx, [ebp - 0x244]
lea eax, [ebp - 0xa70]
call fcn.0040512d
mov ecx, 0x4018a8
call fcn.0040512d
lea eax, [ebp - 0x1270]
push eax
mov edx, 0x4018f8
call fcn.00405151
mov esi, dword [0x41ac9c]
lea eax, [ebp - 0x1270]
push esi
push eax
call fcn.00405169
lea eax, [ebp - 0x1270]
push esi
push eax
call fcn.00405169
lea eax, [ebp - 0xa70]
push eax
lea esi, [ebp - 0x1270]
call fcn.0040667e
add esp, 0x1c
test eax, eax
jne 0x404600
and dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
lea eax, [ebp - 0xa70]
push eax
push 0x401860
call edi
lea ecx, [ebp - 0x244]
lea eax, [ebp - 0xa70]
call fcn.0040512d
mov ecx, 0x4018bc
call fcn.0040512d
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, 0x4018dc
lea eax, [ebp - 0xa70]
call fcn.0040512d
test esi, esi
jne 0x404662
cmp edi, 0xb7
jne 0x404676
lea eax, [ebp - 0xa70]
push eax
mov esi, 0x401ae0
call fcn.0040667e
pop ecx
mov esi, eax
test esi, esi
jne 0x40467d
and dword [ebp - 8], esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret