Function at 0x180050340
Capabilities:
Check for time delay via gettickcount
Check mutex on windows
Set current directory

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov qword [rbp - 0x79], 0xfffffffffffffffe
mov qword [rsp + 0x150], rbx
mov rax, qword [0x1804e0010]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov byte [rsp + 0x30], r8b
mov r12, rdx
mov r14, rcx
mov rsi, qword [rcx + 0x48]
mov qword [rbp - 0x71], rsi
test rsi, rsi
je 0x180050397
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
nop
cmp qword [r14 + 0x50], 0
je 0x180050565
test rsi, rsi
je 0x180050565
cmp qword [r14 + 0x58], 0
je 0x180050565
cmp qword [r12 + 0x10], 0
jne 0x18005059f
mov rcx, qword [r14 + 0x68]
test rcx, rcx
je 0x1800503d0
call fcn.180029e60
mov rcx, qword [r14 + 0x80]
test rcx, rcx
je 0x1800503e2
mov rax, qword [rcx]
call qword [rax + 0x38]
lea rbx, [r14 + 0x60]
mov qword [rsp + 0x48], rbx
test rbx, rbx
je 0x1800503ff
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800503ff
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x28]
xor r15d, r15d
cmp qword [r14 + 0x50], r15
je 0x1800504a8
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], r15
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], 7
mov word [rbp - 0x69], r15w
xor r8d, r8d
lea rdx, [0x1803cd4c0]
lea rcx, [rbp - 0x69]
call fcn.180005cd0
nop
mov rcx, qword [r14 + 0x50]
mov rax, qword [rcx]
xor r8d, r8d
lea rdx, [rbp - 0x69]
call qword [rax + 0x30]
nop
mov rdx, qword [rbp - 0x51]
cmp rdx, 8
jb 0x180050497
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x69]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180050492
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180050492
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], 7
mov word [rbp - 0x69], r15w
test rbx, rbx
je 0x1800504c0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800504bb
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x48], r15
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x28]
mov rcx, qword [r14 + 0x58]
test rcx, rcx
je 0x1800504d8
mov rax, qword [rcx]
call qword [rax + 0x40]
mov qword [rbp - 0x39], r15
mov qword [rbp - 0x31], r15
mov qword [rbp - 0x39], r15
mov qword [rbp - 0x31], 7
mov word [rbp - 0x49], r15w
lea rdx, [rbp - 0x49]
xor ecx, ecx
call fcn.18036e850
lea rcx, [rbp - 0x49]
cmp qword [rbp - 0x31], 8
cmovae rcx, qword [rbp - 0x49]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop
mov rdx, qword [rbp - 0x31]
cmp rdx, 8
jb 0x180050554
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18005054f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18005054f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp - 0x39], r15
mov qword [rbp - 0x31], 7
mov word [rbp - 0x49], r15w
xor bl, bl
test rsi, rsi
je 0x180050575
mov rdx, qword [rsi]
mov rcx, rsi
call qword [rdx + 8]
movzx eax, bl
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180393f50
mov rbx, qword [rsp + 0x150]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, dword [0x1804f309c]
test al, 1
jne 0x1800505be
or eax, 1
mov dword [0x1804f309c], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x1804f30a0], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
sub ebx, dword [0x1804f30a0]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x1804f30a0], eax
lea eax, [rbx - 1]
mov dword [rsp + 0x50], eax
xor r15d, r15d
mov qword [rbp - 0x39], r15
mov qword [rbp - 0x31], r15
mov qword [rbp - 0x39], r15
mov qword [rbp - 0x31], 7
mov word [rbp - 0x49], r15w
mov rax, qword [r14]
lea rdx, [rbp - 9]
mov rcx, r14
call qword [rax + 0x60]
nop
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 9]
call fcn.18015ddf0
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], r15w
lea rdx, [rbp - 0x29]
mov rcx, r12
call fcn.18015ddf0
mov rax, qword [rbp - 0x39]
cmp qword [rbp - 0x19], rax
je 0x18005064a
xor r13b, r13b
jmp 0x18005066f
lea rdx, [rbp - 0x49]
cmp qword [rbp - 0x31], 8
cmovae rdx, qword [rbp - 0x49]
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
call fcn.180159c10
movzx r13d, al
xor r13b, 1
mov rdx, qword [r14 + 0x68]
mov ebx, 1
test rdx, rdx
je 0x1800506f0
add rdx, 0x18
lea rcx, [rbp - 0x69]
call fcn.180005900
nop
movzx r13d, r13b
cmp qword [rbp - 0x59], 0
cmove r13d, ebx
mov rdx, qword [rbp - 0x51]
cmp rdx, 8
jb 0x1800506df
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x69]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800506da
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800506da
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], 7
mov word [rbp - 0x69], r15w
lea rdi, [r14 + 0x60]
mov qword [rsp + 0x48], rdi
test rdi, rdi
je 0x18005070d
mov rcx, qword [rdi]
test rcx, rcx
je 0x18005070d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [r14 + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x160]
mov r8d, r15d
test al, al
setne r8b
mov rcx, qword [r14 + 0x50]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x30]
test al, al
jne 0x180050757
test rdi, rdi
je 0x180050944
mov rcx, qword [rdi]
test rcx, rcx
je 0x18005074b
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x48], r15
xor bl, bl
jmp 0x180050c89
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], r15
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], 7
mov word [rbp - 0x69], r15w
mov r8d, 0x35
lea rdx, str.RCHistoryFiles_31F06099_91F2_4157_85EC_7A7F8332F587
lea rcx, [rbp - 0x69]
call fcn.180005cd0
nop
mov qword [rsp + 0x38], r15
mov word [rsp + 0x40], 0
mov word [rsp + 0x40], 0
cmp qword [rbp - 0x59], 0
je 0x1800507b1
lea r8, [rbp - 0x69]
cmp qword [rbp - 0x51], 8
cmovae r8, qword [rbp - 0x69]
jmp 0x1800507b4
mov r8, r15
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rsp + 0x38], rax
test rax, rax
je 0x1800507df
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, byte [rsp + 0x41]
cmp eax, 0xb7
cmove ecx, ebx
mov byte [rsp + 0x41], cl
mov rdx, qword [rbp - 0x51]
cmp rdx, 8
jb 0x180050822
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x69]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18005081d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18005081d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], 7
mov word [rbp - 0x69], r15w
mov rdx, r12
lea rcx, [rsp + 0x38]
call fcn.18024f0c0
test r13b, r13b
je 0x180050862
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x28]
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, qword [r14 + 0x70]
test rcx, rcx
je 0x180050875
mov rax, qword [rcx]
call qword [rax + 8]
mov qword [r14 + 0x70], r15
mov rax, qword [r14]
mov rdx, r12
mov rcx, r14
call qword [rax + 0x70]
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x180050897
mov rax, qword [rax]
mov rcx, rbx
call qword [rax]
nop
test rbx, rbx
je 0x1800508a4
cmp qword [r14 + 0x70], rbx
je 0x1800508f0
jmp 0x1800508d5
mov rdx, r12
mov rcx, r14
call fcn.1800520f0
mov r12, rax
test rax, rax
je 0x1800508c7
mov rax, qword [rax]
mov rcx, r12
call qword [rax]
mov rbx, r12
mov qword [rsp + 0x58], rbx
mov rcx, qword [r14 + 0x70]
cmp rcx, rbx
je 0x1800508f0
test rbx, rbx
je 0x1800508e1
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov rcx, qword [r14 + 0x70]
test rcx, rcx
je 0x1800508ec
mov rax, qword [rcx]
call qword [rax + 8]
mov qword [r14 + 0x70], rbx
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x38]
nop
test rbx, rbx
je 0x180050909
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x18005091e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x38], r15
mov word [rsp + 0x40], 0
test rdi, rdi
je 0x18005093d
mov rcx, qword [rdi]
test rcx, rcx
je 0x180050938
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x48], r15
cmp qword [r14 + 0x70], 0
jne 0x18005094b
xor bl, bl
jmp 0x180050c89
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x681
call qword [rax + 0x48]
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
xor edx, edx
call qword [rax + pe_nt_image_headers64]
cmp eax, 2
je 0x180050991
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
xor edx, edx
call qword [rax + pe_nt_image_headers64]
cmp eax, 3
je 0x180050991
xor bl, bl
jmp 0x180050993
mov bl, 1
mov edi, dword [rsp + 0x50]
cmp edi, 0xc6
ja 0x180050a68
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x1804f1980], eax
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x411
call qword [rax + 0x48]
test bl, bl
je 0x1800509d4
mov edx, 0x40a
jmp 0x180050a3c
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
mov edx, 2
call qword [rax + pe_nt_image_headers64]
cmp eax, 2
jne 0x180050a05
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x434
call qword [rax + 0x48]
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
mov edx, 1
call qword [rax + pe_nt_image_headers64]
cmp eax, 2
jne 0x180050a37
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
mov edx, 0x41f
lea r8d, [r9 + 1]
call qword [rax + 0x48]
mov edx, 0x436
mov rcx, qword [r14 + 0x58]
mov byte [rsp + 0x20], 0
mov rax, qword [rcx]
xor r9d, r9d
xor r8d, r8d
call qword [rax + 0x48]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0xd8]
inc dword [0x1804f2ea0]
jmp 0x180050b81
test bl, bl
je 0x180050abf
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x1804f1980], eax
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40a
call qword [rax + 0x48]
lea rcx, [r14 + 0x18]
mov rax, qword [rcx]
call qword [rax + 0x48]
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
mov edx, 2
call qword [rax + pe_nt_image_headers64]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0xd8]
jmp 0x180050b67
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0xe8]
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
call qword [rax + 0x38]
cmp eax, 0x12
ja 0x180050ae4
mov ecx, 0x42004
bt ecx, eax
jb 0x180050b31
cmp edi, 0x116
ja 0x180050b31
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
mov edx, 2
call qword [rax + pe_nt_image_headers64]
cmp eax, 2
jne 0x180050b1d
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x434
call qword [rax + 0x48]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0xd8]
inc dword [0x1804f2ea0]
jmp 0x180050b67
cmp eax, 0x22
jne 0x180050b67
mov rcx, qword [r14 + 0x70]
mov rax, qword [rcx]
mov edx, 2
call qword [rax + pe_nt_image_headers64]
cmp eax, 2
jne 0x180050b67
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x434
call qword [rax + 0x48]
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x450
call qword [rax + 0x48]
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x440
call qword [rax + 0x48]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x1a0]
cmp dword [0x1804f2ea0], 5
jne 0x180050bc3
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0xf8]
mov dword [0x1804f2ea0], r15d
test r13b, r13b
je 0x180050c87
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
mov byte [rsp + 0x20], 0
xor r9d, r9d
mov edx, 0x41f
lea r8d, [r9 + 1]
call qword [rax + 0x48]
cmp byte [rsp + 0x30], 0
jne 0x180050bf8
mov rcx, qword [r14 + 0x58]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov rcx, qword [r14 + 0x68]
test rcx, rcx
je 0x180050c06
call fcn.180029e60
mov rcx, qword [r14 + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x160]
test al, al
jne 0x180050c71
mov rcx, qword [r14 + 0x68]
test rcx, rcx
jne 0x180050c68
mov ecx, 0x48
call fcn.180393f74
mov rcx, rax
mov qword [rsp + 0x58], rax
mov qword [rax], r15
mov qword [rax + 8], r15
mov dword [rax + 0x10], 0x3e8
mov qword [rax + 0x28], r15
mov qword [rax + 0x30], 7
mov word [rax + 0x18], r15w
mov qword [rax + 0x38], r15
mov qword [rax + 0x40], r15
mov qword [r14 + 0x68], rax
lea rax, [r14 + 0x28]
mov qword [rcx], rax
mov rcx, qword [r14 + 0x68]
lea rdx, [rbp - 0x29]
call fcn.180029b60
mov rcx, qword [r14 + 0x80]
test rcx, rcx
je 0x180050c87
mov rax, qword [rcx]
lea rdx, [rbp - 0x29]
call qword [rax + 0x40]
mov bl, 1
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x180050ccc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180050cc7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180050cc7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], r15w
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x180050d20
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180050d1b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180050d1b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp + 7], r15
mov qword [rbp + 0xf], 7
mov word [rbp - 9], r15w
mov rax, qword [rbp - 0x31]
cmp rax, 8
jb 0x180050d74
lea rdx, [rax*2 + 2]
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180050d6f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180050d6f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp - 0x39], r15
mov qword [rbp - 0x31], 7
mov word [rbp - 0x49], r15w
jmp 0x180050567