Function at 0x4039c7
Capabilities:
Create directory
Get common file path
Set registry value

Disassembly:
push 0x58
mov eax, 0x416046
call fcn.004109d6
mov ecx, dword [0x421504]
xor ebx, ebx
inc ebx
mov edx, ebx
call fcn.0040175a
mov edi, eax
test edi, edi
je 0x403e34
call fcn.00401f84
push eax
lea ecx, [ebp - 0x30]
call fcn.00401d98
and dword [ebp - 4], 0
lea ecx, [ebp - 0x30]
push 0x104
call fcn.004022d5
push eax
xor eax, eax
push eax
push eax
push 0x1c
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x403a3a
cmp byte [ebp + 8], 0
jne 0x403ab2
push str.Unable_to_get_AppData_location.
lea ecx, [ebp - 0x2c]
call fcn.004023fc
mov byte [ebp - 4], bl
jmp 0x403a9a
push 0xffffffffffffffff
lea ecx, [ebp - 0x30]
call fcn.00401bfc
push ecx
lea ecx, [ebp - 0x30]
call fcn.004041f8
push str.OutlookFreeware.com
mov esi, eax
call fcn.004075c2
pop ecx
push eax
push str.OutlookFreeware.com
mov ecx, esi
call fcn.00404e83
push 0
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x403ab9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403ab9
cmp byte [ebp + 8], 0
jne 0x403ab2
push str.Unable_to_create_AppData_folder.
lea ecx, [ebp - 0x2c]
call fcn.004023fc
mov byte [ebp - 4], 2
push 0
mov edx, ebx
lea ecx, [ebp - 0x2c]
call fcn.0040130e
pop ecx
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00402350
xor bl, bl
jmp 0x403de6
push ecx
lea ecx, [ebp - 0x30]
call fcn.004041f8
push str.Schemas_
mov esi, eax
call fcn.004075c2
pop ecx
push eax
push str.Schemas_
mov ecx, esi
call fcn.00404e83
push 0
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x403b28
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403b28
cmp byte [ebp + 8], 0
jne 0x403e2f
push str.Unable_to_create_destination_folder.
lea ecx, [ebp - 0x2c]
call fcn.004023fc
push 0
mov edx, ebx
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x2c]
call fcn.0040130e
pop ecx
mov ecx, dword [ebp - 0x2c]
jmp 0x403e27
push edi
lea edx, [ebp - 0x30]
lea ecx, [ebp - 0x40]
call fcn.004018d8
mov byte [ebp - 4], 3
push dword [ebp - 0x40]
mov ecx, dword [0x421504]
call fcn.0040179d
pop ecx
pop ecx
test al, al
je 0x403df5
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 4
push eax
push 0x4013a0
push 0xa
push dword [0x421504]
push dword [0x420568]
call dword [sym.imp.KERNEL32.dll_EnumResourceLanguagesW]
cmp dword [ebp - 0x38], 0
jle 0x403dc0
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ole32.dll_StringFromCLSID]
test eax, eax
js 0x403dc0
push str.SOFTWAREOutlookFreeware.comNewRules_
lea ecx, [ebp - 0x2c]
call fcn.00401c28
mov byte [ebp - 4], 5
mov esi, dword [ebp - 0x50]
test esi, esi
jne 0x403bc2
xor eax, eax
jmp 0x403bc9
push esi
call fcn.004075c2
pop ecx
push eax
push esi
lea ecx, [ebp - 0x2c]
call fcn.00404e83
push dword [ebp - 0x50]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
sub esp, 0x14
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x60]
push dword [ebp - 0x2c]
push 0x80000001
call fcn.00405d8d
mov edi, dword [ebp - 0x60]
test eax, eax
jne 0x403daa
push ecx
push dword [ebp - 0x40]
lea ecx, [ebp - 0x60]
push 0
call fcn.00405e86
mov ecx, dword [0x421504]
push 0
push 3
pop edx
call fcn.00401731
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop ecx
test eax, eax
je 0x403c49
mov eax, dword [eax]
push 4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push 4
push 0
push str.Flags
push edi
call esi
mov ecx, dword [0x421504]
push 0
push 0xc
pop edx
call fcn.00401731
pop ecx
test eax, eax
je 0x403c75
mov eax, dword [eax]
push 4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push 4
push 0
push str.Version
push edi
call esi
and dword [ebp - 0x28], 0
cmp dword [ebp - 0x38], 0
jle 0x403daa
mov ebx, dword [ebp - 0x28]
mov esi, dword [0x421504]
lea ecx, [ebp - 0x3c]
push ebx
call fcn.00401994
mov ecx, esi
movzx eax, word [eax]
push eax
push 0xa
pop edx
call fcn.00401731
mov esi, dword [0x421504]
pop ecx
push ebx
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x28], eax
call fcn.00401994
mov ecx, esi
movzx edx, word [eax]
push edx
push 0xb
pop edx
call fcn.00401731
pop ecx
mov esi, eax
lea ecx, [ebp - 0x3c]
push ebx
mov dword [ebp - 0x64], esi
call fcn.00401994
xor ecx, ecx
cmp cx, word [eax]
je 0x403d79
xor eax, eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 7
call fcn.00401f84
push eax
lea ecx, [ebp - 0x54]
call fcn.00401d98
push ebx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 8
call fcn.00401994
movzx eax, word [eax]
push eax
lea eax, [ebp - 0x54]
push 0x41bd2c
push eax
call fcn.00401a34
mov esi, dword [ebp - 0x54]
push ecx
push ecx
push esi
push edi
lea ecx, [ebp - 0x4c]
call fcn.00405d8d
test eax, eax
jne 0x403d54
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x4c]
push str.Name
call fcn.00405e86
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x403d54
push ecx
push eax
push str.Description
lea ecx, [ebp - 0x4c]
call fcn.00405e86
lea ecx, [esi - 0x10]
call fcn.00402350
mov byte [ebp - 4], 6
cmp dword [ebp - 0x4c], 0
je 0x403d73
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x4c], 0
and dword [ebp - 0x48], 0
jmp 0x403d9d
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x60]
push str.Name
call fcn.00405e86
test esi, esi
je 0x403d9d
push ecx
push esi
push str.Description
lea ecx, [ebp - 0x60]
call fcn.00405e86
inc ebx
cmp ebx, dword [ebp - 0x38]
jl 0x403c86
xor ebx, ebx
inc ebx
test edi, edi
je 0x403db5
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00402350
cmp dword [ebp - 0x3c], 0
je 0x403dd3
push dword [ebp - 0x3c]
call fcn.00407bf1
and dword [ebp - 0x3c], 0
pop ecx
mov ecx, dword [ebp - 0x40]
and dword [ebp - 0x38], 0
and dword [ebp - 0x34], 0
lea ecx, [ecx - 0x10]
call fcn.00402350
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.00402350
mov al, bl
jmp 0x403e68
cmp byte [ebp + 8], 0
jne 0x403e24
push str.Unable_to_extract_data.
lea ecx, [ebp - 0x28]
call fcn.004023fc
push 0
mov edx, ebx
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x28]
call fcn.0040130e
pop ecx
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.00402350
mov ecx, dword [ebp - 0x40]
lea ecx, [ecx - 0x10]
call fcn.00402350
mov eax, dword [ebp - 0x30]
jmp 0x403e5e
cmp byte [ebp + 8], 0
jne 0x403e66
push str.Unable_to_get_destination_file_name.
lea ecx, [ebp - 0x28]
call fcn.004023fc
push 0
mov edx, ebx
mov dword [ebp - 4], 0xb
lea ecx, [ebp - 0x28]
call fcn.0040130e
mov eax, dword [ebp - 0x28]
pop ecx
lea ecx, [eax - 0x10]
call fcn.00402350
xor al, al
call fcn.00410985
ret