Function at 0x100066d0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x2c
test byte [0x100140a4], 8
je 0x100066fc
mov dword [esp + 0xc], 0x100099dc
mov dword [esp + 8], 0x100099d0
mov dword [esp], 3
call dbg.wine_dbg_log
movaps xmm0, xmmword [0x10009990]
movups xmmword [esp], xmm0
call dword [sym.imp.kernel32.dll_CreateEventW]
sub esp, 0x10
mov dword [0x100140dc], eax
test eax, eax
je 0x100069ed
mov dword [esp + 8], 0
mov dword [esp + 4], dbg._ServiceHandler@16
mov dword [esp], str.BITS
call dword [sym.imp.advapi32.dll_RegisterServiceCtrlHandlerExW]
sub esp, 0xc
mov dword [0x100140e0], eax
test eax, eax
je 0x10006aa9
mov dword [0x100140e4], 0x10
mov dword [0x100140e8], 2
xorps xmm0, xmm0
movups xmmword [0x100140ec], xmm0
mov dword [0x100140fc], 0xbb8
mov dword [esp], eax
mov dword [esp + 4], 0x100140e4
call dword [sym.imp.advapi32.dll_SetServiceStatus]
sub esp, 8
test eax, eax
je 0x10006ae3
test byte [0x100140a4], 8
je 0x100067b3
mov dword [esp + 0xc], 0x100099dc
mov dword [esp + 8], str.StartCount
mov dword [esp], 3
call dbg.wine_dbg_log
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
sub esp, 8
test eax, eax
js 0x10006a07
movaps xmm0, xmmword [0x100099a0]
movups xmmword [esp + 0x10], xmm0
movaps xmm0, xmmword [0x100099b0]
movups xmmword [esp], xmm0
mov dword [esp + 0x20], 0
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
sub esp, 0x24
test eax, eax
js 0x10006a07
lea eax, [ebp - 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [0x10009b20]
mov dword [esp + 4], eax
mov eax, dword [0x10009b24]
mov dword [esp], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 4
call dword [sym.imp.ole32.dll_CoRegisterClassObject]
sub esp, 0x14
test eax, eax
js 0x10006a07
movaps xmm0, xmmword [0x10009990]
movups xmmword [esp], xmm0
call dword [sym.imp.kernel32.dll_CreateEventW]
sub esp, 0x10
mov ecx, dword [0x1000974c]
mov dword [ecx + 0x1c], eax
test eax, eax
je 0x10006b2b
lea eax, [ebp - 8]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], dbg._fileTransfer@4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
sub esp, 0x18
test eax, eax
je 0x10006b52
mov esi, eax
mov dword [0x100140e4], 0x10
mov dword [0x100140e8], 4
mov dword [0x100140ec], 7
xorps xmm0, xmm0
movups xmmword [0x100140f0], xmm0
mov eax, dword [0x100140e0]
mov dword [esp], eax
mov dword [esp + 4], 0x100140e4
call dword [sym.imp.advapi32.dll_SetServiceStatus]
sub esp, 8
test eax, eax
jne 0x1000691d
test byte [0x100140a4], 2
je 0x1000690c
mov dword [esp + 0xc], str.failed_to_set_service_status_n
mov dword [esp + 8], str.UpdateStatus
mov dword [esp], 1
call dbg.wine_dbg_log
mov eax, dword [0x100140dc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetEvent]
sub esp, 4
mov dword [esp], esi
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
sub esp, 8
mov dword [0x100140e4], 0x10
mov dword [0x100140e8], 1
mov dword [0x100140ec], 7
xorps xmm0, xmm0
movups xmmword [0x100140f0], xmm0
mov eax, dword [0x100140e0]
mov dword [esp], eax
mov dword [esp + 4], 0x100140e4
call dword [sym.imp.advapi32.dll_SetServiceStatus]
sub esp, 8
test eax, eax
jne 0x100069ac
test byte [0x100140a4], 2
je 0x1000699b
mov dword [esp + 0xc], str.failed_to_set_service_status_n
mov dword [esp + 8], str.UpdateStatus
mov dword [esp], 1
call dbg.wine_dbg_log
mov eax, dword [0x100140dc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetEvent]
sub esp, 4
mov eax, dword [0x100140dc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
test byte [0x100140a4], 8
je 0x100069e2
mov dword [esp + 0xc], str.service_stopped_n
mov dword [esp + 8], 0x100099d0
mov dword [esp], 3
call dbg.wine_dbg_log
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x10006adb
test byte [0x100140a4], 2
je 0x10006adb
mov dword [esp + 0xc], str.failed_to_create_stop_event_n
jmp 0x10006ac7
test byte [0x100140a4], 2
je 0x10006a2c
mov dword [esp + 0xc], str.failed_starting_service_thread_n
mov dword [esp + 8], 0x100099d0
mov dword [esp], 1
call dbg.wine_dbg_log
mov dword [0x100140e4], 0x10
mov dword [0x100140e8], 1
mov dword [0x100140ec], 7
xorps xmm0, xmm0
movups xmmword [0x100140f0], xmm0
mov eax, dword [0x100140e0]
mov dword [esp], eax
mov dword [esp + 4], 0x100140e4
call dword [sym.imp.advapi32.dll_SetServiceStatus]
sub esp, 8
test eax, eax
jne 0x10006adb
test byte [0x100140a4], 2
je 0x10006a96
mov dword [esp + 0xc], str.failed_to_set_service_status_n
mov dword [esp + 8], str.UpdateStatus
mov dword [esp], 1
call dbg.wine_dbg_log
mov eax, dword [0x100140dc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetEvent]
sub esp, 4
jmp 0x10006adb
test byte [0x100140a4], 2
je 0x10006adb
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_register_handler:__lu_n
mov dword [esp + 8], 0x100099d0
mov dword [esp], 1
call dbg.wine_dbg_log
add esp, 0x2c
pop esi
pop ebp
ret 8
test byte [0x100140a4], 2
je 0x10006b08
mov dword [esp + 0xc], str.failed_to_set_service_status_n
mov dword [esp + 8], str.UpdateStatus
mov dword [esp], 1
call dbg.wine_dbg_log
mov eax, dword [0x100140dc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetEvent]
sub esp, 4
test byte [0x100140a4], 8
jne 0x10006797
jmp 0x100067b3
test byte [0x100140a4], 2
je 0x10006a2c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_create_event:_error__ld_n
jmp 0x10006a18
test byte [0x100140a4], 2
je 0x10006a2c
mov dword [esp + 0xc], str.Failed_starting_file_transfer_thread_n
jmp 0x10006a18