Function at 0x18005dde0
Capabilities:
Link many functions at runtime

Disassembly:
mov rax, rsp
push rbx
push rbp
push rdi
push r14
sub rsp, 0x58
lea ebp, [rdx + 0x297]
mov r14, r8
mov ebx, edx
mov rdi, rcx
cmp edx, ebp
jae 0x18005e0ae
mov qword [rax + 8], rsi
mov esi, dword [rsp + 0x88]
mov qword [rax + 0x18], r12
lea r12, [0x180000000]
mov qword [rax - 0x28], r15
xor r15d, r15d
nop
cmp ebx, 0xf3
ja 0x18005dfbd
je 0x18005df45
lea eax, [rbx - 0x27]
cmp eax, 0xa3
ja case.0x18005dfe2.249
movzx eax, byte [r12 + rax + 0x5e12c]
mov ecx, dword [r12 + rax*4 + 0x5e110]
add rcx, r12
jmp rcx
mov rcx, qword [0x180143cb0]
lea rdx, str.joyGetPos
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180143cb0]
lea rdx, str.waveInReset
mov qword [0x180143cc0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180143cc8], rax
jmp case.0x18005dfe2.249
mov r8, r14
lea rcx, [rsp + 0x40]
mov rdx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x40]
test eax, eax
cmovne rcx, r15
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x98], rcx
jmp case.0x18005dfe2.249
mov rcx, qword [0x180143cb0]
lea rdx, str.ANTIALIAS_FAST
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180143cb8], rax
jmp case.0x18005dfe2.249
lea rcx, str.winmm.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x180143cb0], rax
jmp case.0x18005dfe2.249
cmp qword [0x180143cb0], r15
jne case.0x18005dfe2.249
mov eax, 0xc
nop word [rax + rax]
cmp eax, 0xc
je 0x18005df22
cmp eax, 0x120
je case.0x18005dfe2.244
jmp 0x18005df2a
mov byte [rsp + 0x98], r15b
add eax, 0x114
cmp eax, 0x228
jbe 0x18005df10
jmp case.0x18005dfe2.249
mov esi, 0x1388
jmp case.0x18005dfe2.249
mov rcx, qword [0x180143cb0]
lea rdx, str._Z3anyDv4_l
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x180143cb8], r15
mov qword [0x180143cd0], rax
je 0x18005df84
cmp qword [0x180143cc0], r15
je 0x18005df84
cmp qword [0x180143cc8], r15
je 0x18005df84
test rax, rax
jne case.0x18005dfe2.249
mov eax, reloc.SHLWAPI.dll_StrCmpNICA
nop dword [rax]
cmp eax, 0x99
je 0x18005dfa4
cmp eax, 0x7524
je case.0x18005dfe2.244
jmp 0x18005dfac
mov byte [rsp + 0x98], r15b
add eax, 0x748b
cmp eax, 0xe916
jbe 0x18005df90
jmp case.0x18005dfe2.249
lea eax, [rbx - 0xf4]
cmp eax, 0xcb
ja case.0x18005dfe2.249
movzx eax, byte [r12 + rax + 0x5e1e8]
mov ecx, dword [r12 + rax*4 + 0x5e1d0]
add rcx, r12
jmp rcx
lea rcx, str._7_72777D7
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x180143cd8], rax
test rax, rax
je case.0x18005dfe2.249
lea rdx, str.Phase2RenderTarget
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180143ce0], rax
jmp case.0x18005dfe2.249
lea rcx, str.9245550890
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x180143ce8], rax
test rax, rax
je case.0x18005dfe2.249
lea rdx, str.BUFFER_ATOMIC_SUB_IDXEN
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180143cf0], rax
jmp case.0x18005dfe2.249
mov byte [rsp + 0x98], 1
jmp case.0x18005dfe2.249
mov ebx, 0xc2
mov eax, ebx
sub eax, 0xc2
je 0x18005e0c0
cmp eax, 0xc
jne 0x18005e0f9
mov rcx, qword [rdi]
mov edx, esi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x18005e0f9
mov ebx, 0xfd
add ebx, 0x33
cmp ebx, ebp
jb 0x18005de20
mov r12, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x80]
mov r15, qword [rsp + 0x50]
mov rax, qword [rsp + 0x98]
add rsp, 0x58
pop r14
pop rdi
pop rbp
pop rbx
ret
mov r8, qword [0x180143ba8]
xor edx, edx
mov ecx, 0xdf
call fcn.180027ee0
mov rax, qword [0x180143ba8]
xor edx, edx
mov qword [rsp + 0x30], rax
xor r9d, r9d
mov qword [rsp + 0x28], r15
xor r8d, r8d
mov qword [rsp + 0x20], r15
lea ecx, [rdx + 0x1b]
call fcn.1800be6b0
add ebx, 0xc
cmp ebx, 0xda
jb 0x18005e065
jmp case.0x18005dfe2.245