Function at 0x40ce00
Capabilities:
Create directory
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x4171ce
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1f8
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.00405060
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 + 0x6c]
mov dword [esp + 0x210], ebx
push edx
push 0x2001f
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionSetup
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40ceed
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x71]
mov byte [esp + 0x70], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [esp + 0x6c]
lea ecx, [esp + 0x70]
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 0x40ceed
lea edi, [esp + 0x70]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x70]
push ecx
push eax
lea ecx, [esp + 0x30]
call fcn.00402330
mov eax, dword [esp + 0x30]
lea esi, [eax - 1]
cmp eax, esi
jb 0x40cf10
cmp dword [esp + 0x2c], ebx
je 0x40cf10
lea ecx, [esp + 0x28]
call fcn.0040e270
mov ecx, dword [esp + 0x2c]
lea eax, [ecx + esi]
jmp 0x40cf15
mov eax, 0x41821c
mov al, byte [eax]
cmp al, 0x5c
je 0x40cf39
mov edi, 0x41b1cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b1cc
lea ecx, [esp + 0x30]
call fcn.0040e4f0
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 [0x418218]
lea ecx, [esp + 0x28]
push eax
push ebx
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x21c], 1
call fcn.0040e410
mov edi, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b2a0
lea ecx, [esp + 0x20]
call fcn.0040e4f0
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 [0x418218]
lea ecx, [esp + 0x28]
push eax
push ebx
push ecx
mov ecx, esi
call fcn.00401b10
call fcn.00405060
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x210], 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
lea eax, [esp + 0x4c]
mov byte [esp + 0x210], 2
push eax
call fcn.0040bfe0
mov esi, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
add esp, 4
cmp esi, eax
jae 0x40d0d6
mov cl, byte [esi]
push ebx
mov byte [esp + 0x1c], cl
lea ecx, [esp + 0x1c]
call fcn.00401d10
mov edx, dword [0x418218]
lea ecx, [esp + 0x18]
push edx
push ebx
push esi
call fcn.00401b10
mov al, byte [esp + 0x28]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x24], esp
push ebx
mov ecx, edi
mov byte [esp + 0x224], 3
mov byte [edi], al
call fcn.00401d10
mov ecx, dword [0x418218]
lea edx, [esp + 0x38]
push ecx
push ebx
push edx
mov ecx, edi
call fcn.00401b10
sub esp, 0x10
lea eax, [esp + 0x38]
mov ecx, esp
mov dword [esp + 0x68], esp
push eax
mov byte [esp + 0x234], 4
call fcn.004017b0
mov byte [esp + 0x230], 3
call fcn.0040c8e0
add esp, 0x20
cmp eax, ebx
je 0x40d0ac
mov ebp, 1
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x214], 2
call fcn.00401d10
mov eax, dword [esp + 0x54]
add esi, 0x10
cmp esi, eax
jb 0x40d023
cmp ebp, ebx
jne 0x40d3ff
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x71]
mov byte [esp + 0x70], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x70]
push 0x104
push ecx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], dl
call fcn.00401d10
lea edi, [esp + 0x70]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x70]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00402330
mov edi, str.INSTALL
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x210], 5
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.INSTALL
lea ecx, [esp + 0x20]
call fcn.0040e4f0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x40d15c
mov eax, 0x41821c
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x40d171
mov eax, 0x41821c
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x6c]
push ecx
push eax
push 1
push ebx
push str.SourcePath
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [0x418218]
lea ecx, [esp + 0x18]
push eax
push ebx
push ecx
lea ecx, [esp + 0x34]
call fcn.00401b10
mov edi, 0x41b1cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b1cc
lea ecx, [esp + 0x30]
call fcn.0040e4f0
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 0x40d213
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 [0x418218]
lea edx, [esp + 0x28]
push ecx
push ebx
push edx
lea ecx, [esp + 0x44]
mov byte [esp + 0x21c], 6
call fcn.0040e410
mov edi, 0x41b2a0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41b2a0
lea ecx, [esp + 0x40]
call fcn.0040e4f0
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 [0x418218]
lea edx, [esp + 0x48]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.00401b10
call fcn.00405060
add esp, 0x10
lea ecx, [esp + 0x38]
mov byte [esp + 0x210], 5
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 + 0x5c]
mov byte [esp + 0x210], 7
push ecx
call fcn.0040bfe0
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
add esp, 4
cmp edi, eax
jae 0x40d399
mov dl, byte [edi]
push ebx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3c], dl
call fcn.00401d10
mov eax, dword [0x418218]
lea ecx, [esp + 0x38]
push eax
push ebx
push edi
call fcn.00401b10
mov cl, byte [esp + 0x28]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x58], esp
push ebx
mov byte [esp + 0x224], 8
mov byte [esi], cl
mov ecx, esi
call fcn.00401d10
mov edx, dword [0x418218]
lea eax, [esp + 0x38]
push edx
push ebx
push eax
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 + 0x234], 9
call fcn.004017b0
mov byte [esp + 0x230], 8
call fcn.0040c8e0
mov eax, dword [esp + 0x5c]
add esp, 0x20
cmp eax, ebx
mov byte [esp + 0x210], 7
je 0x40d37a
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40d371
cmp al, 0xff
je 0x40d371
dec al
mov byte [ecx], al
jmp 0x40d37a
push ecx
call fcn.0040e98e
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 0x40d2ce
mov edi, dword [esp + 0x60]
cmp edi, eax
mov byte [esp + 0x210], 5
mov ebp, eax
mov esi, edi
je 0x40d3bd
push 1
mov ecx, esi
call fcn.00401d10
add esi, 0x10
cmp esi, ebp
jne 0x40d3a9
mov edi, dword [esp + 0x60]
push edi
call fcn.0040e98e
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 + 0x210], 2
je 0x40d3ff
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40d3f6
cmp al, 0xff
je 0x40d3f6
dec al
mov byte [ecx], al
jmp 0x40d3ff
push ecx
call fcn.0040e98e
add esp, 4
lea ecx, [esp + 0x174]
call fcn.00403b10
cmp eax, 2
jne 0x40d442
mov al, byte [esp + 0x28]
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x58], esp
mov byte [ecx], al
mov dword [ecx + 4], ebx
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], ebx
mov edx, dword [0x418218]
lea eax, [esp + 0x38]
push edx
push ebx
push eax
call fcn.00401b10
call fcn.004093d0
add esp, 0x10
mov edi, dword [esp + 0x54]
mov esi, dword [esp + 0x50]
cmp esi, edi
mov byte [esp + 0x210], bl
je 0x40d468
push ebx
mov ecx, esi
call fcn.0040e8b0
add esi, 0x10
cmp esi, edi
jne 0x40d455
mov esi, dword [esp + 0x50]
push esi
call fcn.0040e98e
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 0x40d4a1
mov al, byte [ecx - 1]
cmp al, bl
je 0x40d497
cmp al, 0xff
je 0x40d497
dec al
mov byte [ecx - 1], al
jmp 0x40d4a1
dec ecx
push ecx
call fcn.0040e98e
add esp, 4
mov ecx, dword [esp + 0x208]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x204
ret