Function at 0x406b18
Capabilities:
Create thread
Get common file path
Link many functions at runtime

Disassembly:
mov eax, 0x4089f0
call fcn.00408540
sub esp, 0x6e4
push ebx
push esi
push edi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], esp
call fcn.004056dc
xor esi, esi
push 0x38
lea eax, [ebp - 0xdc]
push esi
push eax
mov dword [ebp - 4], esi
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x60]
mov dword [ebp - 0xa0], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x9c], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x5ec]
push eax
call fcn.00404601
add esp, 0x10
lea eax, [ebp - 0x3e4]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 1
lea eax, [ebp - 0x3e4]
pop edi
mov dword [ebp - 0x24], esi
push eax
lea eax, [ebp - 0x5ec]
push eax
mov dword [ebp - 0x20], edi
call sub.MSVCRT.dll__mbsicmp
mov ebx, eax
push esi
neg ebx
sbb ebx, ebx
mov dword [ebp - 0x14], esi
neg ebx
mov byte [ebp - 4], 1
call fcn.00404562
add esp, 0xc
cmp eax, 0xffffffff
je 0x406c0d
cmp eax, esi
je 0x406c0d
cmp dword [ebp + 8], esi
jne 0x406c0d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, esi
jne 0x406c06
push esi
call sub.MSVCRT.dll_exit
mov dword [ebp - 0x14], 0x2000
lea eax, [ebp - 0xa0]
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xdc]
push eax
call fcn.00405708
cmp eax, esi
jne 0x406c2d
push esi
call sub.MSVCRT.dll_exit
mov eax, dword [ebp - 0xbc]
mov ecx, eax
and ecx, edi
mov dword [0x411000], ecx
je 0x406c80
mov dword [0x411004], eax
mov eax, dword [ebp - 0xb0]
mov dword [0x411008], eax
mov eax, dword [ebp - 0x4c]
mov dword [0x41101c], eax
mov eax, dword [ebp - 0x3c]
mov dword [0x411024], eax
mov eax, dword [ebp - 0x40]
mov dword [0x411028], eax
mov eax, dword [ebp - 0x44]
lea esi, [ebp - 0xcc]
mov edi, 0x41100c
mov dword [0x411020], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor esi, esi
cmp ebx, esi
je 0x40700c
cmp dword [ebp - 0x14], esi
jne 0x406ca6
lea eax, [ebp - 0xa0]
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xdc]
push eax
call fcn.004057db
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0xb4], esi
je 0x406ce7
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x50], eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x58]
push esi
push eax
push 0x406a69
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xfa
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
test byte [ebp - 0xbc], 1
je 0x406fde
lea eax, [ebp - 0x15c]
push 0x20
push eax
call fcn.00407517
pop ecx
lea eax, [ebp - 0xfc]
pop ecx
push 0x20
push eax
call fcn.004074ec
pop ecx
lea eax, [ebp - 0x34]
pop ecx
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
mov ebx, 0x40c228
jne 0x406d2c
mov eax, ebx
lea ecx, [ebp - 0x15c]
push ecx
lea ecx, [ebp - 0xfc]
push ecx
push eax
lea eax, [ebp - 0x2e0]
push str.Installation_of__s_on_host__s___s_
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x14
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
cmp dword [ebp - 0x14], esi
mov eax, str.succeeded
je 0x406d68
mov eax, str.failed
push eax
lea eax, [ebp - 0x2e0]
push eax
call sub.MSVCRT.dll_strcat
mov al, byte [ebp + 0xb]
pop ecx
pop ecx
mov byte [ebp - 0x5c], al
push esi
lea ecx, [ebp - 0x5c]
call fcn.004047cd
mov al, byte [0x410ffc]
push 0x40
mov byte [ebp - 0x260], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x25f]
rep stosd dword es:[edi], eax
cmp dword [ebp - 0x14], esi
mov byte [ebp - 4], 2
stosw word es:[edi], ax
stosb byte es:[edi], al
jne 0x406e16
lea eax, [ebp - 0x34]
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406dbd
mov eax, ebx
push eax
movzx eax, word [0x411016]
push eax
movzx eax, word [0x411014]
push eax
movzx eax, word [0x411012]
push eax
lea eax, [ebp - 0x260]
push str._p_You_will_receive_a_log_report_every__d_days___d_hours_and__d_minutes_from_this_host._Thank_you_for_using__s___p_
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x18
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
lea eax, [ebp - 0x260]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x260]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00404e51
jmp 0x406fb0
lea eax, [ebp - 0x34]
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406e29
mov eax, ebx
push eax
lea eax, [ebp - 0x260]
push str.One_or_more_errors_where_encountered_while_installing_the__s_engine:_br__r_n_br__r_n
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
lea eax, [ebp - 0x260]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x260]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00404e51
mov edi, dword [ebp - 0x14]
test edi, 0x2000
je 0x406ea2
lea eax, [ebp - 0x34]
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406e83
mov eax, ebx
push eax
lea eax, [ebp - 0x260]
push str._s_is_already_running_on_this_host__installation_aborted.
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
test edi, 0x4000
je 0x406edc
lea eax, [ebp - 0x34]
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406ebd
mov eax, ebx
push eax
lea eax, [ebp - 0x260]
push str.Unable_to_create_engine_file.__s_might_be_installed_already
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
test edi, 0x8000
je 0x406f16
lea eax, [ebp - 0x34]
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406ef7
mov eax, ebx
push eax
lea eax, [ebp - 0x260]
push str.Unable_to_create_link_file.__s_might_be_installed_already
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
test edi, 0x10000
je 0x406f59
lea eax, [ebp - 0x34]
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406f31
mov eax, ebx
mov ecx, edi
and ecx, 0xfff
push ecx
push eax
lea eax, [ebp - 0x260]
push str.Enable_autostartup_failed._The__s_engine_will_not_be_started_automatically_by_Windows_after_a_reboot___u_
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x10
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
test edi, 0x20000
je 0x406f93
lea eax, [ebp - 0x34]
push eax
call fcn.0040729e
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406f74
mov eax, ebx
push eax
lea eax, [ebp - 0x260]
push str.Unable_to_start__s_engine
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea ecx, [ebp - 0x34]
push 1
call fcn.004047cd
lea eax, [ebp - 0x260]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x260]
push eax
lea ecx, [ebp - 0x5c]
call fcn.004051f0
mov eax, dword [ebp - 0x58]
cmp eax, esi
jne 0x406fb9
mov eax, ebx
push eax
lea eax, [ebp - 0x2e0]
push eax
push str.Installation_report
push esi
push esi
call fcn.00406647
add esp, 0x14
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
push 1
call fcn.004047cd
cmp dword [ebp - 0xb4], esi
je 0x406ffa
push 0xffffffffffffffff
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x68], 0xffffffff
lea eax, [ebp - 0x68]
push 0x40c770
push eax
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp - 0x18]
lea eax, [ebp - 0x4e8]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x4e8]
push eax
call sub.MSVCRT.dll__mbsrev
add esp, 0xc
lea eax, [ebp - 0x4e8]
push eax
lea eax, [ebp - 0x3e4]
push eax
push str._s_s.dat
push 0x411044
call sub.MSVCRT.dll_sprintf
add esp, 0x10
lea eax, [ebp - 0x4e8]
push eax
lea eax, [ebp - 0x3e4]
push eax
push str._s_s.le
push 0x411148
call sub.MSVCRT.dll_sprintf
add esp, 0x10
lea eax, [ebp - 0x3e4]
push dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x6f0]
push str._s_s.dll
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x10
lea eax, [ebp - 0x6f0]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, esi
mov dword [0x411040], eax
jne 0x4070b0
or dword [ebp - 0x64], 0xffffffff
lea eax, [ebp - 0x64]
push 0x40c770
push eax
call sub.MSVCRT.dll__CxxThrowException
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.StopL
push eax
call esi
push str.StartL
mov dword [0x41103c], eax
push dword [0x411040]
call esi
push str.SaveE
mov dword [0x411038], eax
push dword [0x411040]
call esi
push str.SetLOpt
mov dword [0x411034], eax
push dword [0x411040]
call esi
push str.FlushBuffer
mov dword [0x411030], eax
push dword [0x411040]
call esi
xor edi, edi
mov dword [0x41102c], eax
cmp dword [0x41103c], edi
je 0x40726d
cmp dword [0x411038], edi
je 0x40726d
cmp dword [0x411034], edi
je 0x40726d
cmp eax, edi
je 0x40726d
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
cmp ebx, edi
je 0x407162
push str.RegisterServiceProcess
push ebx
call esi
cmp eax, edi
je 0x40715b
push 1
push edi
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x11c]
push 0x20
push eax
call fcn.00407517
pop ecx
lea eax, [ebp - 0x13c]
pop ecx
push 0x20
push eax
call fcn.004074ec
pop ecx
pop ecx
push dword [ebp - 0xb8]
push 0x411044
call dword [0x411030]
cmp dword [ebp + 8], edi
pop ecx
pop ecx
je 0x4071a0
call dword [0x41103c]
mov al, byte [ebp + 0xb]
mov dword [ebp - 0x7c], edi
mov byte [ebp - 0x80], al
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], edi
lea eax, [ebp - 0x80]
mov byte [ebp - 4], 3
push eax
call fcn.0040735c
pop ecx
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x13c]
push eax
lea eax, [ebp - 0x11c]
push eax
call dword [0x411038]
add esp, 0xc
cmp eax, edi
je 0x4071ee
or dword [ebp - 0x70], 0xffffffff
lea eax, [ebp - 0x70]
push 0x40c770
push eax
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 1
call fcn.00407306
push dword [ebp - 0x60]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x48]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x38]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x18]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x10
cmp dword [0x411000], 0
je 0x40722c
cmp dword [ebp - 0x20], 0
jne 0x40724f
push dword [ebp - 0x4c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x44]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x3c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x40]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x10
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00405701
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
push dword [0x411040]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
or dword [ebp - 0x6c], 0xffffffff
lea eax, [ebp - 0x6c]
push 0x40c770
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0xa4], 0xffffffff
jne 0x407298
and dword [ebp - 0x20], 0
mov eax, 0x4071fa
ret