Function at 0x40af46
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xf8
mov esi, esp
mov dword [esi + 0xe0], ebp
lea eax, [esi + 0xe8]
lea ebx, [esi + 0x38]
mov dword [esi + 0x34], edx
mov dword [esi + 0x30], ecx
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x4ed850
mov edi, dword fs:[0]
mov dword [eax], edi
lea edi, [ecx + edx]
mov dword fs:[0], eax
mov edx, ebx
mov dword [ebx], edi
mov dword [ebx + 4], ecx
and word [ebx + 8], 0
lea edi, [esi + 0xc]
mov dword [ebx + 0xc], 1
mov ecx, edi
call fcn.004ed21d
mov edi, dword [edi + 4]
and dword [ebx], 0
push ebx
push 0x20119
push 0
push edi
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
mov ebx, eax
test eax, eax
je 0x40afd9
and dword [esi + 0x94], 0
mov dword [esi + 0x98], ebx
mov dword [esi], ebx
jmp 0x40afeb
mov eax, dword [esi + 0x38]
mov dword [esi + 0x98], eax
mov dword [esi], eax
mov byte [esi + 0x94], 4
mov ecx, dword [esi + 0xc]
mov edx, edi
call fcn.004024be
mov ecx, 0x80000002
call fcn.004ed4fc
test ebx, ebx
je 0x40b015
lea eax, [esi + 0x94]
push eax
call fcn.00402499
pop eax
jmp 0x40b711
mov eax, dword [esi + 0x94]
cmp al, 4
jne 0x40b7ff
mov edx, dword [esi]
mov eax, dword [ebp + 8]
lea ecx, [esi + 0x9c]
mov dword [ecx], edx
lea edx, [esi + 0xd8]
and dword [edx], 0
mov dword [edx + 4], ecx
mov edx, dword [eax + 4]
imul eax, dword [eax + 8], 0x29
add edx, 0x14
mov dword [esi + 0x8c], eax
mov dword [esi + 0x90], edx
lea ecx, [esi + 0x38]
lea edx, [esi + 0xd8]
call fcn.004ed61f
mov al, byte [esi + 0x50]
cmp al, 0xd
je 0x40b63a
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0x3c]
cmp al, 0xc
je 0x40b725
lea ebx, [esi + 0x51]
mov dword [esi + 0x78], ecx
mov ecx, dword [esi + 0x40]
mov dword [esi + 0x7c], edx
lea edx, [esi + 0xb0]
mov edi, dword [ebx - 5]
movsd xmm0, qword [ebx - 0xd]
mov dword [esi + 0x80], ecx
lea ecx, [esi + 0x51]
mov dword [esi + 0xb8], edi
movzx edi, word [ebx]
mov cl, byte [ecx + 2]
lea ebx, [esi + 0xbd]
movsd qword [esi + 0xb0], xmm0
mov word [ebx], di
lea edi, [esi + 0xc0]
mov byte [ebx + 2], cl
mov byte [esi + 0xbc], al
mov ecx, edi
call fcn.00401a00
lea eax, [esi + 0x78]
mov dword [esi + 0xd0], str.stdoutlibrary_std_srciomod.rs
and dword [esi + 0x38], 0
mov dword [esi + 0x40], 0x514104
mov dword [esi + 0xd4], 6
mov dword [esi + 0x44], 3
mov dword [esi + 0xa0], eax
lea eax, [esi + 0xa0]
mov dword [esi + 0xa4], fcn.00403a12
mov dword [esi + 0xa8], edi
mov dword [esi + 0xac], 0x4035ed
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], 2
mov al, byte [0x58ba4c]
test al, al
je 0x40b17d
call fcn.004cf060
test eax, eax
je 0x40b17d
mov edi, dword [eax]
and dword [eax], 0
test edi, edi
je 0x40b17d
lea ecx, [edi + 8]
mov dword [esi + 0x2c], eax
mov dword [esi + 8], ecx
push ecx
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov eax, dword [0x58bafc]
mov dword [esi], edi
test eax, 0x7fffffff
je 0x40b542
and dword [esi + 0xf0], 0
call fcn.0050fd80
mov edi, dword [esi]
xor al, 1
mov dword [esi + 4], eax
jmp 0x40b549
mov eax, dword [0x58ba50]
cmp eax, 3
je 0x40b195
mov eax, dword [0x58ba50]
cmp eax, 3
jne 0x40b602
call fcn.004c49a0
test eax, eax
je 0x40b73d
mov ecx, dword [0x58ba70]
mov edi, eax
cmp ecx, edi
jne 0x40b1c6
mov eax, dword [0x58ba74]
inc eax
je 0x40b7c0
mov dword [esi + 0xf0], 5
jmp 0x40b1e6
lea eax, [0x58ba6c]
push eax
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
xor eax, eax
mov dword [0x58ba70], edi
mov dword [esi + 0xf0], 5
inc eax
mov dword [0x58ba74], eax
lea eax, [0x58ba54]
and dword [esi + 0x38], 0
mov dword [esi + 0x40], 0x514104
lea edi, [esi + 0x38]
mov dword [esi + 0x44], 3
lea ecx, [esi + 0xc]
mov edx, 0x556e2c
mov dword [esi + 0x20], eax
lea eax, [esi + 0xa0]
mov dword [esi + 0x48], eax
lea eax, [esi + 0x20]
mov dword [esi + 0x4c], 2
mov dword [esi + 0x14], eax
mov byte [esi + 0xc], 4
push edi
call fcn.0041a630
pop ecx
mov cl, byte [esi + 0xc]
test al, al
je 0x40b256
cmp cl, 4
jne 0x40b29b
mov dword [esi + 0x84], 0
mov bl, 2
mov dword [esi + 0x88], 0x556e08
jmp 0x40b2b2
mov bl, 4
cmp cl, 3
jne 0x40b2b2
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
mov dword [esi], ecx
mov ecx, dword [ecx + 4]
mov dword [esi + 0xf0], 4
push eax
call dword [ecx]
add esp, 4
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
cmp dword [eax + 4], 0
je 0x40b28c
mov edx, dword [eax + 8]
mov ecx, dword [ecx]
call fcn.00415e60
mov ecx, dword [esi + 0x10]
push 4
pop edx
call fcn.00415e60
mov bl, 4
jmp 0x40b2b2
mov ebx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
mov ecx, ebx
mov dword [esi + 0x88], eax
shr ecx, 8
mov dword [esi + 0x84], ecx
mov eax, dword [esi + 0x20]
dec dword [eax + 0x20]
jne 0x40b2cb
mov dword [eax + 0x1c], 0
add eax, 0x18
push eax
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
cmp bl, 4
jne 0x40b757
mov ecx, dword [esi + 0xc0]
mov edx, dword [esi + 0xc4]
call fcn.0043e31d
movzx eax, byte [esi + 0xbc]
cmp eax, 4
je 0x40b466
cmp eax, 1
mov eax, dword [esi + 0x8c]
mov ebx, dword [esi + 0x90]
je 0x40b43d
jmp 0x40b445
mov dword [esi], ebx
mov dword [esi + 8], eax
mov edx, dword [esi + 0x30]
lea edi, [esi + 0x38]
mov eax, dword [esi]
mov ecx, edi
lea ebx, [eax - 0x14]
push dword [esi + 0x34]
call fcn.0040af08
pop eax
mov ecx, ebx
mov ebx, dword [esi]
mov edx, edi
call fcn.00403156
test al, al
je 0x40b434
mov edx, dword [esi + 0x7c]
lea edi, [esi + 0x38]
mov ecx, edi
push dword [esi + 0x80]
call fcn.0040af08
pop eax
mov ecx, ebx
mov edx, edi
call fcn.00403156
test al, al
je 0x40b434
lea ecx, [esi + 0xc0]
lea edx, [esi + 0xb0]
call fcn.00401a00
mov edx, dword [esi + 0xc4]
lea ecx, [esi + 0x20]
push dword [esi + 0xc8]
call fcn.00417470
pop eax
mov eax, dword [esi + 0x24]
mov ebx, dword [ebp + 0x18]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x28]
mov ecx, ebx
mov dword [esi + 0xcc], eax
call fcn.00441781
mov dword [esi + 4], eax
mov edi, edx
mov dword [esi + 0x2c], edx
push ebx
push dword [ebp + 0x14]
push edx
call fcn.005010b0
add esp, 0xc
lea ecx, [esi + 0xa0]
mov edx, edi
push ebx
call fcn.00417470
pop eax
mov ebx, dword [esi + 0xa4]
lea edi, [esi + 0x38]
mov ecx, edi
mov edx, ebx
push dword [esi + 0xcc]
push dword [esi + 0x1c]
push dword [esi + 0xa8]
call fcn.00417d40
add esp, 0xc
lea ecx, [esi + 0xc]
mov edx, edi
call fcn.0040418b
mov ecx, dword [esi + 0xa0]
mov edx, ebx
mov edi, dword [esi + 0xc]
mov ebx, dword [esi]
call fcn.0043e31d
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x2c]
call fcn.0043e31d
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x24]
call fcn.0043e31d
mov ecx, dword [esi + 0xc0]
mov edx, dword [esi + 0xc4]
call fcn.0043e31d
test edi, edi
je 0x40b434
mov byte [ebx + 0x14], 1
mov eax, dword [esi + 8]
add ebx, 0x29
add eax, 0xffffffd7
test eax, eax
jne 0x40b30f
mov ecx, dword [esi + 0xb0]
mov edx, dword [esi + 0xb4]
call fcn.0043e31d
mov ecx, dword [esi + 0x78]
mov edx, dword [esi + 0x7c]
call fcn.0043e31d
jmp 0x40b052
mov eax, dword [esi + 0x8c]
mov edi, dword [esi + 0x90]
test eax, eax
je 0x40b445
mov edx, dword [esi + 0x30]
mov dword [esi + 8], eax
lea eax, [esi + 0x38]
lea ebx, [edi - 0x14]
mov dword [esi], edi
mov edi, eax
mov ecx, eax
push dword [esi + 0x34]
call fcn.0040af08
pop eax
mov ecx, ebx
mov ebx, edi
mov edi, dword [esi]
mov edx, ebx
call fcn.00403156
test al, al
je 0x40b534
mov edx, dword [esi + 0x7c]
mov ecx, ebx
push dword [esi + 0x80]
call fcn.0040af08
pop eax
mov ecx, edi
mov edx, ebx
call fcn.00403156
test al, al
je 0x40b534
mov ecx, ebx
lea edx, [esi + 0xb0]
call fcn.00401a00
mov edi, ebx
mov ebx, dword [esi + 0x3c]
mov edx, dword [esi + 0x40]
mov ecx, ebx
push 0x551e4a
call fcn.00403c1e
pop ecx
mov ecx, dword [esi + 0x38]
mov edx, ebx
mov ebx, edi
mov edi, dword [esi]
mov byte [esi + 4], al
call fcn.0043e31d
cmp byte [esi + 4], 0
jne 0x40b534
mov ecx, ebx
lea edx, [esi + 0xb0]
call fcn.00401a00
mov ebx, dword [esi + 0x3c]
mov edx, dword [esi + 0x40]
mov ecx, ebx
push 0x51411c
call fcn.00403c1e
pop ecx
mov ecx, dword [esi + 0x38]
mov edx, ebx
mov byte [esi + 4], al
call fcn.0043e31d
cmp byte [esi + 4], 0
jne 0x40b534
mov byte [edi + 0x14], 1
mov eax, dword [esi + 8]
add edi, 0x29
add eax, 0xffffffd7
jmp 0x40b472
mov dword [esi + 4], 0
mov al, byte [edi + 0xc]
lea ecx, [esi + 0x38]
lea eax, [edi + 0x10]
mov dword [esi + 0xf0], 1
push ecx
push eax
lea eax, [esi + 0xc]
push eax
call fcn.004cf380
add esp, 0xc
cmp byte [esi + 0xc], 3
jne 0x40b5ab
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
mov dword [esi + 0x1c], ecx
mov ecx, dword [ecx + 4]
mov dword [esi + 0xf0], 2
push eax
call dword [ecx]
add esp, 4
mov edi, dword [esi + 0x1c]
mov eax, dword [edi + 4]
cmp dword [eax + 4], 0
je 0x40b5a1
mov edx, dword [eax + 8]
mov ecx, dword [edi]
call fcn.00415e60
mov ecx, edi
push 4
pop edx
call fcn.00415e60
cmp byte [esi + 4], 0
mov edi, dword [esi]
je 0x40b5de
push dword [esi + 8]
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
mov eax, dword [esi + 0x2c]
mov ecx, dword [eax]
mov dword [eax], edi
test ecx, ecx
je 0x40b2d4
lock dec dword [ecx]
jne 0x40b2d4
call fcn.004cf1b0
jmp 0x40b2d4
mov eax, dword [0x58bafc]
test eax, 0x7fffffff
je 0x40b5b3
and dword [esi + 0xf0], 0
call fcn.0050fd80
mov edi, dword [esi]
test al, al
jne 0x40b5b3
mov byte [edi + 0xc], 1
jmp 0x40b5b3
lea eax, [0x58ba54]
xor edx, edx
mov ecx, 0x58ba50
mov dword [esi + 0x38], eax
lea eax, [esi + 0x20]
inc edx
mov dword [esi + 0x3c], eax
lea eax, [esi + 0x38]
mov dword [esi + 0xc], eax
push 0x556fe8
push 0x556ff8
lea eax, [esi + 0xc]
push eax
call fcn.0050f4d0
add esp, 0xc
jmp 0x40b195
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x40b706
lea edx, [esi + 0xa0]
inc eax
lea ecx, [esi + 0x9c]
lea ebx, [esi + 0x38]
and dword [edx], 0
mov dword [edx + 4], ecx
mov dword [esi + 4], eax
mov ecx, ebx
lea edx, [esi + 0xa0]
call fcn.004ed51f
mov eax, dword [esi + 0x38]
cmp eax, 2
je 0x40b706
test eax, eax
jne 0x40b7d5
mov edi, dword [esi + 0x40]
test edi, edi
je 0x40b706
mov eax, dword [esi + 0x3c]
mov ebx, dword [esi + 0x34]
mov dword [esi], eax
mov eax, dword [esi + 0x44]
mov ecx, ebx
mov dword [esi + 8], eax
call fcn.00441781
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
push ebx
push dword [esi + 0x30]
push edx
call fcn.005010b0
add esp, 0xc
mov dword [esi + 0x40], ebx
lea ecx, [esi + 0x38]
push 0x5c
pop edx
call fcn.004037b4
mov edx, dword [esi + 8]
lea ecx, [esi + 0x38]
add edx, edi
push edi
call fcn.00419104
pop eax
mov ebx, dword [esi + 0x3c]
mov edx, dword [esi + 0x40]
mov ecx, ebx
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [esi + 4]
push dword [ebp + 8]
call fcn.0040af46
add esp, 0x14
mov ecx, dword [esi + 0x38]
mov edx, ebx
lea ebx, [esi + 0x38]
call fcn.0043e31d
mov ecx, dword [esi]
mov edx, edi
call fcn.0043e31d
jmp 0x40b65f
mov ecx, dword [esi + 0x9c]
call fcn.004ed4fc
mov eax, dword [esi + 0xe8]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], edx
push 0x2b
pop edx
mov ecx, str.called__Result::unwrap____on_an__Err__value
push 0x514120
jmp 0x40b7ec
push 0x46
pop edx
mov ecx, str.cannot_access_a_Thread_Local_Storage_value_during_or_after_destruction_rustc_90c541806f23a127002de5b4038be731ba1458calibrary_std_src_threadlocal.rs
push 0x556734
push 0x55649c
lea eax, [esi + 0x20]
jmp 0x40b7f4
mov ecx, dword [esi + 0x84]
movzx eax, bl
shl ecx, 8
or eax, ecx
mov ecx, dword [esi + 0x88]
mov dword [esi + 0x20], eax
lea eax, [esi + 0xd0]
mov dword [esi + 0xc], eax
mov dword [esi + 0x24], ecx
lea ecx, [esi + 0x38]
mov dword [ecx + 8], 0x556ce8
push 2
pop eax
mov dword [ecx + 0xc], eax
and dword [ecx], 0
lea edx, [esi + 0xc]
mov dword [esi + 0x10], 0x4c6b80
mov dword [esi + 0xf0], 6
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x14], eax
lea eax, [esi + 0x20]
mov edx, 0x556cf8
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], fcn.004ca230
call fcn.0050d4d0
ud2
push 0x26
pop edx
mov ecx, str.lock_count_overflow_in_reentrant_mutexlibrary_std_src_sync_remutex.rs
push 0x557078
call fcn.0050d7c0
pop eax
ud2
movsd xmm0, qword [esi + 0x3c]
movsd qword [esi + 0xc], xmm0
push 0x2b
pop edx
mov ecx, str.called__Result::unwrap____on_an__Err__value
push 0x514130
push 0x5119fc
lea eax, [esi + 0xc]
push eax
call fcn.0050d740
add esp, 0xc
ud2
mov dword [esi + 0x38], eax
mov eax, dword [esi]
mov dword [esi + 0x3c], eax
push 0x2b
pop edx
mov ecx, str.called__Result::unwrap____on_an__Err__value
push 0x5140f4
push 0x5119fc
lea eax, [esi + 0x38]
jmp 0x40b7f4