Function at 0x40687a
Capabilities:
Create thread
Get common file path
Link many functions at runtime
Terminate process

Disassembly:
mov eax, 0x4146b3
call fcn.004097a4
sub esp, 0x70c
push ebx
push esi
push edi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], esp
call fcn.0040545d
xor esi, esi
push 0x38
lea eax, [ebp - 0x104]
push esi
push eax
mov dword [ebp - 4], esi
call fcn.004082e0
lea eax, [ebp - 0x64]
mov dword [ebp - 0xc4], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0xb0], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0x614]
push eax
call fcn.004045f0
add esp, 0x10
push 0x104
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x40c]
push eax
xor edi, edi
lea eax, [ebp - 0x614]
inc edi
push eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], esi
call fcn.00409ec1
mov ebx, eax
neg ebx
sbb ebx, ebx
push esi
neg ebx
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 1
call fcn.00404556
add esp, 0xc
cmp eax, 0xffffffff
je 0x406969
cmp eax, esi
je 0x406969
cmp dword [ebp + 8], esi
jne 0x406969
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, esi
je 0x406983
mov dword [ebp - 0x14], 0x2000
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00405afc
cmp eax, esi
jne 0x406989
push esi
call fcn.0040a2cc
mov eax, dword [ebp - 0xe4]
mov ecx, eax
and ecx, edi
mov dword [0x41d0c8], ecx
je 0x4069dc
mov dword [0x41d0cc], eax
mov eax, dword [ebp - 0xd8]
mov dword [0x41d0d0], eax
mov eax, dword [ebp - 0x34]
mov dword [0x41d0e4], eax
mov eax, dword [ebp - 0x30]
mov dword [0x41d0ec], eax
mov eax, dword [ebp - 0x28]
mov dword [0x41d0f0], eax
mov eax, dword [ebp - 0x2c]
mov dword [0x41d0e8], eax
lea esi, [ebp - 0xf4]
mov edi, 0x41d0d4
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 0x406d79
cmp dword [ebp - 0x14], esi
jne 0x406a02
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00405cfa
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0xdc], esi
je 0x406a4f
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0xc8]
push eax
push esi
lea eax, [ebp - 0x88]
push eax
push 0x406465
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xfa
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
test byte [ebp - 0xe4], 1
je 0x406d4c
lea eax, [ebp - 0x184]
push 0x20
push eax
call fcn.00407087
pop ecx
pop ecx
lea eax, [ebp - 0x164]
push 0x20
push eax
call fcn.0040705c
pop ecx
pop ecx
lea eax, [ebp - 0x58]
push eax
call fcn.004064e2
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x406a91
mov eax, dword [eax + 4]
jmp 0x406a94
add eax, 4
lea ecx, [ebp - 0x184]
push ecx
lea ecx, [ebp - 0x164]
push ecx
push eax
lea eax, [ebp - 0x308]
push str.Installation_of__s_on_host__s___s_
push eax
call fcn.0040996a
add esp, 0x14
push esi
push 1
lea ecx, [ebp - 0x58]
call fcn.004046e7
cmp dword [ebp - 0x14], esi
mov eax, str.succeeded
je 0x406ad1
mov eax, str.failed
push eax
lea eax, [ebp - 0x308]
push eax
call fcn.00408b00
pop ecx
pop ecx
push esi
lea ecx, [ebp - 0xa4]
mov dword [ebp - 0x8c], 0xf
call fcn.004046cb
mov ebx, dword [ebp - 0x14]
push 0x40
xor eax, eax
mov byte [ebp - 0x288], 0
pop ecx
lea edi, [ebp - 0x287]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x58]
push eax
mov byte [ebp - 4], 2
call fcn.004064e2
cmp ebx, esi
pop ecx
jne 0x406b81
cmp dword [eax + 0x18], 0x10
jb 0x406b2d
mov eax, dword [eax + 4]
jmp 0x406b30
add eax, 4
push eax
movzx eax, word [0x41d0de]
push eax
movzx eax, word [0x41d0dc]
push eax
movzx eax, word [0x41d0da]
push eax
lea eax, [ebp - 0x288]
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 fcn.0040996a
add esp, 0x18
xor edi, edi
push esi
inc edi
push edi
lea ecx, [ebp - 0x58]
call fcn.004046e7
lea eax, [ebp - 0x288]
push eax
lea ecx, [ebp - 0xa4]
call fcn.00404c9d
jmp 0x406d0f
cmp dword [eax + 0x18], 0x10
jb 0x406b8c
mov eax, dword [eax + 4]
jmp 0x406b8f
add eax, 4
push eax
lea eax, [ebp - 0x288]
push str.One_or_more_errors_where_encountered_while_installing_the__s_engine:_br__r_n_br__r_n
push eax
call fcn.0040996a
add esp, 0xc
xor edi, edi
push esi
inc edi
push edi
lea ecx, [ebp - 0x58]
call fcn.004046e7
lea eax, [ebp - 0x288]
push eax
lea ecx, [ebp - 0xa4]
call fcn.00404c9d
test bh, 0x20
je 0x406bff
lea eax, [ebp - 0x58]
push eax
call fcn.004064e2
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x406bdd
mov eax, dword [eax + 4]
jmp 0x406be0
add eax, 4
push eax
lea eax, [ebp - 0x288]
push str._s_is_already_running_on_this_host__installation_aborted.
push eax
call fcn.0040996a
add esp, 0xc
push esi
push edi
lea ecx, [ebp - 0x58]
call fcn.004046e7
test bh, 0x40
je 0x406c3b
lea eax, [ebp - 0x58]
push eax
call fcn.004064e2
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x406c19
mov eax, dword [eax + 4]
jmp 0x406c1c
add eax, 4
push eax
lea eax, [ebp - 0x288]
push str.Unable_to_create_engine_file.__s_might_be_installed_already
push eax
call fcn.0040996a
add esp, 0xc
push esi
push edi
lea ecx, [ebp - 0x58]
call fcn.004046e7
test bh, bh
jns 0x406c76
lea eax, [ebp - 0x58]
push eax
call fcn.004064e2
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x406c54
mov eax, dword [eax + 4]
jmp 0x406c57
add eax, 4
push eax
lea eax, [ebp - 0x288]
push str.Unable_to_create_link_file.__s_might_be_installed_already
push eax
call fcn.0040996a
add esp, 0xc
push esi
push edi
lea ecx, [ebp - 0x58]
call fcn.004046e7
test ebx, 0x10000
je 0x406cbe
lea eax, [ebp - 0x58]
push eax
call fcn.004064e2
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x406c93
mov eax, dword [eax + 4]
jmp 0x406c96
add eax, 4
mov ecx, ebx
and ecx, 0xfff
push ecx
push eax
lea eax, [ebp - 0x288]
push str.Enable_autostartup_failed._The__s_engine_will_not_be_started_automatically_by_Windows_after_a_reboot___u_
push eax
call fcn.0040996a
add esp, 0x10
push esi
push edi
lea ecx, [ebp - 0x58]
call fcn.004046e7
test ebx, 0x20000
je 0x406cfd
lea eax, [ebp - 0x58]
push eax
call fcn.004064e2
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x406cdb
mov eax, dword [eax + 4]
jmp 0x406cde
add eax, 4
push eax
lea eax, [ebp - 0x288]
push str.Unable_to_start__s_engine
push eax
call fcn.0040996a
add esp, 0xc
push esi
push edi
lea ecx, [ebp - 0x58]
call fcn.004046e7
lea eax, [ebp - 0x288]
push eax
lea ecx, [ebp - 0xa4]
call fcn.00404c5a
cmp dword [ebp - 0x8c], 0x10
mov eax, dword [ebp - 0xa0]
jae 0x406d24
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0x308]
push eax
push str.Installation_report
push esi
push esi
call fcn.0040608b
add esp, 0x14
push esi
push edi
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 1
call fcn.004046e7
cmp dword [ebp - 0xdc], esi
je 0x406d68
push 0xffffffffffffffff
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x60], 0xffffffff
push 0x41a7e4
lea eax, [ebp - 0x60]
jmp 0x406fdd
push dword [ebp - 0x18]
lea eax, [ebp - 0x510]
push eax
call fcn.00408af0
lea eax, [ebp - 0x510]
push eax
call fcn.00409e52
lea eax, [ebp - 0x510]
push eax
lea eax, [ebp - 0x40c]
push eax
push str._s_s.dat
push 0x41d110
call fcn.0040996a
lea eax, [ebp - 0x510]
push eax
lea eax, [ebp - 0x40c]
push eax
push str._s_s.le
push 0x41d218
call fcn.0040996a
push dword [ebp - 0x18]
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x718]
push str._s_s.dll
push eax
call fcn.0040996a
add esp, 0x3c
lea eax, [ebp - 0x718]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, esi
mov dword [0x41d108], eax
jne 0x406e13
or dword [ebp - 0x6c], 0xffffffff
push 0x41a7e4
lea eax, [ebp - 0x6c]
jmp 0x406fdd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.StopL
push eax
call esi
push str.StartL
push dword [0x41d108]
mov dword [0x41d104], eax
call esi
push str.SaveE
push dword [0x41d108]
mov dword [0x41d100], eax
call esi
push str.SetLOpt
push dword [0x41d108]
mov dword [0x41d0fc], eax
call esi
push str.FlushBuffer
push dword [0x41d108]
mov dword [0x41d0f8], eax
call esi
xor edi, edi
cmp dword [0x41d104], edi
mov dword [0x41d0f4], eax
je 0x406fc5
cmp dword [0x41d100], edi
je 0x406fc5
cmp dword [0x41d0fc], edi
je 0x406fc5
cmp eax, edi
je 0x406fc5
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
cmp ebx, edi
je 0x406ec5
push str.RegisterServiceProcess
push ebx
call esi
cmp eax, edi
je 0x406ebe
push 1
push edi
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x124]
push 0x20
push eax
call fcn.00407087
pop ecx
pop ecx
lea eax, [ebp - 0x144]
push 0x20
push eax
call fcn.0040705c
pop ecx
pop ecx
push dword [ebp - 0xe0]
push 0x41d110
call dword [0x41d0f8]
cmp dword [ebp + 8], edi
pop ecx
pop ecx
je 0x406f03
call dword [0x41d104]
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x70], edi
lea eax, [ebp - 0x7c]
push eax
mov byte [ebp - 4], 3
call fcn.0040752d
pop ecx
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x124]
push eax
call dword [0x41d100]
add esp, 0xc
cmp eax, edi
je 0x406f4a
or dword [ebp - 0x5c], 0xffffffff
push 0x41a7e4
lea eax, [ebp - 0x5c]
jmp 0x406fdd
lea ecx, [ebp - 0x7c]
call fcn.00406848
push dword [ebp - 0x64]
call fcn.00409a12
push dword [ebp - 0x3c]
call fcn.00409a12
push dword [ebp - 0x38]
call fcn.00409a12
push dword [ebp - 0x18]
call fcn.00409a12
add esp, 0x10
cmp dword [0x41d0c8], 0
je 0x406f84
cmp dword [ebp - 0x24], 0
jne 0x406fa7
push dword [ebp - 0x34]
call fcn.00409a12
push dword [ebp - 0x2c]
call fcn.00409a12
push dword [ebp - 0x30]
call fcn.00409a12
push dword [ebp - 0x28]
call fcn.00409a12
add esp, 0x10
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00405466
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
push dword [0x41d108]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
or dword [ebp - 0x68], 0xffffffff
push 0x41a7e4
lea eax, [ebp - 0x68]
push eax
call fcn.004097c3
cmp dword [ebp - 0xcc], 0xffffffff
jne 0x406ff0
and dword [ebp - 0x24], 0
mov eax, 0x406f52
ret