Function at 0x405f50
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov r12, qword [rsp + 0x110]
mov r14d, ecx
mov rsi, rdx
mov edi, r8d
mov rbx, r9
and r14d, 0x3000
call sub.msvcrt.dll__errno
lea rcx, str.PRINTF_EXPONENT_DIGITS
mov r15d, dword [rax]
mov qword [rsp + 0x70], rsi
mov dword [rsp + 0x78], r14d
mov dword [rsp + 0x7c], 0xffffffff
mov dword [rsp + 0x80], 0xffffffff
mov dword [rsp + 0x84], 0xfffffffd
mov word [rsp + 0x88], 0
mov dword [rsp + 0x8c], 0
mov word [rsp + 0x90], 0
mov dword [rsp + 0x94], 0
mov dword [rsp + 0x98], edi
call sub.msvcrt.dll_getenv
test rax, rax
je 0x406000
movsx edx, byte [rax]
mov eax, 2
sub edx, 0x30
cmp edx, 2
jbe 0x40600d
call fcn.00408670
and eax, 1
neg eax
add eax, 3
mov dword [rsp + 0x9c], eax
mov eax, r14d
or ah, 2
mov dword [rsp + 0x3c], eax
nop
movsx ecx, byte [rbx]
lea rsi, [rbx + 1]
test ecx, ecx
je 0x4060e1
cmp ecx, 0x25
jne 0x406100
mov dword [rsp + 0x78], r14d
mov dword [rsp + 0x80], 0xffffffff
xor r10d, r10d
mov dword [rsp + 0x7c], 0xffffffff
movzx eax, byte [rbx + 1]
xor r13d, r13d
mov rdi, rsi
lea r11, [rsp + 0x7c]
lea rbp, [0x004151a4]
test al, al
je 0x4060cf
movsx ecx, al
sub eax, 0x20
lea rbx, [rdi + 1]
cmp al, 0x5a
jbe 0x406112
cmp ecx, 0x39
jg 0x406822
cmp r13d, 3
ja 0x406822
cmp ecx, 0x2f
jle 0x406822
test r13d, r13d
jne 0x4066f0
mov r13d, 1
test r11, r11
je 0x4060c4
mov eax, dword [r11]
test eax, eax
js 0x4067c4
lea eax, [rax + rax*4]
lea eax, [rcx + rax*2 - 0x30]
mov dword [r11], eax
movzx eax, byte [rdi + 1]
mov rdi, rbx
test al, al
jne 0x40606d
mov rbx, rdi
movsx ecx, byte [rbx]
lea rsi, [rbx + 1]
test ecx, ecx
jne 0x40602f
mov eax, dword [rsp + 0x94]
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [rsp + 0x70]
mov rbx, rsi
call fcn.00404a30
jmp 0x406020
movzx eax, al
movsxd rax, dword [rbp + rax*4]
add rax, rbp
jmp rax
sub r10d, 2
mov rax, r12
cmp r10d, 1
jbe case.0x40611d.51
mov rsi, qword [rax]
add r12, 8
test rsi, rsi
je 0x4061e4
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov edx, eax
lea r8, [rsp + 0x70]
mov rcx, rsi
call fcn.00404b80
jmp 0x406020
test r13d, r13d
jne 0x406170
cmp dword [rsp + 0x78], r14d
je 0x40680a
mov rdx, qword [r12]
lea rsi, [r12 + 8]
lea r8, [rsp + 0x70]
mov ecx, 0x78
mov r12, rsi
mov qword [rsp + 0x60], rdx
call fcn.00404fb0
jmp 0x406020
cmp r10d, 4
mov rax, qword [r12]
je 0x406790
cmp r10d, 1
je 0x4067d3
cmp r10d, 2
je 0x4061bd
cmp r10d, 3
je 0x406874
mov edx, dword [rsp + 0x94]
add r12, 8
mov dword [rax], edx
jmp 0x406020
mov ecx, r15d
call sub.msvcrt.dll_strerror
test rax, rax
mov rsi, rax
jne 0x406141
mov edx, 6
lea rsi, str._null_
jmp 0x40614b
movzx eax, byte [rdi + 1]
mov r10d, 2
mov r13d, 4
cmp al, 0x6c
jne 0x4060c8
lea rbx, [rdi + 2]
movzx eax, byte [rdi + 2]
mov r10b, 3
jmp 0x4060c8
movzx eax, byte [rdi + 1]
mov r10d, 3
mov r13d, 4
mov rdi, rbx
jmp 0x4060cb
movzx eax, byte [rdi + 1]
mov r10d, 1
mov r13d, 4
cmp al, 0x68
jne 0x4060c8
lea rbx, [rdi + 2]
movzx eax, byte [rdi + 2]
mov r10b, 4
jmp 0x4060c8
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
or eax, 0x20
test al, 4
mov dword [rsp + 0x78], eax
je 0x406681
mov rax, qword [r12]
fld xword [rax]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x40]
mov r12, rsi
fstp xword [rsp + 0x40]
call fcn.004058d0
jmp 0x406020
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
or eax, 0x20
test al, 4
mov dword [rsp + 0x78], eax
je 0x4066a1
mov rax, qword [r12]
fld xword [rax]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x40]
mov r12, rsi
fstp xword [rsp + 0x40]
call fcn.004057e0
jmp 0x406020
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
or eax, 0x20
test al, 4
mov dword [rsp + 0x78], eax
je 0x4065f1
mov rax, qword [r12]
fld xword [rax]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x40]
mov r12, rsi
fstp xword [rsp + 0x40]
call fcn.00405ea0
jmp 0x406020
sub r10d, 2
mov rax, r12
mov dword [rsp + 0x80], 0xffffffff
cmp r10d, 1
jbe 0x40660b
mov eax, dword [rax]
lea r8, [rsp + 0x70]
lea rcx, [rsp + 0x60]
mov edx, 1
add r12, 8
mov byte [rsp + 0x60], al
call fcn.00404b80
jmp 0x406020
or dword [rsp + 0x78], 0x80
cmp r10d, 3
je 0x40676c
cmp r10d, 2
je 0x4067e6
movsxd rax, dword [r12]
cmp r10d, 1
lea rdx, [r12 + 8]
mov qword [rsp + 0x60], rax
je 0x406839
cmp r10d, 4
mov r12, rdx
je 0x406888
mov rcx, qword [rsp + 0x60]
lea rdx, [rsp + 0x70]
call fcn.00404ce0
jmp 0x406020
cmp r10d, 3
je 0x40677e
cmp r10d, 2
je 0x4067f8
lea rax, [r12 + 8]
mov r12d, dword [r12]
cmp r10d, 1
mov qword [rsp + 0x60], r12
je 0x40684c
cmp r10d, 4
mov r12, rax
je 0x406898
cmp ecx, 0x75
je 0x4063b1
mov rdx, qword [rsp + 0x60]
lea r8, [rsp + 0x70]
call fcn.00404fb0
jmp 0x406020
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
or eax, 0x20
test al, 4
mov dword [rsp + 0x78], eax
je 0x406646
mov rax, qword [r12]
fld xword [rax]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x40]
mov r12, rsi
fstp xword [rsp + 0x40]
call fcn.00405a70
jmp 0x406020
or dword [rsp + 0x78], 4
mov r13d, 4
movzx eax, byte [rdi + 1]
mov rdi, rbx
jmp 0x4060cb
cmp r13d, 1
jbe 0x4067a2
movzx eax, byte [rdi + 1]
mov r13d, 4
mov rdi, rbx
jmp 0x4060cb
test r13d, r13d
jne 0x4060c4
or dword [rsp + 0x78], 0x400
movzx eax, byte [rdi + 1]
mov rdi, rbx
jmp 0x4060cb
test r13d, r13d
jne 0x4060c4
or dword [rsp + 0x78], 0x100
movzx eax, byte [rdi + 1]
mov rdi, rbx
jmp 0x4060cb
test r11, r11
je 0x40648a
test r13d, 0xfffffffd
jne 0x406740
mov eax, dword [r12]
lea rdx, [r12 + 8]
test eax, eax
mov dword [r11], eax
js 0x40685e
movzx eax, byte [rdi + 1]
mov r12, rdx
xor r11d, r11d
mov rdi, rbx
jmp 0x4060cb
test r13d, r13d
jne 0x4060c4
mov dword [rsp + 0x28], r10d
mov qword [rsp + 0x30], r11
or dword [rsp + 0x78], 0x1000
mov dword [rsp + 0x5c], 0
call sub.msvcrt.dll_localeconv
mov rdx, qword [rax + 8]
lea r9, [rsp + 0x5c]
lea rcx, [rsp + 0x5a]
mov r8d, 0x10
call fcn.004081d0
test eax, eax
mov r10d, dword [rsp + 0x28]
mov r11, qword [rsp + 0x30]
jle 0x40657c
movzx edx, word [rsp + 0x5a]
mov word [rsp + 0x90], dx
mov dword [rsp + 0x8c], eax
movzx eax, byte [rdi + 1]
jmp 0x4060c8
lea rdx, [rsp + 0x70]
call fcn.00404a30
jmp 0x406020
test r13d, r13d
jne 0x4060c4
or dword [rsp + 0x78], 0x800
movzx eax, byte [rdi + 1]
mov rdi, rbx
jmp 0x4060cb
test r13d, r13d
jne 0x4060c4
or dword [rsp + 0x78], 0x40
movzx eax, byte [rdi + 1]
mov rdi, rbx
jmp 0x4060cb
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
test al, 4
jne 0x406308
fld qword [r12]
jmp 0x40630e
mov dword [rsp + 0x80], 0xffffffff
mov eax, dword [r12]
lea rsi, [r12 + 8]
lea r8, [rsp + 0x70]
lea rcx, [rsp + 0x5a]
mov edx, 1
mov r12, rsi
mov word [rsp + 0x5a], ax
call fcn.00404a90
jmp 0x406020
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
test al, 4
jne 0x406438
fld qword [r12]
jmp 0x40643e
test r13d, r13d
jne case.0x40611d.1
or dword [rsp + 0x78], 0x200
movzx eax, byte [rdi + 1]
mov rdi, rbx
jmp 0x4060cb
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
test al, 4
jne 0x406288
fld qword [r12]
jmp 0x40628e
mov eax, dword [rsp + 0x78]
lea rsi, [r12 + 8]
test al, 4
jne 0x4062c8
fld qword [r12]
jmp 0x4062ce
movzx eax, byte [rdi + 1]
mov r10d, 3
mov r13d, 4
cmp al, 0x36
je 0x406755
cmp al, 0x33
jne 0x4060c8
cmp byte [rdi + 2], 0x32
jne 0x4060c8
lea rbx, [rdi + 3]
movzx eax, byte [rdi + 3]
mov r10b, 2
jmp 0x4060c8
cmp r13d, 2
mov eax, 3
cmove r13d, eax
jmp 0x4060aa
mov rsi, qword [r12]
lea rax, [0x00415178]
lea rdi, [r12 + 8]
mov r12, rdi
test rsi, rsi
cmove rsi, rax
mov rcx, rsi
call sub.msvcrt.dll_wcslen
lea r8, [rsp + 0x70]
mov edx, eax
mov rcx, rsi
call fcn.00404a90
jmp 0x406020
movzx eax, byte [rdi + 1]
xor r11d, r11d
mov r13d, 4
mov rdi, rbx
jmp 0x4060cb
cmp byte [rdi + 2], 0x34
jne 0x4060c8
lea rbx, [rdi + 3]
movzx eax, byte [rdi + 3]
jmp 0x4060c8
mov rax, qword [r12]
add r12, 8
mov qword [rsp + 0x60], rax
jmp 0x4063b1
mov rax, qword [r12]
add r12, 8
mov qword [rsp + 0x60], rax
jmp 0x4063fe
mov edx, dword [rsp + 0x94]
add r12, 8
mov byte [rax], dl
jmp 0x406020
mov dword [rsp + 0x80], 0
lea r11, [rsp + 0x80]
movzx eax, byte [rdi + 1]
mov r13d, 2
jmp 0x4060c8
sub ecx, 0x30
mov dword [r11], ecx
movzx eax, byte [rdi + 1]
jmp 0x4060c8
mov edx, dword [rsp + 0x94]
add r12, 8
mov word [rax], dx
jmp 0x406020
movsxd rax, dword [r12]
add r12, 8
mov qword [rsp + 0x60], rax
jmp 0x4063b1
mov eax, dword [r12]
add r12, 8
mov qword [rsp + 0x60], rax
jmp 0x4063fe
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x80], 0x10
mov dword [rsp + 0x78], eax
jmp 0x406170
lea rdx, [rsp + 0x70]
mov ecx, 0x25
mov rbx, rsi
call fcn.00404a30
jmp 0x406020
movsx rax, word [rsp + 0x60]
mov r12, rdx
mov qword [rsp + 0x60], rax
jmp 0x4063b1
movzx edx, word [rsp + 0x60]
mov r12, rax
mov qword [rsp + 0x60], rdx
jmp 0x4063fe
test r13d, r13d
jne 0x4068a7
or dword [rsp + 0x78], 0x400
neg dword [rsp + 0x7c]
jmp 0x406506
movsxd rdx, dword [rsp + 0x94]
add r12, 8
mov qword [rax], rdx
jmp 0x406020
movsx rax, byte [rsp + 0x60]
mov qword [rsp + 0x60], rax
jmp 0x4063b1
movzx eax, byte [rsp + 0x60]
mov qword [rsp + 0x60], rax
jmp 0x4063fe
mov dword [rsp + 0x80], 0xffffffff
mov r12, rdx
movzx eax, byte [rdi + 1]
xor r11d, r11d
jmp 0x4060c8