Function at 0x40d0e0
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rdi
push r14
push r15
sub rsp, 0xd0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov edi, edx
mov rbx, rcx
call fcn.0040cc30
mov r9, rax
mov r8, rbx
mov edx, edi
lea rcx, str._INIT_LIB____0x_X_at__s_n__s_n
call fcn.0040d600
test rbx, rbx
je 0x40d5da
cmp byte [rbx], 0
je 0x40d5da
call fcn.0040cae0
mov ecx, 0x1fd8
call fcn.00415abc
mov qword [rsp + 0xf0], rax
xor r15d, r15d
test rax, rax
je 0x40d15d
mov rcx, rax
call fcn.0040bce0
jmp 0x40d160
mov rax, r15
mov qword [0x00422668], rax
mov edx, edi
mov rcx, rbx
call fcn.0040df00
mov rcx, rbx
call fcn.0040dca0
mov ebx, eax
lea rcx, str.R3DSDKPATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x40d19a
cmp byte [rax], 0
je 0x40d19a
mov rcx, rax
call fcn.0040dca0
xor edx, edx
lea r8d, [rdx + 0x50]
lea rcx, [rsp + 0x80]
call sub.VCRUNTIME140.dll_memset
mov edx, r15d
mov rcx, qword [0x00422668]
mov rax, qword [rcx + 0x1a80]
sub rax, qword [rcx + 0x1a78]
sar rax, 6
test eax, eax
jle 0x40d20d
lea r8, [rsp + 0x80]
nop word [rax + rax]
movsxd rax, edx
shl rax, 6
add rax, qword [rcx + 0x1a78]
mov qword [r8], rax
inc edx
lea r8, [r8 + 8]
mov rax, qword [rcx + 0x1a80]
sub rax, qword [rcx + 0x1a78]
sar rax, 6
cmp edx, eax
jl 0x40d1e0
mov rax, qword [rcx + 0x1a80]
sub rax, qword [rcx + 0x1a78]
sar rax, 6
cmp eax, 1
jle 0x40d254
mov rax, qword [rcx + 0x1a80]
sub rax, qword [rcx + 0x1a78]
sar rax, 6
movsxd rdx, eax
lea r9, [0x0040e0f0]
mov r8d, 8
lea rcx, [rsp + 0x80]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
lea rcx, str._______________________n
call fcn.0040d600
mov esi, r15d
mov rax, qword [0x00422668]
mov rcx, qword [rax + 0x1a80]
sub rcx, qword [rax + 0x1a78]
sar rcx, 6
test ecx, ecx
jle 0x40d302
lea rdi, [rsp + 0x80]
nop dword [rax]
mov rax, qword [rdi]
mov r9d, dword [rax + 4]
mov r8d, dword [rax]
mov edx, esi
lea rcx, str._d:_idx___u__status___d__version_
call fcn.0040d600
mov rax, qword [rdi]
mov r9d, dword [rax + 0x10]
mov r8d, dword [rax + 0xc]
mov edx, dword [rax + 8]
lea rcx, str._u._u._u
call fcn.0040d600
mov rdx, qword [rdi]
add rdx, 0x20
cmp qword [rdx + 0x18], 0x10
jb 0x40d2d3
mov rdx, qword [rdx]
lea rcx, str.:__s_n
call fcn.0040d600
inc esi
add rdi, 8
mov rax, qword [0x00422668]
mov rdx, qword [rax + 0x1a80]
sub rdx, qword [rax + 0x1a78]
sar rdx, 6
cmp esi, edx
jl 0x40d290
lea rcx, str._______________________n
call fcn.0040d600
mov r14d, r15d
mov rcx, qword [0x00422668]
mov rax, qword [rcx + 0x1a80]
sub rax, qword [rcx + 0x1a78]
sar rax, 6
test eax, eax
jle 0x40d5b6
lea rsi, [rsp + 0x80]
nop word [rax + rax]
mov rax, qword [rsi]
mov edx, dword [rax + 4]
test edx, edx
jne 0x40d527
lea rbp, [rcx + 0x30]
mov ebx, dword [rbp + 0x1a40]
sub ebx, 1
js 0x40d384
movsxd rax, ebx
imul rdi, rax, 0x148
add rdi, rbp
nop word [rax + rax]
mov rcx, rdi
call fcn.00412b60
sub rdi, 0x148
sub ebx, 1
jns 0x40d370
mov dword [rbp + 0x1a40], r15d
lea rcx, [rbp + 0x19a0]
xor edx, edx
mov r8d, 0xa0
call sub.VCRUNTIME140.dll_memset
mov rdx, qword [rsi]
add rdx, 0x20
lea r8, str.REDR3D_x64.dll
lea rcx, [rsp + 0x58]
call fcn.0040b050
nop
mov rcx, qword [0x00422668]
add rcx, 0x30
xor r9d, r9d
mov r8d, 0x52334410
mov rdx, rax
call fcn.0040d800
mov rcx, qword [rsi]
mov dword [rcx + 4], eax
mov rax, qword [rsp + 0x70]
cmp rax, 0x10
jb 0x40d434
inc rax
mov rcx, qword [rsp + 0x58]
cmp rax, 0xffffffffffffffff
ja 0x40d56b
cmp rax, 0x1000
jb 0x40d42f
test cl, 0x1f
jne 0x40d564
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x40d55d
sub rcx, rax
cmp rcx, 8
jb 0x40d556
cmp rcx, 0x27
ja 0x40d54f
mov rcx, rax
call fcn.00415b00
mov rax, qword [rsi]
cmp dword [rax + 4], 0
jne 0x40d518
mov rbx, qword [0x00422668]
mov edx, 1
lea rcx, [rsp + 0x20]
call fcn.004104d0
nop
mov rax, qword [rsp + 0x20]
movsxd rdx, dword [rax + 4]
lea rax, [rsp + 0x20]
add rdx, rax
lea rcx, [rbx + 0x30]
call fcn.00411150
test eax, eax
je 0x40d484
mov edx, eax
lea rcx, str._WARN_INT.___unknown_options:__X_n
call fcn.0040d600
mov rax, qword [rsp + 0x20]
movsxd rcx, dword [rax + 4]
lea r8, [rsp + 0x20]
add r8, rcx
mov rdx, qword [rsi]
add rdx, 0x20
mov rcx, qword [0x00422668]
add rcx, 0x30
call fcn.0040d6b0
mov ebx, eax
test eax, eax
je 0x40d4c0
lea rcx, str._FAIL_LOAD___n
call fcn.0040d600
jmp 0x40d4f5
mov rcx, qword [0x00422668]
add rcx, 0x30
mov r8d, 8
lea rdx, [0x00422670]
call fcn.0040da10
mov ebx, eax
test eax, eax
jne 0x40d4f5
mov rcx, qword [0x00422668]
add rcx, 0x30
call fcn.0040cdf0
mov ebx, eax
mov rcx, qword [rsi]
mov dword [rcx + 4], ebx
mov rax, qword [rsi]
cmp dword [rax + 4], 0
je 0x40d572
lea rcx, [rsp + 0x48]
call fcn.00410840
lea rcx, [rsp + 0x48]
call fcn.004107c0
mov rax, qword [rsi]
mov ebx, dword [rax + 4]
mov rcx, qword [0x00422668]
jmp 0x40d52c
test ebx, ebx
cmove ebx, edx
inc r14d
add rsi, 8
mov rax, qword [rcx + 0x1a80]
sub rax, qword [rcx + 0x1a78]
sar rax, 6
cmp r14d, eax
jge 0x40d5b6
jmp 0x40d340
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rax, qword [0x00422668]
mov dword [rax], r14d
lea rcx, [rsp + 0x80]
call fcn.0040ca10
call fcn.0040cc30
mov rdx, rax
lea rcx, str.__s_n_OK_INIT_____n
call fcn.0040d600
nop
lea rcx, [rsp + 0x48]
call fcn.00410840
lea rcx, [rsp + 0x48]
call fcn.004107c0
xor eax, eax
jmp 0x40d5df
lea rcx, [rsp + 0x80]
call fcn.0040ca10
call fcn.0040cae0
mov edx, ebx
lea rcx, str._FAIL_INIT___error__d_n
call fcn.0040d600
mov eax, ebx
jmp 0x40d5df
mov eax, 0xf
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret