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

Disassembly:
mov eax, 0x408970
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x6e4
push ebx
push esi
push edi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], esp
call fcn.00405682
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 0x406bad
cmp eax, esi
je 0x406bad
cmp dword [ebp + 8], esi
jne 0x406bad
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, esi
jne 0x406ba6
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.004056ae
cmp eax, esi
jne 0x406bcd
push esi
call sub.MSVCRT.dll_exit
mov eax, dword [ebp - 0xbc]
mov ecx, eax
and ecx, edi
mov dword [0x410e70], ecx
je 0x406c20
mov dword [0x410e74], eax
mov eax, dword [ebp - 0xb0]
mov dword [0x410e78], eax
mov eax, dword [ebp - 0x4c]
mov dword [0x410e8c], eax
mov eax, dword [ebp - 0x3c]
mov dword [0x410e94], eax
mov eax, dword [ebp - 0x40]
mov dword [0x410e98], eax
mov eax, dword [ebp - 0x44]
lea esi, [ebp - 0xcc]
mov edi, 0x410e7c
mov dword [0x410e90], 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 0x406fac
cmp dword [ebp - 0x14], esi
jne 0x406c46
lea eax, [ebp - 0xa0]
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xdc]
push eax
call fcn.00405781
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0xb4], esi
je 0x406c87
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 0x406a09
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 0x406f7e
lea eax, [ebp - 0x15c]
push 0x20
push eax
call fcn.004074ab
pop ecx
lea eax, [ebp - 0xfc]
pop ecx
push 0x20
push eax
call fcn.00407480
pop ecx
lea eax, [ebp - 0x34]
pop ecx
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
mov ebx, 0x40c230
jne 0x406ccc
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 0x406d08
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 [0x410e6c]
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 0x406db6
lea eax, [ebp - 0x34]
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406d5d
mov eax, ebx
push eax
movzx eax, word [0x410e86]
push eax
movzx eax, word [0x410e84]
push eax
movzx eax, word [0x410e82]
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 0x406f50
lea eax, [ebp - 0x34]
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406dc9
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 0x406e42
lea eax, [ebp - 0x34]
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406e23
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 0x406e7c
lea eax, [ebp - 0x34]
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406e5d
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 0x406eb6
lea eax, [ebp - 0x34]
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406e97
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 0x406ef9
lea eax, [ebp - 0x34]
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406ed1
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 0x406f33
lea eax, [ebp - 0x34]
push eax
call fcn.00407235
mov eax, dword [eax + 4]
pop ecx
cmp eax, esi
jne 0x406f14
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 0x406f59
mov eax, ebx
push eax
lea eax, [ebp - 0x2e0]
push eax
push str.Installation_report
push esi
push esi
call fcn.004065e7
add esp, 0x14
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
push 1
call fcn.004047cd
cmp dword [ebp - 0xb4], esi
je 0x406f9a
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 0x40c778
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
lea eax, [ebp - 0x4e8]
push eax
lea eax, [ebp - 0x3e4]
push eax
push str._s_s.dat
push 0x410eb4
call sub.MSVCRT.dll_sprintf
lea eax, [ebp - 0x4e8]
push eax
lea eax, [ebp - 0x3e4]
push eax
push str._s_s.le
push 0x410fb8
call sub.MSVCRT.dll_sprintf
push dword [ebp - 0x18]
lea eax, [ebp - 0x3e4]
push eax
lea eax, [ebp - 0x6f0]
push str._s_s.dll
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x3c
lea eax, [ebp - 0x6f0]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, esi
mov dword [0x410eb0], eax
jne 0x407047
or dword [ebp - 0x64], 0xffffffff
lea eax, [ebp - 0x64]
push 0x40c778
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 [0x410eac], eax
push dword [0x410eb0]
call esi
push str.SaveE
mov dword [0x410ea8], eax
push dword [0x410eb0]
call esi
push str.SetLOpt
mov dword [0x410ea4], eax
push dword [0x410eb0]
call esi
push str.FlushBuffer
mov dword [0x410ea0], eax
push dword [0x410eb0]
call esi
xor edi, edi
mov dword [0x410e9c], eax
cmp dword [0x410eac], edi
je 0x407204
cmp dword [0x410ea8], edi
je 0x407204
cmp dword [0x410ea4], edi
je 0x407204
cmp eax, edi
je 0x407204
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
cmp ebx, edi
je 0x4070f9
push str.RegisterServiceProcess
push ebx
call esi
cmp eax, edi
je 0x4070f2
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.004074ab
pop ecx
lea eax, [ebp - 0x13c]
pop ecx
push 0x20
push eax
call fcn.00407480
pop ecx
pop ecx
push dword [ebp - 0xb8]
push 0x410eb4
call dword [0x410ea0]
cmp dword [ebp + 8], edi
pop ecx
pop ecx
je 0x407137
call dword [0x410eac]
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.004072f3
pop ecx
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x13c]
push eax
lea eax, [ebp - 0x11c]
push eax
call dword [0x410ea8]
add esp, 0xc
cmp eax, edi
je 0x407185
or dword [ebp - 0x70], 0xffffffff
lea eax, [ebp - 0x70]
push 0x40c778
push eax
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 1
call fcn.0040729d
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 [0x410e70], 0
je 0x4071c3
cmp dword [ebp - 0x20], 0
jne 0x4071e6
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.004056a7
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 [0x410eb0]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
or dword [ebp - 0x6c], 0xffffffff
lea eax, [ebp - 0x6c]
push 0x40c778
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0xa4], 0xffffffff
jne 0x40722f
and dword [ebp - 0x20], 0
mov eax, 0x407191
ret