Function at 0x401dd0
Capabilities:
Link many functions at runtime

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
cmp qword [0x0040f0a0], 0
mov rbx, qword [rsp + 0xd8]
mov edi, dword [rsp + 0xe8]
mov esi, dword [rsp + 0xf8]
mov r14, rcx
mov r15, rdx
mov ebp, r8d
mov r13d, r9d
jne 0x401e33
lea rcx, [0x0040a2a0]
call fcn.00405bb0
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, r12
mov qword [0x0040f0a0], rax
call fcn.00405c32
cmp qword [0x0040f098], 0
jne 0x401e6b
lea rcx, [0x0040a2bf]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f098], rax
call fcn.00405c32
cmp qword [0x0040f090], 0
jne 0x401ea3
lea rcx, [0x0040a2d5]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f090], rax
call fcn.00405c32
cmp qword [0x0040f088], 0
jne 0x401edb
lea rcx, [0x0040a2f0]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f088], rax
call fcn.00405c32
cmp qword [0x0040f080], 0
jne 0x401f13
lea rcx, [0x0040a30d]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f080], rax
call fcn.00405c32
cmp qword [0x0040f078], 0
jne 0x401f4b
lea rcx, [0x0040a326]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f078], rax
call fcn.00405c32
cmp qword [0x0040f070], 0
jne 0x401f83
lea rcx, [0x0040a33f]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f070], rax
call fcn.00405c32
cmp qword [0x0040f068], 0
jne 0x401fbb
lea rcx, [0x0040a358]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f068], rax
call fcn.00405c32
cmp qword [0x0040f060], 0
jne 0x401ff3
lea rcx, [0x0040a371]
call fcn.00405b30
mov rcx, qword [0x0040f0a0]
mov r12, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, r12
mov qword [0x0040f060], rax
call fcn.00405c32
mov rcx, r14
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor edx, edx
xor r8d, r8d
call qword [0x0040f098]
mov r14, rax
test rax, rax
je 0x4022d2
lea r8, [rsp + 0x50]
mov r9d, 4
mov edx, 2
mov rcx, rax
mov qword [rsp + 0x48], r8
mov dword [rsp + 0x50], 0xea60
call qword [0x0040f090]
mov r8, qword [rsp + 0x48]
mov edx, 5
mov rcx, r14
mov r9d, 4
call qword [0x0040f090]
mov r8, qword [rsp + 0x48]
mov edx, 6
mov rcx, r14
mov r9d, 4
call qword [0x0040f090]
mov rdx, r15
xor r9d, r9d
movzx r8d, bp
mov qword [rsp + 0x38], 0
mov rcx, r14
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], 0
call qword [0x0040f080]
mov r15, rax
test rax, rax
je 0x4022c6
cmp esi, 1
sbb ebp, ebp
and ebp, 0xff800000
sub ebp, 0x7f380000
cmp r13d, 2
je 0x4020e7
lea rcx, [0x0040a38d]
xor edi, edi
call fcn.00405bb0
mov qword [rsp + 0xe0], 0
mov r13, rax
jmp 0x4020f6
lea rcx, [0x0040a39c]
call fcn.00405bb0
mov r13, rax
xor r9d, r9d
mov rcx, r15
mov dword [rsp + 0x30], ebp
mov rdx, r13
mov qword [rsp + 0x38], 0
mov r8, qword [rsp + 0xd0]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [0x0040f078]
mov rcx, r13
mov r12, rax
call fcn.00405c32
test r12, r12
je 0x4022ba
test rbx, rbx
je 0x40219d
lea rcx, [0x0040a3ad]
call fcn.00405bb0
mov rcx, rax
mov rbp, rax
call sub.msvcrt.dll_wcslen
mov rcx, rbx
mov r13, rax
call sub.msvcrt.dll_wcslen
lea rcx, [r13 + rax + 1]
add rcx, rcx
call fcn.00404f00
mov r13, rax
test rax, rax
je 0x402192
mov rdx, rbp
mov rcx, rax
call sub.msvcrt.dll_wcscpy
mov rdx, rbx
mov rcx, r13
call sub.msvcrt.dll_wcscat
mov rcx, rbp
mov rbx, r13
call fcn.00405c32
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor r8d, r8d
mov dword [rsp + 0x20], edi
mov rdx, rbx
mov r9, qword [rsp + 0xe0]
mov rcx, r12
call qword [0x0040f070]
test esi, esi
je 0x402238
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f0d
je 0x4021d8
cmp eax, 0x2f19
jne 0x402238
lea r8, [rsp + 0x54]
lea r9, [rsp + 0x58]
mov edx, 0x1f
mov rcx, r12
mov qword [rsp + 0x48], r8
mov dword [rsp + 0x58], 4
call qword [0x0040f088]
mov r8, qword [rsp + 0x48]
mov edx, 0x1f
mov rcx, r12
mov r9d, 4
or dword [rsp + 0x54], 0x3180
call qword [0x0040f090]
mov dword [rsp + 0x20], edi
xor r8d, r8d
xor edx, edx
mov r9, qword [rsp + 0xe0]
mov rcx, r12
call qword [0x0040f070]
mov ecx, 0x1000
call fcn.00404f00
mov r13, rax
test rax, rax
je 0x4022ae
xor esi, esi
xor ebx, ebx
lea rdi, [rsp + 0x5c]
mov edx, esi
mov r9, rdi
mov r8d, 0x1000
mov rcx, r12
add rdx, r13
call qword [0x0040f068]
test eax, eax
jne 0x40227e
test ebx, ebx
je 0x4022a3
mov rax, qword [rsp + 0xf0]
mov dword [rax], ebx
jmp 0x4022ae
mov eax, dword [rsp + 0x5c]
test eax, eax
je 0x40226e
lea edx, [rsi + 0x2000]
mov rcx, r13
add ebx, eax
call fcn.00404f27
lea ebp, [rsi + 0x1000]
mov r13, rax
mov esi, ebp
jmp 0x402253
mov rcx, r13
xor r13d, r13d
call fcn.00404f58
mov rcx, r12
mov r12, r13
call qword [0x0040f060]
mov rcx, r15
mov r15, r12
call qword [0x0040f060]
mov rcx, r14
mov r14, r15
call qword [0x0040f060]
mov rax, r14
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret