Function at 0x40dc20
Capabilities:
Create directory
Get common file path
Query or enumerate registry value
Resolve function by parsing pe exports
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x418179
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x208
push ebx
mov al, byte [esp + 7]
push ebp
push esi
push edi
xor ebx, ebx
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x24], esp
push ebx
mov ecx, esi
mov byte [esi], al
call fcn.00401d10
mov edi, str.CopyFilesToCabDir_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.CopyFilesToCabDir_n
mov ecx, esi
call fcn.00402330
call fcn.004051f0
mov cl, byte [esp + 0x23]
add esp, 0x10
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
push ebx
call fcn.00401d10
lea edx, [esp + 0x7c]
mov dword [esp + 0x220], ebx
push edx
push 0x2001f
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionSetup
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40dd1c
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x81]
mov byte [esp + 0x80], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [esp + 0x7c]
lea ecx, [esp + 0x80]
stosb byte es:[edi], al
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x100
push eax
push ecx
push ebx
push ebx
push str.SourcePath
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x40dd1c
lea edi, [esp + 0x80]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x80]
push ecx
push eax
lea ecx, [esp + 0x30]
call fcn.00402330
mov eax, dword [esp + 0x30]
lea esi, [eax - 1]
cmp eax, esi
jb 0x40dd3f
cmp dword [esp + 0x2c], ebx
je 0x40dd3f
lea ecx, [esp + 0x28]
call fcn.0040f150
mov ecx, dword [esp + 0x2c]
lea eax, [ecx + esi]
jmp 0x40dd44
mov eax, 0x41921c
mov al, byte [eax]
cmp al, 0x5c
je 0x40dd68
mov edi, 0x41c1cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c1cc
lea ecx, [esp + 0x30]
call fcn.0040f3d0
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], dl
call fcn.00401d10
mov edi, str.cab_dir:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.cab_dir:
lea ecx, [esp + 0x20]
call fcn.00402330
mov eax, dword [0x419218]
lea ecx, [esp + 0x28]
push eax
push ebx
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x22c], 1
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x20]
call fcn.0040f3d0
mov dl, byte [esp + 0x18]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x24], esp
push ebx
mov ecx, esi
mov byte [esi], dl
call fcn.00401d10
mov eax, dword [0x419218]
lea ecx, [esp + 0x28]
push eax
push ebx
push ecx
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x220], bl
push 1
call fcn.00401d10
mov dl, byte [esp + 0x13]
xor ebp, ebp
mov byte [esp + 0x4c], dl
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov al, byte [esp + 0x13]
mov dword [esp + 0x70], ebx
mov byte [esp + 0x6c], al
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
lea ecx, [esp + 0x6c]
lea edx, [esp + 0x4c]
push ecx
push edx
mov byte [esp + 0x228], 3
call fcn.0040cb70
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
add esp, 8
cmp esi, eax
jae 0x40df1d
mov al, byte [esi]
push ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], al
call fcn.00401d10
mov ecx, dword [0x419218]
push ecx
push ebx
push esi
lea ecx, [esp + 0x24]
call fcn.00401b10
mov dl, byte [esp + 0x28]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x24], esp
push ebx
mov ecx, edi
mov byte [esp + 0x234], 4
mov byte [edi], dl
call fcn.00401d10
mov eax, dword [0x419218]
lea ecx, [esp + 0x38]
push eax
push ebx
push ecx
mov ecx, edi
call fcn.00401b10
sub esp, 0x10
lea edx, [esp + 0x38]
mov ecx, esp
mov dword [esp + 0x68], esp
push edx
mov byte [esp + 0x244], 5
call fcn.004017b0
mov byte [esp + 0x240], 4
call fcn.0040d700
add esp, 0x20
cmp eax, ebx
je 0x40def3
mov ebp, 1
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x224], 3
call fcn.00401d10
mov eax, dword [esp + 0x54]
add esi, 0x10
cmp esi, eax
jb 0x40de6b
cmp ebp, ebx
jne 0x40e259
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x81]
mov byte [esp + 0x80], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x80]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov cl, byte [esp + 0x13]
push ebx
mov byte [esp + 0x1c], cl
lea ecx, [esp + 0x1c]
call fcn.00401d10
lea edi, [esp + 0x80]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x20]
call fcn.00402330
mov edi, str.INSTALL
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x220], 6
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.INSTALL
lea ecx, [esp + 0x20]
call fcn.0040f3d0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x40dfb2
mov eax, 0x41921c
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x40dfc7
mov eax, 0x41921c
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x7c]
push ecx
push eax
push 1
push ebx
push str.SourcePath
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [0x419218]
lea ecx, [esp + 0x18]
push eax
push ebx
push ecx
lea ecx, [esp + 0x34]
call fcn.00401b10
mov edi, 0x41c1cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c1cc
lea ecx, [esp + 0x30]
call fcn.0040f3d0
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3c], dl
call fcn.00401d10
mov edi, str.new_cab_dir:
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x3c]
push ebp
call fcn.00402510
test al, al
je 0x40e069
mov edi, dword [esp + 0x3c]
mov ecx, ebp
mov eax, ecx
mov esi, str.new_cab_dir:
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x3c]
call fcn.004024f0
mov ecx, dword [0x419218]
lea edx, [esp + 0x28]
push ecx
push ebx
push edx
lea ecx, [esp + 0x44]
mov byte [esp + 0x22c], 7
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x40]
call fcn.0040f3d0
mov al, byte [esp + 0x38]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x58], esp
push ebx
mov ecx, esi
mov byte [esi], al
call fcn.00401d10
mov ecx, dword [0x419218]
lea edx, [esp + 0x48]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x38]
mov byte [esp + 0x220], 6
push 1
call fcn.00401d10
mov al, byte [esp + 0x13]
mov dword [esp + 0x60], ebx
mov byte [esp + 0x5c], al
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
lea ecx, [esp + 0x6c]
lea edx, [esp + 0x5c]
push ecx
push edx
mov byte [esp + 0x228], 8
call fcn.0040cb70
mov edi, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
add esp, 8
cmp edi, eax
jae 0x40e1f4
mov al, byte [edi]
push ebx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3c], al
call fcn.00401d10
mov ecx, dword [0x419218]
push ecx
push ebx
push edi
lea ecx, [esp + 0x44]
call fcn.00401b10
mov dl, byte [esp + 0x28]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x58], esp
push ebx
mov ecx, esi
mov byte [esp + 0x234], 9
mov byte [esi], dl
call fcn.00401d10
mov eax, dword [0x419218]
lea ecx, [esp + 0x38]
push eax
push ebx
push ecx
mov ecx, esi
call fcn.00401b10
sub esp, 0x10
lea edx, [esp + 0x58]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
mov byte [esp + 0x244], 0xa
call fcn.004017b0
mov byte [esp + 0x240], 9
call fcn.0040d700
mov eax, dword [esp + 0x5c]
add esp, 0x20
cmp eax, ebx
mov byte [esp + 0x220], 8
je 0x40e1d5
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40e1cc
cmp al, 0xff
je 0x40e1cc
dec al
mov byte [ecx], al
jmp 0x40e1d5
push ecx
call fcn.0040f86e
add esp, 4
mov eax, dword [esp + 0x64]
add edi, 0x10
cmp edi, eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
jb 0x40e129
mov edi, dword [esp + 0x60]
cmp edi, eax
mov byte [esp + 0x220], 6
mov ebp, eax
mov esi, edi
je 0x40e217
push ebx
mov ecx, esi
call fcn.0040f790
add esi, 0x10
cmp esi, ebp
jne 0x40e204
mov edi, dword [esp + 0x60]
push edi
call fcn.0040f86e
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov byte [esp + 0x220], 3
je 0x40e259
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40e250
cmp al, 0xff
je 0x40e250
dec al
mov byte [ecx], al
jmp 0x40e259
push ecx
call fcn.0040f86e
add esp, 4
lea ecx, [esp + 0x184]
call fcn.00403b10
cmp eax, 2
jne 0x40e29d
mov al, byte [esp + 0x28]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x58], esp
push ebx
mov ecx, esi
mov byte [esi], al
call fcn.00401d10
mov ecx, dword [0x419218]
lea edx, [esp + 0x38]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.00401b10
call fcn.00409ac0
add esp, 0x10
mov edi, dword [esp + 0x74]
mov esi, dword [esp + 0x70]
cmp esi, edi
mov byte [esp + 0x220], 2
je 0x40e2c5
push 1
mov ecx, esi
call fcn.00401d10
add esi, 0x10
cmp esi, edi
jne 0x40e2b1
mov esi, dword [esp + 0x70]
push esi
call fcn.0040f86e
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x54]
add esp, 4
cmp esi, edi
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov byte [esp + 0x220], bl
je 0x40e300
push ebx
mov ecx, esi
call fcn.0040f790
add esi, 0x10
cmp esi, edi
jne 0x40e2ed
mov esi, dword [esp + 0x50]
push esi
call fcn.0040f86e
mov ecx, dword [esp + 0x30]
add esp, 4
cmp ecx, ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
je 0x40e339
mov al, byte [ecx - 1]
cmp al, bl
je 0x40e32f
cmp al, 0xff
je 0x40e32f
dec al
mov byte [ecx - 1], al
jmp 0x40e339
dec ecx
push ecx
call fcn.0040f86e
add esp, 4
mov ecx, dword [esp + 0x218]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x214
ret