Function at 0x1400057a0
Capabilities:
Create thread
Terminate thread

Disassembly:
push rdi
push r12
push r13
mov eax, 0x19a0
call fcn.14000cbc0
sub rsp, rax
mov qword [rsp + 0x88], 0xfffffffffffffffe
mov qword [rsp + 0x19c0], rbx
mov qword [rsp + 0x19d0], rbp
mov qword [rsp + 0x19d8], rsi
mov rax, qword [0x140013240]
xor rax, rsp
mov qword [rsp + 0x1990], rax
mov rbx, rdx
mov ebp, 1
xor r12d, r12d
mov rsi, r12
mov edi, r12d
cmp dword [0x1400131b0], esi
je 0x1400058c7
lea rdx, [0x140004e80]
lea rcx, [0x1400132d0]
call qword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerA]
mov qword [0x140013400], rax
test rax, rax
jne 0x14000584c
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005f0a
xor r9d, r9d
movzx r8d, bp
mov edx, 0xc0000006
call fcn.140003280
jmp 0x140005f0a
mov dword [0x1400132c8], 2
mov dword [rsp + 0x30], shutdown
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], r12d
mov dword [rsp + 0x34], 2
mov dword [rsp + 0x3c], r12d
mov dword [rsp + 0x44], ebp
mov dword [rsp + 0x48], 0x1388
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov ebp, 2
test eax, eax
jne 0x1400058c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005e77
xor r9d, r9d
mov r8w, 1
mov edx, 0xc0000006
call fcn.140003280
jmp 0x140005e77
mov ecx, Ordinal_316
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1400058e5
mov rcx, rax
call fcn.140001000
jmp 0x1400058e8
mov rax, r12
mov qword [0x140013290], rax
test rax, rax
jne 0x14000591c
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005912
xor r9d, r9d
mov r8w, 1
mov edx, 0xc0000004
call fcn.140003280
mov ebx, 8
jmp 0x140005e77
lea rdx, [0x1400132d0]
mov rcx, rax
call fcn.140001120
test eax, eax
je 0x14000595a
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x14000594d
xor r9d, r9d
mov r8w, 1
mov edx, 0xc0000005
call fcn.140003280
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x140005e77
mov ecx, reloc.WS2_32.dll_WSASetLastError
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140005978
mov rcx, rax
call fcn.140003370
jmp 0x14000597b
mov rax, r12
mov qword [0x1400132a0], rax
test rax, rax
jne 0x1400059af
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x1400059a5
xor r9d, r9d
mov r8w, 1
mov edx, 0xc0000004
call fcn.140003280
mov ebx, 8
jmp 0x140005e77
mov dword [rsp + 0x20], r12d
mov r9d, reloc.WS2_32.dll_listen
mov r8, qword [0x140013290]
lea rdx, [0x1400132d0]
mov rcx, rax
call fcn.1400035b0
test eax, eax
jne 0x1400059f2
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x1400059f2
xor r9d, r9d
mov r8w, 2
mov edx, 0x8000000b
call fcn.140003280
cmp qword [0x1400132a0], 0
je 0x140005a31
lea r8, [0x1400132d0]
lea rdx, str._s_starting
lea rcx, [rsp + 0x190]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r8, [rsp + 0x190]
mov edx, reloc.WS2_32.dll_listen
mov rcx, qword [0x1400132a0]
call fcn.140003410
mov r8, qword [rbx]
lea rdx, str.omtsreco_exitevt__s
lea rcx, [rsp + 0x90]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r9, [rsp + 0x90]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x1400132c0], rax
test rax, rax
jne 0x140005a99
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005e77
xor r9d, r9d
mov r8w, 1
mov edx, 0xc0000007
call fcn.140003280
jmp 0x140005e77
mov r8, qword [rbx]
lea rdx, str.omtsreco_syncevt__s
lea rcx, [rsp + 0x90]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r9, [rsp + 0x90]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x1400133f0], rax
test rax, rax
jne 0x140005b01
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005e77
xor r9d, r9d
mov r8w, 1
mov edx, 0xc0000007
call fcn.140003280
jmp 0x140005e77
mov rax, qword [0x1400132c0]
mov qword [0x1400133e8], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
lea r9, [0x1400133d8]
lea r8, [0x140005380]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
test rax, rax
jne 0x140005b6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005e88
lea r8, str.service_main_____failed_to_create_worker_thread.
lea edx, [rsi + 0xa]
call fcn.140003410
jmp 0x140005e77
mov rax, qword [0x1400133f0]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rsi
mov r13d, 0x3e8
or r9d, 0xffffffff
cmp dword [0x1400131b0], 0
cmovne r9d, r13d
xor r8d, r8d
lea rdx, [rsp + 0x60]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ebx, eax
mov ecx, eax
test eax, eax
je 0x140005c76
sub ecx, 1
je 0x140005c50
cmp ecx, 0x101
jne 0x140005c0c
add edi, 1
cmp edi, 5
jb 0x140005b81
cmp qword [0x1400132a0], 0
je 0x140005e88
lea r8d, [rcx + 1]
lea rdx, str.service_main_____waited_too_long_for_worker_thread
lea rcx, [rsp + 0x190]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r8, [rsp + 0x190]
mov edx, 0xa
mov rcx, qword [0x1400132a0]
call fcn.140003410
jmp 0x140005e77
cmp qword [0x1400132a0], 0
je 0x140005e88
mov r8d, eax
lea rdx, str.service_main_____error_synchronizing_with_worker_thread___d_
lea rcx, [rsp + 0x1190]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r8, [rsp + 0x1190]
mov edx, 0xa
mov rcx, qword [0x1400132a0]
call fcn.140003410
jmp 0x140005e77
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005e88
lea r8, str.service_main_____worker_thread_exited
mov edx, 0xa
call fcn.140003410
jmp 0x140005e77
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005c93
lea r8, str.service_main_____worker_thread_initialization_success
mov edx, reloc.WS2_32.dll_inet_ntoa
call fcn.140003410
cmp dword [0x1400131b0], 0
je 0x140005d4e
mov dword [0x1400132c8], 4
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.140004e30
test eax, eax
jne 0x140005d4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005ce4
xor r9d, r9d
mov r8w, 1
mov edx, 0xc0000006
call fcn.140003280
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005e88
mov r9d, 0x400
lea r8, [rsp + 0x590]
mov edx, 0x181
call fcn.1400033a0
test eax, eax
je 0x140005e77
mov r9d, ebx
mov r8d, ebp
lea rdx, [rsp + 0x590]
lea rcx, [rsp + 0x990]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r8, [rsp + 0x990]
mov edx, 0xa
mov rcx, qword [0x1400132a0]
call fcn.140003410
jmp 0x140005e77
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005d6c
xor r9d, r9d
mov r8w, 4
mov edx, 0x40000001
call fcn.140003280
mov rax, qword [0x1400132c0]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0x20], r12d
or r9d, 0xffffffff
xor r8d, r8d
lea rdx, [rsp + 0x60]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
test eax, eax
je 0x140005dbe
cmp eax, 1
jne 0x140005df8
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005df8
lea r8, str.service_main_____wait_returned_due_to_exit_of_worker_thread
lea edx, [rax + 0xc]
call fcn.140003410
jmp 0x140005df8
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005ddb
lea r8, str.service_main_____wait_returned_due_to_setting_of_exit_event
mov edx, reloc.WS2_32.dll_listen
call fcn.140003410
mov edx, 0x1f4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140005df8
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov ebx, r12d
mov rcx, qword [0x140013298]
test rcx, rcx
je 0x140005e19
xor r9d, r9d
mov r8w, 4
mov edx, 0x40000002
call fcn.140003280
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005e88
mov r9d, 0x400
lea r8, [rsp + 0xd90]
mov edx, 0x1f4
call fcn.1400033a0
test eax, eax
je 0x140005e77
lea r8, [0x1400132d0]
lea rdx, [rsp + 0xd90]
lea rcx, [rsp + 0x1590]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r8, [rsp + 0x1590]
mov edx, 0xa
mov rcx, qword [0x1400132a0]
call fcn.140003410
mov rcx, qword [0x1400132a0]
test rcx, rcx
je 0x140005e88
call fcn.140003950
mov rcx, qword [0x1400132c0]
test rcx, rcx
je 0x140005e9a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400133f0]
test rcx, rcx
je 0x140005eac
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rsi, rsi
je 0x140005eba
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x1400131b0], 0
je 0x140005f0a
mov dword [0x1400132c8], 1
mov dword [rsp + 0x30], shutdown
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x34], 1
mov dword [rsp + 0x3c], ebx
mov dword [rsp + 0x44], r12d
mov dword [rsp + 0x48], r12d
lea rdx, [rsp + 0x30]
mov rcx, qword [0x140013400]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov rcx, qword [rsp + 0x1990]
xor rcx, rsp
call fcn.14000be00
lea r11, [rsp + 0x19a0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret