Function at 0x412870
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov r13, qword [rsp + 0x120]
mov r15d, ecx
mov rdi, rdx
mov esi, r8d
mov rbx, r9
and r15d, 0x6000
call sym._errno
mov eax, dword [rax]
lea rcx, str.PRINTF_EXPONENT_DIGITS
xor edx, edx
mov qword [rsp + 0x80], rdi
mov dword [rsp + 0x88], r15d
mov dword [rsp + 0x8c], 0xffffffff
mov dword [rsp + 0x90], 0xffffffff
mov dword [rsp + 0x34], eax
xor eax, eax
mov dword [rsp + 0x94], 0xfffffffd
mov word [rsp + 0x98], ax
mov dword [rsp + 0x9c], 0
mov word [rsp + 0xa0], dx
mov dword [rsp + 0xa4], 0
mov dword [rsp + 0xa8], esi
call sym.getenv
test rax, rax
je 0x41292c
movsx edx, byte [rax]
mov eax, 2
sub edx, 0x30
cmp edx, 2
jbe 0x412939
call dbg._get_output_format
and eax, 1
neg eax
add eax, 3
lea rdi, [rsp + 0x70]
mov dword [rsp + 0xac], eax
movzx eax, byte [rbx]
lea rsi, [rsp + 0x6e]
lea r12, [rsp + 0x80]
lea rbp, [0x0048b7b4]
mov qword [rsp + 0x28], rdi
lea rdi, [rsp + 0x50]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x20], rdi
mov edi, r15d
or edi, 0x200
mov dword [rsp + 0x48], edi
nop dword [rax]
movsx ecx, al
lea rsi, [rbx + 1]
test ecx, ecx
je 0x412a0a
cmp ecx, 0x25
jne 0x4129f0
movzx eax, byte [rbx + 1]
xor r10d, r10d
xor r14d, r14d
mov dword [rsp + 0x88], r15d
mov dword [rsp + 0x90], 0xffffffff
mov rdi, rsi
mov dword [rsp + 0x8c], 0xffffffff
lea r11, [r12 + 0xc]
test al, al
je 0x412b5b
lea edx, [rax - 0x20]
lea rbx, [rdi + 1]
movsx ecx, al
cmp dl, 0x5a
ja case.0x4129e6.1
movzx edx, dl
movsxd rdx, dword [rbp + rdx*4]
add rdx, rbp
jmp rdx
mov rdx, r12
call dbg.__pformat_putc
movzx eax, byte [rbx + 1]
mov rbx, rsi
lea rsi, [rbx + 1]
movsx ecx, al
test ecx, ecx
jne 0x41298b
mov eax, dword [rsp + 0xa4]
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
sub r10d, 2
mov rax, r13
cmp r10d, 1
jbe case.0x4129e6.51
mov rsi, qword [rax]
add r13, 8
test rsi, rsi
je 0x412af5
mov rcx, rsi
call sym.strlen
mov edx, eax
mov r8, r12
mov rcx, rsi
call dbg.__pformat_putchars
nop dword [rax + rax]
movzx eax, byte [rbx]
jmp 0x412980
test r14d, r14d
jne 0x412a83
cmp dword [rsp + 0x88], r15d
je 0x4131bb
mov rdx, qword [r13]
lea rsi, [r13 + 8]
mov r8, r12
mov ecx, 0x78
mov r13, rsi
mov qword [rsp + 0x70], rdx
call dbg.__pformat_xint
jmp 0x412a60
cmp r10d, 4
mov rax, qword [r13]
je 0x4130ea
cmp r10d, 1
je 0x413184
cmp r10d, 2
je 0x412aca
cmp r10d, 3
je 0x41322c
mov edx, dword [rsp + 0xa4]
add r13, 8
mov dword [rax], edx
jmp 0x412a60
mov ecx, dword [rsp + 0x34]
call sym.strerror
test rax, rax
mov rsi, rax
jne 0x412a46
mov edx, 6
lea rsi, str._null_
jmp 0x412a50
movzx eax, byte [rdi + 1]
mov r10d, 2
mov r14d, 4
cmp al, 0x6c
jne 0x412b50
lea rbx, [rdi + 2]
movzx eax, byte [rdi + 2]
mov r10d, 3
mov r14d, 4
jmp 0x412b50
movzx eax, byte [rdi + 1]
mov r10d, 3
mov r14d, 4
test al, al
mov rdi, rbx
jne 0x4129c8
mov rbx, rdi
jmp 0x412980
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
or eax, 0x20
test al, 4
mov dword [rsp + 0x88], eax
je 0x412dcb
mov rax, qword [rdx]
mov rcx, qword [rsp + 0x20]
mov rdx, r12
fld xword [rax]
fstp xword [rsp + 0x50]
call dbg.__pformat_gfloat
jmp 0x412a60
movzx eax, byte [rdi + 1]
mov r10d, 1
mov r14d, 4
cmp al, 0x68
jne 0x412b50
lea rbx, [rdi + 2]
movzx eax, byte [rdi + 2]
mov r10d, 4
mov r14d, 4
jmp 0x412b50
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
or eax, 0x20
test al, 4
mov dword [rsp + 0x88], eax
je 0x412df9
mov rax, qword [rdx]
mov rcx, qword [rsp + 0x20]
mov rdx, r12
fld xword [rax]
fstp xword [rsp + 0x50]
call dbg.__pformat_float
jmp 0x412a60
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
or eax, 0x20
test al, 4
mov dword [rsp + 0x88], eax
je 0x412e27
mov rax, qword [rdx]
mov rcx, qword [rsp + 0x20]
mov rdx, r12
fld xword [rax]
fstp xword [rsp + 0x50]
call dbg.__pformat_efloat
jmp 0x412a60
cmp r10d, 3
je 0x4130d8
cmp r10d, 2
je 0x413197
mov esi, dword [r13]
cmp r10d, 1
lea rax, [r13 + 8]
mov qword [rsp + 0x70], rsi
je 0x4131eb
cmp r10d, 4
mov r13, rax
je 0x413240
cmp ecx, 0x75
je 0x412d63
mov rdx, qword [rsp + 0x70]
mov r8, r12
call dbg.__pformat_xint
jmp 0x412a60
sub r10d, 2
mov rax, r13
mov dword [rsp + 0x90], 0xffffffff
cmp r10d, 1
jbe 0x412e4b
mov eax, dword [rax]
mov rcx, qword [rsp + 0x28]
mov r8, r12
mov edx, 1
add r13, 8
mov byte [rsp + 0x70], al
call dbg.__pformat_putchars
jmp 0x412a60
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
or eax, 0x20
test al, 4
mov dword [rsp + 0x88], eax
je 0x412e88
mov rax, qword [rdx]
mov rcx, qword [rsp + 0x20]
mov rdx, r12
fld xword [rax]
fstp xword [rsp + 0x50]
call dbg.__pformat_xldouble
jmp 0x412a60
or dword [rsp + 0x88], 0x80
cmp r10d, 3
je 0x41311c
cmp r10d, 2
je 0x4131a9
movsxd rax, dword [r13]
cmp r10d, 1
lea rdx, [r13 + 8]
mov qword [rsp + 0x70], rax
je 0x4131fd
cmp r10d, 4
mov r13, rdx
je 0x41324f
mov rcx, qword [rsp + 0x70]
mov rdx, r12
call dbg.__pformat_int
jmp 0x412a60
or dword [rsp + 0x88], 4
movzx eax, byte [rdi + 1]
mov r14d, 4
jmp 0x412b50
movzx eax, byte [rdi + 1]
cmp al, 0x36
je 0x4130fc
cmp al, 0x33
je 0x41315c
mov r10d, 3
mov r14d, 4
jmp 0x412b50
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
test al, 4
jne 0x412b83
mov rcx, qword [rsp + 0x20]
fld qword [rdx]
mov rdx, r12
fstp xword [rsp + 0x50]
call dbg.__pformat_gfloat
jmp 0x412a60
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
test al, 4
jne 0x412bf0
mov rcx, qword [rsp + 0x20]
fld qword [rdx]
mov rdx, r12
fstp xword [rsp + 0x50]
call dbg.__pformat_float
jmp 0x412a60
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
test al, 4
jne 0x412c30
mov rcx, qword [rsp + 0x20]
fld qword [rdx]
mov rdx, r12
fstp xword [rsp + 0x50]
call dbg.__pformat_efloat
jmp 0x412a60
mov dword [rsp + 0x90], 0xffffffff
mov eax, dword [r13]
mov rcx, qword [rsp + 0x28]
lea rsi, [r13 + 8]
mov r8, r12
mov edx, 1
mov r13, rsi
mov word [rsp + 0x70], ax
call dbg.__pformat_wputchars
jmp 0x412a60
mov eax, dword [rsp + 0x88]
mov rdx, r13
add r13, 8
test al, 4
jne 0x412d00
mov rcx, qword [rsp + 0x20]
fld qword [rdx]
mov rdx, r12
fstp xword [rsp + 0x50]
call dbg.__pformat_xldouble
jmp 0x412a60
test r14d, r14d
jne 0x413040
or dword [rsp + 0x88], 0x200
movzx eax, byte [rdi + 1]
jmp 0x412b50
cmp r14d, 1
jbe 0x41312e
movzx eax, byte [rdi + 1]
mov r14d, 4
jmp 0x412b50
test r14d, r14d
jne 0x412f69
or dword [rsp + 0x88], 0x400
movzx eax, byte [rdi + 1]
jmp 0x412b50
test r14d, r14d
jne 0x412f69
or dword [rsp + 0x88], 0x100
movzx eax, byte [rdi + 1]
jmp 0x412b50
test r14d, r14d
jne 0x412f69
or dword [rsp + 0x88], 0x800
movzx eax, byte [rdi + 1]
jmp 0x412b50
test r14d, r14d
jne 0x412f69
or dword [rsp + 0x88], 0x40
movzx eax, byte [rdi + 1]
jmp 0x412b50
test r14d, r14d
je 0x413072
movzx eax, byte [rdi + 1]
jmp 0x412b50
mov rdx, r12
call dbg.__pformat_putc
jmp 0x412a60
test r11, r11
je 0x412eca
test r14d, 0xfffffffd
jne 0x413060
mov eax, dword [r13]
lea rdx, [r13 + 8]
test eax, eax
mov dword [r11], eax
js 0x413210
movzx eax, byte [rdi + 1]
mov r13, rdx
xor r11d, r11d
jmp 0x412b50
sub eax, 0x30
cmp al, 9
ja 0x4131d6
cmp r14d, 3
ja 0x4131d6
test r14d, r14d
jne 0x41304a
mov r14d, 1
test r11, r11
je 0x412f69
mov eax, dword [r11]
test eax, eax
js 0x41314d
lea eax, [rax + rax*4]
lea eax, [rcx + rax*2 - 0x30]
mov dword [r11], eax
movzx eax, byte [rdi + 1]
jmp 0x412b50
mov rsi, qword [r13]
lea rax, [0x0048b788]
lea rdi, [r13 + 8]
mov r13, rdi
test rsi, rsi
cmove rsi, rax
mov rcx, rsi
call sym.wcslen
mov r8, r12
mov edx, eax
mov rcx, rsi
call dbg.__pformat_wputchars
jmp 0x412a60
cmp r14d, 3
ja 0x4131d6
cmp r14d, 2
mov eax, 3
cmove r14d, eax
jmp 0x412fe0
movzx eax, byte [rdi + 1]
xor r11d, r11d
mov r14d, 4
jmp 0x412b50
mov dword [rsp + 0x4c], r10d
mov qword [rsp + 0x40], r11
or dword [rsp + 0x88], 0x1000
mov dword [rsp + 0x70], 0
call sym.localeconv
mov r9, qword [rsp + 0x28]
mov rdx, qword [rax + 8]
mov r8d, 0x10
mov rcx, qword [rsp + 0x38]
call dbg.mbrtowc
test eax, eax
mov r11, qword [rsp + 0x40]
mov r10d, dword [rsp + 0x4c]
jle 0x4130c8
movzx edx, word [rsp + 0x6e]
mov word [rsp + 0xa0], dx
mov dword [rsp + 0x9c], eax
movzx eax, byte [rdi + 1]
jmp 0x412b50
mov rax, qword [r13]
add r13, 8
mov qword [rsp + 0x70], rax
jmp 0x412c88
mov edx, dword [rsp + 0xa4]
add r13, 8
mov byte [rax], dl
jmp 0x412a60
cmp byte [rdi + 2], 0x34
je 0x41325f
mov eax, 0x36
mov r10d, 3
mov r14d, 4
jmp 0x412b50
mov rax, qword [r13]
add r13, 8
mov qword [rsp + 0x70], rax
jmp 0x412d63
mov dword [rsp + 0x90], 0
movzx eax, byte [rdi + 1]
lea r11, [r12 + 0x10]
mov r14d, 2
jmp 0x412b50
sub ecx, 0x30
movzx eax, byte [rdi + 1]
mov dword [r11], ecx
jmp 0x412b50
cmp byte [rdi + 2], 0x32
mov eax, 0x33
jne 0x412da4
lea rbx, [rdi + 3]
movzx eax, byte [rdi + 3]
mov r10d, 2
mov r14d, 4
jmp 0x412b50
mov edx, dword [rsp + 0xa4]
add r13, 8
mov word [rax], dx
jmp 0x412a60
mov eax, dword [r13]
add r13, 8
mov qword [rsp + 0x70], rax
jmp 0x412c88
movsxd rax, dword [r13]
add r13, 8
mov qword [rsp + 0x70], rax
jmp 0x412d63
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x90], 0x10
mov dword [rsp + 0x88], eax
jmp 0x412a83
mov rdx, r12
mov ecx, 0x25
mov rbx, rsi
call dbg.__pformat_putc
jmp 0x412a60
movzx edx, word [rsp + 0x70]
mov r13, rax
mov qword [rsp + 0x70], rdx
jmp 0x412c88
movsx rax, word [rsp + 0x70]
mov r13, rdx
mov qword [rsp + 0x70], rax
jmp 0x412d63
test r14d, r14d
jne 0x413278
or dword [rsp + 0x88], 0x400
neg dword [rsp + 0x8c]
jmp 0x412fa9
movsxd rdx, dword [rsp + 0xa4]
add r13, 8
mov qword [rax], rdx
jmp 0x412a60
movzx eax, byte [rsp + 0x70]
mov qword [rsp + 0x70], rax
jmp 0x412c88
movsx rax, byte [rsp + 0x70]
mov qword [rsp + 0x70], rax
jmp 0x412d63
lea rbx, [rdi + 3]
movzx eax, byte [rdi + 3]
mov r10d, 3
mov r14d, 4
jmp 0x412b50
mov dword [rsp + 0x90], 0xffffffff
movzx eax, byte [rdi + 1]
mov r13, rdx
xor r11d, r11d
jmp 0x412b50