Function at 0x401170
Capabilities:
Read .ini file
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x408178
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
push str.FollowInstructionsInIni
lea ecx, [esp + 0x18]
call fcn.00401000
push 1
push str.SeBackupPrivilege
mov dword [esp + 0x2c], 0
call fcn.00402120
push 1
push str.SeRestorePrivilege
call fcn.00402120
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
add esp, 0x10
push 0x104
push 0
call esi
mov edi, eax
push 0x104
push 0
mov dword [esp + 0x18], edi
call esi
test edi, edi
mov ebx, eax
je 0x4013fc
test ebx, ebx
je 0x4013fc
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, 0x41
xor eax, eax
mov edi, ebx
push 0x104
push ebx
rep stosd dword es:[edi], eax
push eax
call esi
test eax, eax
jne 0x401215
push str.GetModuleFileName___call_failed
jmp 0x401401
push 0x40a10c
push ebx
mov ebp, ebx
call fcn.004022bc
add esp, 8
test eax, eax
je 0x40123e
lea ebp, [eax + 1]
push 0x40a10c
push ebp
call fcn.004022bc
add esp, 8
test eax, eax
jne 0x401229
test ebp, ebp
je 0x40126b
mov edi, 0x40ce70
or ecx, 0xffffffff
xor eax, eax
dec ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edi, dword [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
push 0x104
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebx
push eax
jne 0x4012d4
call esi
test eax, eax
jne 0x401299
push str.GetModuleFileName___call_failed
jmp 0x401401
push str..exe
push ebx
call fcn.004022bc
mov edx, eax
add esp, 8
test edx, edx
jne 0x4012bc
lea ecx, [esp + 0x14]
push str.Unable_to_locate_.exe_in_the_module_name
push ecx
jmp 0x401406
mov edi, str..ini
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
jmp 0x40134f
call esi
test eax, eax
jne 0x4012e9
lea ecx, [esp + 0x14]
push str.GetModuleFileName___call_failed
push ecx
jmp 0x401406
push str..exe
push ebx
call fcn.004022bc
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40130c
lea edx, [esp + 0x14]
push str.Unable_to_locate_.exe_in_the_module_name
push edx
jmp 0x401406
cmp ebp, ebx
jbe 0x401339
push 0x40a10c
push ebp
call fcn.004022bc
add esp, 8
test eax, eax
jne 0x401339
push 0x40a0cc
push ebp
call fcn.004022bc
add esp, 8
test eax, eax
jne 0x401339
dec ebp
cmp ebp, ebx
ja 0x401310
mov edi, dword [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
inc ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
push str.ini_file:__s
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401120
mov esi, dword [esp + 0x1c]
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push ebx
push 0x104
push esi
push 0x40ce6c
push str.RegistrySections
push str.General
call edi
test eax, eax
jbe 0x4013a2
push 0
push ebx
push esi
push 4
call fcn.00401450
add esp, 0x10
push ebx
push 0x104
push esi
push 0x40ce6c
push str.FileSections
push str.General
call edi
test eax, eax
jbe 0x4013cc
push 0
push ebx
push esi
push 1
call fcn.00401450
add esp, 0x10
push ebx
push 0x104
push esi
push 0x40ce6c
push str.DirectorySections
push str.General
call edi
test eax, eax
jbe 0x40140e
mov edx, dword [esp + 0x10]
push 1
push ebx
push edx
push 1
call fcn.00401450
add esp, 0x10
jmp 0x40140e
push str.LocalAlloc_returned_NULL
lea eax, [esp + 0x18]
push eax
call fcn.00401120
add esp, 8
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x40141f
push eax
call esi
test ebx, ebx
je 0x401426
push ebx
call esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], 0xffffffff
call fcn.004010a0
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret