Function at 0x403cf0
Capabilities:
Create directory
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
test rcx, rcx
mov r12, rcx
mov dword [rsp + 0x54], edx
je 0x404890
mov r10, rcx
xor r13d, r13d
nop dword [rax]
mov edx, dword [r10 + 0x60]
test edx, edx
je 0x403d84
mov rax, qword [r10 + 0x68]
sub edx, 1
lea r8, [rax + 8]
lea r9, [r8 + rdx*8]
nop word [rax + rax]
mov rdx, qword [rax]
mov eax, dword [rdx + 0x18]
test eax, eax
je 0x403d76
mov rdx, qword [rdx + 0x20]
lea ecx, [rax - 1]
lea rax, [rdx + 8]
lea rcx, [rax + rcx*8]
jmp 0x403d64
add rax, 8
mov rdx, qword [rdx]
cmp r13, rdx
cmovl r13, rdx
cmp rcx, rax
mov rdx, rax
jne 0x403d60
cmp r8, r9
mov rax, r8
je 0x403d84
add r8, 8
jmp 0x403d40
mov r10, qword [r10 + 8]
test r10, r10
jne 0x403d20
lea rcx, str.GCOV_PREFIX_STRIP
call sub.msvcrt.dll_getenv
test rax, rax
je 0x4045f8
mov rcx, rax
call sub.msvcrt.dll_atoi
mov edx, 0
test eax, eax
lea rcx, str.GCOV_PREFIX
cmovns edx, eax
mov dword [rsp + 0x50], edx
call sub.msvcrt.dll_getenv
test rax, rax
mov rbx, rax
je 0x403ddd
mov rcx, rax
call sub.msvcrt.dll_strlen
test rax, rax
jne 0x404621
mov r11d, dword [rsp + 0x50]
test r11d, r11d
je 0x4045e2
lea rbx, [0x004702e0]
mov eax, 2
mov esi, 1
mov rcx, rax
call sub.msvcrt.dll_malloc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
mov qword [rsp + 0x30], rax
call sub.msvcrt.dll_memcpy
mov byte [rax + rsi], 0
test r12, r12
je 0x4040a6
mov qword [rsp + 0x58], r13
nop dword [rax]
mov eax, dword [r12 + 0x60]
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [0x0048e208], 0
test eax, eax
je 0x403ea8
mov r10, qword [r12 + 0x68]
sub eax, 1
lea r11, [r12 + 0x20]
lea rbx, [r10 + rax*8 + 8]
nop dword [rax + rax]
mov rax, qword [r10]
mov r8, r11
mov ecx, 0xfffffffd
lea r9, [rax + 0x18]
nop
cmp qword [r8], 0
je 0x403e93
cmp ecx, 1
jbe 0x4049a6
add r9, 0x10
add ecx, 1
add r8, 8
cmp ecx, 5
jne 0x403e80
add r10, 8
cmp rbx, r10
jne 0x403e70
mov r10d, dword [rsp + 0x50]
mov rbx, qword [r12 + 0x18]
test r10d, r10d
je 0x403f10
movzx eax, byte [rbx]
cmp al, 0x2f
je 0x4042a5
cmp al, 0x5c
mov rdx, rbx
je 0x4042a5
test al, al
je 0x403f10
mov ecx, dword [rsp + 0x50]
jmp 0x403ef3
cmp al, 0x2f
je 0x403ef7
add rdx, 1
movzx eax, byte [rdx]
test al, al
je 0x403f10
test ecx, ecx
je 0x403f10
cmp al, 0x5c
jne 0x403ee0
mov rbx, rdx
add rdx, 1
movzx eax, byte [rdx]
sub ecx, 1
test al, al
jne 0x403eef
nop dword [rax + rax]
cmp qword [rsp + 0x30], 0
je 0x404338
movzx eax, byte [rbx]
test al, al
je 0x4042b2
cmp byte [rbx + 1], 0x3a
jne 0x403f35
movzx eax, byte [rbx + 2]
add rbx, 2
cmp al, 0x5c
mov rdi, qword [rsp + 0x30]
setne sil
cmp al, 0x2f
setne al
and esi, eax
mov edx, dword [rdi]
add rdi, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x403f47
mov edx, eax
mov rcx, rbx
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [rdi + 2]
cmove rdi, rdx
mov edx, eax
add dl, al
sbb rdi, 3
sub rdi, qword [rsp + 0x30]
call sub.msvcrt.dll_strlen
lea rcx, [rdi + rax + 2]
call sub.msvcrt.dll_malloc
test rdi, rdi
mov r8, rax
mov byte [rax], 0
jne 0x404317
test sil, sil
je 0x404330
lea rbp, [r8 + 1]
mov byte [r8], 0x2f
mov rdx, rbx
mov rcx, rbp
mov rbx, rbp
call sub.msvcrt.dll_strcat
movzx esi, byte [rbp]
mov byte [rsp + 0x6f], 0
test sil, sil
je 0x40400d
lea rax, [rsp + 0x6f]
lea r13, [rsp + 0x80]
mov qword [rsp + 0x40], rax
mov rcx, rbx
lea rdi, [rbp + 1]
call sub.msvcrt.dll_strlen
cmp sil, 0x25
mov r14, rax
movzx eax, byte [rbp + 1]
je 0x404005
mov esi, eax
test sil, sil
mov rbp, rdi
jne 0x403fe0
jmp 0x40400d
test al, al
jne 0x4040c3
mov rcx, rbx
call fcn.00403890
test eax, eax
je 0x4041b5
call fcn.00403a80
test eax, eax
je 0x404392
cmp eax, 0x67636461
je 0x404354
lea rcx, str.libgcov_profiling_error:_s:Not_a_gcov_data_file_n
mov rdx, rbx
call fcn.004036a0
mov rax, qword [0x0048e208]
test rax, rax
je 0x40406d
mov r8d, 8
mov rdx, rax
mov rcx, r12
call fcn.00403630
test rax, rax
mov qword [0x0048e208], rax
jne 0x404050
call fcn.00403920
test eax, eax
je 0x404090
lea rcx, str.libgcov_profiling_error:_s:Overflow_writing_n
lea rax, str.libgcov_profiling_error:_s:Error_writing_n
mov rdx, rbx
cmovns rcx, rax
call fcn.004036a0
mov rcx, rbx
call fcn.004689a0
mov r12, qword [r12 + 8]
test r12, r12
jne 0x403e30
mov rcx, qword [rsp + 0x30]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.004689a0
mov rsi, rbp
sub rsi, rbx
cmp al, 0x70
je 0x40413b
cmp al, 0x71
jne 0x40400d
cmp byte [rbp + 2], 0x7b
je 0x4045a5
mov rax, rdi
sub rax, rbx
sub r14d, eax
lea ecx, [r14 + rsi + 1]
mov esi, esi
call sub.msvcrt.dll_malloc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
mov rbp, rax
call sub.msvcrt.dll_memcpy
xor r8d, r8d
add rax, rsi
lea rcx, [rax + r8]
mov rdx, rdi
mov r8, r14
lea rdi, [rbp + rsi]
call sub.msvcrt.dll_memcpy
mov rcx, rbx
mov byte [rax + r14], 0
add rdi, 1
call fcn.004689a0
mov rbx, rbp
movzx esi, byte [rdi]
jmp 0x403ffb
call sub.msvcrt.dll__getpid
lea rdx, [0x004703b5]
mov r8d, eax
mov rcx, r13
lea rdi, [rbp + 2]
call fcn.00468fd0
mov r9, r13
mov rax, rdi
mov rcx, r9
mov qword [rsp + 0x38], r9
sub rax, rbx
sub r14d, eax
call sub.msvcrt.dll_strlen
mov r15, rax
lea eax, [rsi + rax + 1]
mov esi, esi
mov r15d, r15d
lea ecx, [rax + r14]
call sub.msvcrt.dll_malloc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
mov rbp, rax
call sub.msvcrt.dll_memcpy
mov r9, qword [rsp + 0x38]
lea rcx, [rbp + rsi]
mov r8, r15
add rsi, r15
mov rdx, r9
call sub.msvcrt.dll_memcpy
mov r8, r15
jmp 0x40410b
movzx esi, byte [rbx]
test sil, sil
je 0x404231
cmp byte [rbx + 1], 0x3a
mov rax, rbx
jne 0x4041ce
movzx esi, byte [rbx + 2]
lea rax, [rbx + 2]
cmp sil, 0x2f
je 0x4041de
cmp sil, 0x5c
jne 0x40499e
movzx esi, byte [rax + 1]
lea rbp, [rax + 1]
test sil, sil
je 0x404231
mov rdi, qword [sym.imp.msvcrt.dll__errno]
jmp 0x404207
cmp sil, 0x5c
je 0x40420d
add rbp, 1
movzx esi, byte [rbp]
test sil, sil
je 0x404231
cmp sil, 0x2f
jne 0x4041f4
xor edx, edx
mov byte [rbp], 0
mov rcx, rbx
call sub.msvcrt.dll__access
cmp eax, 0xffffffff
je 0x404260
mov byte [rbp], sil
add rbp, 1
movzx esi, byte [rbp]
test sil, sil
jne 0x404207
mov rcx, rbx
call fcn.00403890
test eax, eax
jne 0x40401d
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str.profiling:_s:Cannot_open_n
lea rcx, [rax + 0x60]
mov r8, rbx
call fcn.00468fa0
jmp 0x404090
mov rcx, rbx
call sub.msvcrt.dll__mkdir
cmp eax, 0xffffffff
jne 0x404220
call rdi
cmp dword [rax], 0x11
je 0x404220
lea rcx, str.profiling:_s:Cannot_create_directory_n
mov rdx, rbx
call fcn.004036a0
mov byte [rbp], sil
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str.profiling:_s:Skip_n
lea rcx, [rax + 0x60]
mov r8, rbx
call fcn.00468fa0
jmp 0x404090
lea rdx, [rbx + 1]
movzx eax, byte [rbx + 1]
jmp 0x403ecd
mov rsi, qword [rsp + 0x30]
mov edx, dword [rsi]
add rsi, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x4042b7
mov edx, eax
mov rcx, rbx
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [rsi + 2]
mov edi, eax
cmove rsi, rdx
add dil, al
sbb rsi, 3
sub rsi, qword [rsp + 0x30]
call sub.msvcrt.dll_strlen
lea rcx, [rsi + rax + 2]
call sub.msvcrt.dll_malloc
test rsi, rsi
mov r8, rax
mov byte [rax], 0
je 0x403faa
mov esi, 1
mov rdx, qword [rsp + 0x30]
mov rcx, r8
call sub.msvcrt.dll_strcat
test sil, sil
mov r8, rax
jne 0x403faa
mov rbp, r8
jmp 0x403fb2
mov rcx, rbx
call sub.msvcrt.dll_strlen
lea rcx, [rax + 2]
call sub.msvcrt.dll_malloc
mov rbp, rax
mov byte [rax], 0
jmp 0x403fb2
lea r14, [r12 + 0x18]
call fcn.00403a80
mov r8, rbx
mov edx, eax
mov rcx, r14
call fcn.004037b0
test eax, eax
je 0x404044
call fcn.00403a80
cmp eax, dword [r12 + 0x10]
je 0x404648
lea rcx, str.libgcov_profiling_error:_s:overwriting_an_existing_profile_data_with_a_different_timestamp_n
mov rdx, rbx
call fcn.004036a0
mov rcx, qword [0x0048d1e0]
xor r8d, r8d
xor edx, edx
mov dword [0x0048d1fc], 0xffffffff
mov qword [0x0048d1e8], 0
call sub.msvcrt.dll_fseek
mov ecx, dword [rsp + 0x54]
test ecx, ecx
jne 0x4043cf
mov rax, qword [rsp + 0x58]
add dword [rsp + 0x70], 1
add qword [rsp + 0x78], rax
mov ecx, 2
movabs rdi, 0x4230332a67636461
call fcn.00403500
mov ecx, 1
mov qword [rax], rdi
mov esi, dword [r12 + 0x10]
call fcn.00403500
lea rdx, [rsp + 0x70]
mov ecx, 0xa1000000
mov dword [rax], esi
call fcn.00403a30
mov edx, dword [r12 + 0x60]
test edx, edx
je 0x404571
xor r14d, r14d
mov qword [rsp + 0x40], rbx
jmp 0x40445a
mov rdx, qword [r12 + 0x68]
mov eax, r14d
mov ecx, 2
mov rsi, qword [rdx + rax*8]
test rsi, rsi
je 0x40443f
cmp qword [rsi], r12
je 0x404586
call fcn.00403500
mov qword [rax], 0x1000000
add r14d, 1
cmp dword [r12 + 0x60], r14d
je 0x40456c
mov rsi, qword [0x0048e208]
test rsi, rsi
je 0x404420
cmp r14d, dword [rsi + 8]
jne 0x404420
mov ecx, 2
movabs rdi, 0x301000000
add rsi, 0x10
call fcn.00403500
mov dword [rsp + 0x38], 1
mov qword [rax], rdi
mov edi, dword [rsi + 8]
mov ecx, 1
lea r13, [r12 + 0x20]
call fcn.00403500
mov ecx, 1
add rsi, 0x18
mov dword [rax], edi
mov edi, dword [rsi - 0xc]
call fcn.00403500
mov ecx, 1
mov dword [rax], edi
mov edi, dword [rsi - 8]
call fcn.00403500
mov dword [rax], edi
mov edi, 0x1a10000
nop word [rax + rax]
cmp qword [r13], 0
je 0x404523
mov ebx, dword [rsi]
mov ecx, 2
call fcn.00403500
mov r15, qword [rsi + 8]
mov dword [rax], edi
lea edx, [rbx + rbx]
test ebx, ebx
mov dword [rax + 4], edx
lea eax, [rbx - 1]
je 0x40451f
lea rbp, [r15 + rax*8 + 8]
nop dword [rax + rax]
mov rbx, qword [r15]
mov ecx, 2
add r15, 8
call fcn.00403500
mov dword [rax], ebx
sar rbx, 0x20
cmp rbp, r15
mov dword [rax + 4], ebx
jne 0x404500
add rsi, 0x10
add edi, 0x20000
add r13, 8
cmp edi, 0x1b10000
jne 0x4044d0
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x40444b
mov rdx, qword [0x0048e208]
mov r8d, 8
mov rcx, r12
add r14d, 1
call fcn.00403630
cmp dword [r12 + 0x60], r14d
mov qword [0x0048e208], rax
jne 0x40445a
mov rbx, qword [rsp + 0x40]
mov ecx, 1
call fcn.00403500
mov dword [rax], 0
jmp 0x404044
movabs rdi, 0x301000000
call fcn.00403500
mov dword [rsp + 0x38], 0
mov qword [rax], rdi
jmp 0x40448f
add rbp, 3
mov edx, 0x7d
mov rcx, rbp
call sub.msvcrt.dll_strchr
test rax, rax
mov rdi, rax
je 0x40400d
mov byte [rax], 0
mov rcx, rbp
call sub.msvcrt.dll_getenv
test rax, rax
mov r9, rax
cmove r9, qword [rsp + 0x40]
add rdi, 1
jmp 0x404159
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x30], 0
jmp 0x403e1b
lea rcx, str.GCOV_PREFIX
call sub.msvcrt.dll_getenv
test rax, rax
mov rbx, rax
je 0x4045e2
mov rcx, rax
call sub.msvcrt.dll_strlen
test rax, rax
je 0x4045e2
mov dword [rsp + 0x50], 0
movzx edx, byte [rbx + rax - 1]
lea rsi, [rax - 1]
cmp dl, 0x5c
je 0x404880
cmp dl, 0x2f
je 0x404880
mov rsi, rax
add rax, 1
jmp 0x403dfc
call fcn.00403a80
cmp eax, 0xa1000000
jne 0x404990
call fcn.00403a80
test eax, eax
je 0x404978
call fcn.00403a80
mov dword [rsp + 0x70], eax
call fcn.00403a80
mov eax, eax
mov qword [rsp + 0x78], rax
call fcn.00403a80
mov r9d, dword [r12 + 0x60]
test r9d, r9d
je 0x404971
mov rdx, qword [r12 + 0x68]
cmp eax, 0x1000000
mov r13, qword [rdx]
jne 0x404963
lea rax, [0x0048e208]
mov qword [rsp + 0x40], 8
xor r15d, r15d
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x48], rax
call fcn.00403a80
test eax, eax
je 0x4047c0
cmp eax, 3
jne 0x4047f6
test r13, r13
je 0x4046e2
cmp qword [r13], r12
je 0x404898
lea rax, [r12 + 0x58]
xor edx, edx
nop dword [rax]
cmp qword [rax], 1
sbb edx, 0xffffffff
sub rax, 8
cmp r14, rax
jne 0x4046f0
shl edx, 4
xor esi, esi
xor ebp, ebp
lea ecx, [rdx + 0x38]
call sub.msvcrt.dll_malloc
mov r13, rax
mov qword [rax], 0
mov dword [rax + 8], r15d
call fcn.00403a80
mov dword [r13 + 0x18], eax
call fcn.00403a80
mov dword [r13 + 0x1c], eax
call fcn.00403a80
mov dword [r13 + 0x20], eax
nop dword [rax + rax]
cmp qword [r12 + rsi*8 + 0x20], 0
je 0x4047a9
call fcn.00403a80
mov edx, esi
shl edx, 0x11
add edx, 0x1a10000
cmp eax, edx
jne 0x40481c
call fcn.00403a80
shr eax, 1
lea ecx, [rax*8]
mov ebx, eax
call sub.msvcrt.dll_malloc
mov edx, ebp
shl rdx, 4
add rdx, r13
test ebx, ebx
mov dword [rdx + 0x28], ebx
mov qword [rdx + 0x30], rax
lea edx, [rbx - 1]
je 0x4047a6
lea rdi, [rax + rdx*8 + 8]
mov rbx, rax
call fcn.00403ab0
add rbx, 8
mov qword [rbx - 8], rax
cmp rdi, rbx
jne 0x404794
add ebp, 1
add rsi, 1
cmp rsi, 8
jne 0x404740
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x48], r13
mov qword [rax], r13
add r15d, 1
call fcn.00403a80
cmp dword [r12 + 0x60], r15d
je 0x404867
mov rdi, qword [rsp + 0x40]
mov rdx, qword [r12 + 0x68]
mov r13, qword [rdx + rdi]
add rdi, 8
cmp eax, 0x1000000
mov qword [rsp + 0x40], rdi
je 0x4046bd
mov rbx, qword [rsp + 0x38]
mov edi, r15d
lea r8, str.function
lea rcx, str.libgcov_profiling_error:_s:Merge_mismatch_for__s__u_n
mov r9d, edi
mov rdx, rbx
call fcn.004036a0
jmp 0x404044
mov rdx, qword [rsp + 0x38]
lea r9, str.counter_mismatch
lea rcx, str.libgcov_profiling_error:_s:Function__u__s__u__n
mov r8d, r15d
mov dword [rsp + 0x20], esi
call fcn.004036a0
mov r8d, esi
mov rdx, r13
mov rcx, r12
call fcn.00403630
test rax, rax
mov qword [rsp + 0x48], rax
je 0x4047f6
add r15d, 1
call fcn.00403a80
cmp dword [r12 + 0x60], r15d
jne 0x4047d4
mov rbx, qword [rsp + 0x38]
mov edi, r15d
test eax, eax
je 0x404392
jmp 0x4047fe
test rsi, rsi
jne 0x403dfc
jmp 0x403ddd
xor r13d, r13d
jmp 0x403d8d
call fcn.00403a80
cmp eax, dword [r13 + 8]
jne 0x4047f6
call fcn.00403a80
cmp eax, dword [r13 + 0xc]
jne 0x4047f6
call fcn.00403a80
cmp eax, dword [r13 + 0x10]
jne 0x4047f6
lea rsi, [r12 + 0x20]
add r13, 0x18
mov ebp, 0x1a10000
mov rbx, qword [rsi]
test rbx, rbx
je 0x404908
call fcn.00403a80
mov edi, eax
call fcn.00403a80
cmp edi, ebp
jne 0x4047f6
mov edx, dword [r13]
lea ecx, [rdx + rdx]
cmp eax, ecx
jne 0x4047f6
mov rcx, qword [r13 + 8]
add r13, 0x10
call rbx
add ebp, 0x20000
add rsi, 8
cmp ebp, 0x1b10000
jne 0x4048d3
cmp qword [0x0048d1e0], 0
je 0x404a0e
mov r8d, dword [0x0048d1f8]
test r8d, r8d
je 0x4047c0
lea r8, str.Error
lea rax, str.Overflow
mov rbx, qword [rsp + 0x38]
cmovs r8, rax
lea rcx, str.libgcov_profiling_error:_s:_s_merging_n
mov rdx, rbx
call fcn.004036a0
jmp 0x404044
xor edi, edi
lea r8, str.function
jmp 0x404805
xor edi, edi
jmp 0x40486f
lea r8, str.merge_one_data
lea rcx, str._workdir_repo_gcc_gnu_gcc_.._libgcc_libgcov_driver.c
mov edx, 0x125
call fcn.0046d0e0
xor edi, edi
lea r8, str.summary
jmp 0x404805
mov rbp, rax
jmp 0x4041e6
mov eax, dword [r9]
xor edx, edx
mov edi, 9
div edi
test edx, edx
jne 0x4049f6
xor edi, edi
cmp eax, edi
jbe 0x403e8f
imul rsi, rdi, 0x48
xor edx, edx
add rsi, qword [r9 + 8]
mov rbp, qword [rsi]
cmp rbp, qword [rsi + rdx + 0x10]
jle 0x4049e6
mov qword [rsi + rdx + 8], 0
mov qword [rsi + rdx + 0x10], 0
add rdx, 0x10
cmp rdx, 0x40
jne 0x4049cd
add rdi, 1
jmp 0x4049b8
lea r8, str.prune_counters
lea rcx, str._workdir_repo_gcc_gnu_gcc_.._libgcc_libgcov_driver.c
mov edx, 0xf7
call fcn.0046d0e0
mov rbx, qword [rsp + 0x38]
lea r8, str.Error
jmp 0x40494f