Function at 0x1043562
Capabilities:
Create directory
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, esi
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x420], esi
mov dword [ebp - 0x418], 0x80004005
jne 0x10435a1
mov eax, 0x80004003
jmp 0x10437d8
push ebx
lea eax, [ebp - 0x420]
push eax
xor ebx, ebx
inc ebx
push ebx
push esi
push 0x10067e8
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10437d1
mov ecx, dword [ebp + 0xc]
mov eax, 0x208
cmp ecx, eax
mov dword [ebp - 0x424], ecx
mov dword [ebp - 0x41c], ebx
jbe 0x10435e4
mov dword [ebp - 0x424], eax
push edi
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x41c]
push eax
push esi
push 0x100d1b8
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, 0x104
jne 0x10436eb
cmp dword [ebp - 0x41c], ebx
je 0x1043634
cmp dword [ebp - 0x41c], 2
jne 0x10436eb
cmp dword [ebp - 0x41c], 2
jne 0x104366e
push esi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x10436eb
lea eax, [ebp - 0x414]
push eax
push 0x103
lea eax, [ebp - 0x20c]
push eax
call fcn.01028a67
lea eax, [ebp - 0x20c]
push eax
call fcn.01033ed9
test eax, eax
je 0x10436c2
and dword [ebp - 0x418], 0
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x104368e
mov ecx, dword [ebp + 0xc]
sub eax, edx
sar eax, 1
shr ecx, 1
inc eax
cmp ecx, eax
jbe 0x10437b2
lea eax, [ebp - 0x20c]
push eax
push ecx
push dword [ebp - 0x428]
call fcn.01028a67
jmp 0x10437c4
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x20c]
push eax
call fcn.01033ed9
test eax, eax
jne 0x104367e
mov dword [ebp - 0x418], 0x80004005
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x10437c4
push esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call edi
lea eax, [ebp - 0x20c]
push 0x1006cbc
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
xor ebx, ebx
cmp eax, ebx
pop ecx
pop ecx
je 0x10437c4
mov ecx, eax
lea edi, [ecx + 2]
mov dx, word [ecx]
inc ecx
inc ecx
cmp dx, bx
jne 0x1043735
sub ecx, edi
sar ecx, 1
cmp ecx, 4
jbe 0x10437c4
mov word [eax + 4], bx
push esi
lea eax, [ebp - 0x414]
push eax
push 0x26fc
push dword [0x1047500]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x10437c4
lea eax, [ebp - 0x414]
push eax
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01028adc
push ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x20c]
push eax
call fcn.01033ed9
test eax, eax
je 0x10437a6
mov dword [ebp - 0x418], ebx
jmp 0x1043685
mov dword [ebp - 0x418], 0x80004005
jmp 0x10437c4
mov eax, 0x8007007a
push eax
mov dword [ebp - 0x418], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, dword [ebp - 0x418]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.01031a01
leave
ret 8