Function at 0x406740
Capabilities:
Create directory
Create shortcut via ishelllink
Read .ini file

Disassembly:
sub esp, 0x9ec
xor eax, eax
push ebx
push ebp
mov ebp, ecx
push edi
mov ecx, 0x41
lea edi, [esp + 0x94]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x198]
rep stosd dword es:[edi], eax
mov ecx, ebp
call fcn.00406460
mov eax, dword [ebp + 0x86f0]
push 0x40
push eax
call fcn.0040c358
add esp, 8
lea ecx, [ebp + 0x110]
mov dword [ebp + 0x86ec], eax
push str.ShortcutIcons
call fcn.00403120
xor ebx, ebx
mov dword [ebp + 0x86f0], eax
test eax, eax
jle 0x406c5d
push esi
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jl 0x406c28
lea ecx, [esp + 0x2e0]
push ecx
call fcn.004061b0
lea edi, [esp + 0x2e4]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [ebp + 0x220]
push esi
push 0x41555c
lea edx, [esp + ecx + 0x2e8]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x2e0]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
push esi
je 0x406814
push str.Program_group__s_has_been_created
push 0
jmp 0x40681b
push str.Cannot_create__s_program_group:
push 1
push ebp
call fcn.00404400
add esp, 0x10
lea ecx, [esp + 0x10]
push ecx
push 0x412238
push 1
push 0
push 0x412248
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x406851
push str.Cannot_create_CLSID_ShellLink_instance_to_create_shortcut_
push 0
push ebp
call fcn.00404400
add esp, 0xc
lea edx, [esp + 0x6f0]
push 0x104
push edx
push 2
lea esi, [ebp + 0x110]
push ebx
push str.ShortcutIcons
mov ecx, esi
call fcn.00403190
lea eax, [esp + 0x98]
push 0x104
lea ecx, [esp + 0x6f4]
push eax
push ecx
mov ecx, esi
call fcn.00403140
lea edx, [esp + 0x2a0]
push 0x40
push edx
push 0
push ebx
push str.ShortcutIcons
mov ecx, esi
call fcn.00403190
lea eax, [esp + 0x5ec]
push 0x104
push eax
push 1
push ebx
push str.ShortcutIcons
mov ecx, esi
call fcn.00403190
mov eax, dword [ebp + 0x877c]
test eax, eax
je 0x4068e4
lea ecx, [ebp + 0x8567]
lea edx, [esp + 0x98]
push ecx
push edx
mov ecx, esi
call fcn.00403c60
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x58]
push 1
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
push 0x40
call fcn.0040c358
mov ecx, dword [ebp + 0x86ec]
add esp, 8
lea edx, [esp + 0x3e4]
push 0x104
push edx
push 4
mov dword [ecx + ebx*4], eax
push ebx
push str.ShortcutIcons
mov ecx, esi
call fcn.00403190
lea eax, [esp + 0x58]
push 0x40
push eax
push 3
push ebx
push str.ShortcutIcons
mov ecx, esi
call fcn.00403190
lea ecx, [esp + 0x58]
push ecx
mov ecx, ebp
call fcn.004094d0
lea edx, [esp + 0x4e8]
push 0x104
push edx
push 5
push ebx
push str.ShortcutIcons
mov ecx, esi
call fcn.00403190
lea eax, [esp + 0x18]
push 0x40
push eax
push 6
push ebx
push str.ShortcutIcons
mov ecx, esi
call fcn.00403190
mov al, byte [esp + 0x18]
test al, al
jne 0x4069b0
lea edi, [ebp + 0x8460]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x19c]
push 0x104
lea edx, [esp + 0x3e8]
lea esi, [ebp + 0x110]
push ecx
push edx
mov ecx, esi
call fcn.00403140
mov cl, byte [ebp + 0x8567]
lea eax, [ebp + 0x8567]
test cl, cl
je 0x4069f2
push eax
lea eax, [esp + 0x1a0]
push eax
mov ecx, esi
call fcn.00403c60
lea edi, [esp + 0x19c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x19b], 0x5c
je 0x406a3e
mov edi, 0x41449c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x19c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x98]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x97], 0x5c
je 0x406a8a
mov edi, 0x41449c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x58]
lea ecx, [esp + 0x19c]
push eax
push ecx
lea edx, [esp + 0x1a4]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [ebp + 0x86ec]
add esp, 0x10
lea eax, [esp + 0x19c]
mov edx, dword [ecx + ebx*4]
push eax
push 0x40
push edx
lea eax, [esp + 0x24]
push 0
lea ecx, [esp + 0x4f8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x98]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x24]
lea edi, [esp + 0x2a0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x10]
mov ecx, edx
and ecx, 3
lea edx, [esp + 0x98]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x50]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x5ec]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov edx, dword [ebp + 0x86ec]
mov eax, dword [esp + 0x10]
mov edx, dword [edx + ebx*4]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x1c]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x98]
push 0
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x4123f0
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jge 0x406b8e
push str.Cannot_query_IID_IPersistFile_interface_to_create_shortcut_
push 0
push ebp
call fcn.00404400
add esp, 0xc
mov eax, dword [ebp + 0x86ec]
lea edi, [esp + 0x2e0]
mov ecx, dword [eax + ebx*4]
xor eax, eax
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push str._s.lnk
lea edx, [esp + ecx + 0x2e8]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x7f4]
lea ecx, [esp + 0x2e0]
push 0x104
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x7f4]
push 1
push ecx
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
test eax, eax
jl 0x406c1c
mov edx, dword [ebp + 0x86ec]
mov eax, dword [edx + ebx*4]
push eax
push str.Shortcut__s_has_been_created
push 0
push ebp
call fcn.00404400
mov eax, dword [esp + 0x24]
add esp, 0x10
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
jmp 0x406c38
push str.Cannot_initialize_COM_
push 0
push ebp
call fcn.00404400
add esp, 0xc
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp + 0x86f0]
inc ebx
cmp ebx, eax
jl 0x4067a8
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x9ec
ret
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x9ec
ret