Function at 0x140003000
Capabilities:
Check mutex on windows
Create thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x888
mov rax, qword [0x140010008]
xor rax, rsp
mov qword [rsp + 0x870], rax
mov rbp, rcx
lea rdx, [0x14000ddf8]
mov rcx, r8
mov rbx, r8
or esi, 0xffffffff
call fcn.1400046d0
test rax, rax
jne 0x14000304f
lea rdx, [0x14000de00]
mov rcx, rbx
call fcn.1400046d0
test rax, rax
je 0x14000305a
lea rcx, [rax + 6]
call fcn.140004738
mov esi, eax
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x14000349a
lea rdx, [0x14000de38]
mov rcx, rbx
call fcn.1400046d0
test rax, rax
mov r8, rax
jne 0x1400030a5
lea rdx, [0x14000de40]
mov rcx, rbx
call fcn.1400046d0
test rax, rax
mov r8, rax
je 0x14000349a
add r8, 6
mov r9, r8
cmp word [r8], 0
je 0x1400030be
add r9, 2
cmp word [r9], 0
jne 0x1400030b3
cmp word [r9 - 2], 0x20
lea rax, [r9 - 2]
jne 0x1400030dd
nop
nop
mov r9, rax
add rax, 0xfffffffffffffffe
cmp word [rax], 0x20
je 0x1400030d0
sub r9, r8
sar r9, 1
test r9, r9
jle 0x14000349a
lea rcx, [rsp + 0x660]
mov edx, 0x104
mov qword [rsp + 0x8b8], r12
mov qword [rsp + 0x880], r13
call fcn.140004810
xor r12d, r12d
lea r13, [0x14000dff0]
lea r8, [rsp + 0x660]
lea rcx, [rsp + 0x110]
mov edx, 0x104
mov qword [rsp + 0x108], r12
mov qword [rsp + 0x318], r12
mov qword [rsp + 0xf0], r13
mov qword [rsp + 0x100], r12
mov dword [rsp + 0x324], 0xffffffff
mov dword [rsp + 0x320], r12d
mov qword [rsp + 0x440], r12
call fcn.1400048f4
lea rcx, [rsp + 0x450]
xor edx, edx
mov r8d, 0x208
mov dword [rsp + 0x324], esi
call fcn.1400089e0
lea r8, str.kyoceramita_kmpop_10_
lea rcx, [rsp + 0x450]
mov edx, 0x104
call fcn.1400048f4
lea r8, [rsp + 0x660]
lea rcx, [rsp + 0x450]
mov edx, 0x104
call fcn.14000475c
lea rcx, [rsp + 0x450]
mov dx, 0x5c
call fcn.1400047f0
test rax, rax
je 0x14000320b
lea rcx, [rsp + 0x450]
mov dx, 0x5c
call fcn.1400047f0
test rax, rax
je 0x14000320b
nop
nop
lea rcx, [rsp + 0x450]
mov dx, 0x5c
mov word [rax], 0x5f
call fcn.1400047f0
test rax, rax
jne 0x1400031f0
lea r8, [rsp + 0x450]
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140003475
lea rax, [0x140003560]
mov edx, 0x7f00
xor ecx, ecx
mov dword [rsp + 0x70], 0x50
mov dword [rsp + 0x74], 0xb
mov dword [rsp + 0x80], r12d
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x84], r12d
mov qword [rsp + 0x88], rbp
call qword [sym.imp.USER32.dll_LoadIconW]
mov edx, 0x7f00
xor ecx, ecx
mov qword [rsp + 0x90], rax
call qword [sym.imp.USER32.dll_LoadCursorW]
lea rbx, str.KMPOPUPMGR
mov edx, 0x7f00
xor ecx, ecx
mov qword [rsp + 0xb0], rbx
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], 1
mov qword [rsp + 0xa8], r12
call qword [sym.imp.USER32.dll_LoadIconW]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0xb8], rax
call qword [sym.imp.USER32.dll_RegisterClassExW]
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], 0x80000000
mov dword [rsp + 0x30], 0x80000000
mov r9d, 0x80000000
mov r8, rbx
mov rdx, rbx
xor ecx, ecx
mov dword [rsp + 0x28], 0x80000000
mov qword [rsp + 0xf8], rbp
mov dword [rsp + 0x20], 0x80000000
call qword [sym.imp.USER32.dll_CreateWindowExW]
test rax, rax
mov qword [rsp + 0x108], rax
je 0x140003475
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
lea r9, [rsp + 0xf0]
lea r8, [0x1400037d0]
mov qword [rsp + 0x318], rax
lea rax, [rsp + 0x60]
xor edx, edx
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov dword [rsp + 0x60], 0x66
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r8d, dword [rsp + 0x324]
test r8d, r8d
mov qword [rsp + 0x100], rax
jle 0x1400033c1
mov rcx, qword [rsp + 0x108]
xor r9d, r9d
imul r8d, r8d, 0x3e8
lea edx, [r9 + 0x65]
call qword [sym.imp.USER32.dll_SetTimer]
mov qword [rsp + 0x328], rax
lea rcx, [rsp + 0xc0]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x140003416
nop
nop
lea rcx, [rsp + 0xc0]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0xc0]
call qword [sym.imp.USER32.dll_DispatchMessageW]
lea rcx, [rsp + 0xc0]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x1400033e0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140012098]
mov edi, dword [rsp + 0xd0]
test rcx, rcx
mov qword [rsp + 0xf0], r13
je 0x140003447
call qword [sym.imp.USER32.dll_DestroyWindow]
mov qword [0x140012098], r12
mov eax, edi
mov r12, qword [rsp + 0x8b8]
mov r13, qword [rsp + 0x880]
mov rcx, qword [rsp + 0x870]
xor rcx, rsp
call fcn.1400046b0
add rsp, 0x888
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [0x140012098]
mov qword [rsp + 0xf0], r13
test rcx, rcx
je 0x140003496
call qword [sym.imp.USER32.dll_DestroyWindow]
mov qword [0x140012098], r12
xor eax, eax
jmp 0x140003449
xor eax, eax
jmp 0x140003459