Function at 0x402f30
Capabilities:
Check if file exists
Delete file
Delete registry key
Delete registry value
Get common file path
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417c19
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x42100c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x2b2], cl
call fcn.00401340
mov ecx, eax
test ecx, ecx
je 0x403a6c
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2bc], esi
xor eax, eax
mov dword [ebp - 4], 0
push eax
mov dword [ebp - 0x248], 0
lea ecx, [ebp - 0x248]
push 0x41e2d0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
call fcn.00406490
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.00408610
add esp, 0xc
mov dword [ebp - 0x260], 0
xor eax, eax
mov dword [ebp - 0x250], 0
lea ecx, [ebp - 0x260]
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
push 4
push str.Temp
call fcn.00406490
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x290]
push 8
xor eax, eax
mov dword [ebp - 0x290], 0
push str.MUBSTemp
mov dword [ebp - 0x280], 0
mov dword [ebp - 0x27c], 7
mov word [ebp - 0x290], ax
call fcn.00406490
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x230]
push 1
xor eax, eax
mov dword [ebp - 0x230], 0
push 0x41e2cc
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
call fcn.00406490
lea eax, [ebp - 0x290]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x230]
push eax
push dword [ebp - 0x2bc]
lea ecx, [ebp - 0x278]
call fcn.00405fc0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x278]
cmp dword [ebp - 0x264], 8
mov ebx, dword [ebp - 0x250]
cmovae ecx, dword [ebp - 0x278]
mov eax, dword [ebp - 0x24c]
mov edx, dword [ebp - 0x268]
sub eax, ebx
mov dword [ebp - 0x2b0], ecx
mov dword [ebp - 0x2ac], ebx
cmp edx, eax
ja 0x40312c
mov eax, dword [ebp - 0x2ac]
lea edi, [ebp - 0x260]
add ebx, edx
cmp dword [ebp - 0x24c], 8
mov dword [ebp - 0x250], ebx
cmovae edi, dword [ebp - 0x260]
lea ecx, [edi + eax*2]
lea eax, [edx + edx]
push eax
push dword [ebp - 0x2b0]
push ecx
call fcn.00408090
add esp, 0xc
xor eax, eax
mov word [edi + ebx*2], ax
jmp 0x403147
push edx
push ecx
mov byte [ebp - 0x2ac], 0
lea ecx, [ebp - 0x260]
push dword [ebp - 0x2ac]
push edx
call fcn.00405cc0
mov ecx, dword [ebp - 0x278]
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x264]
cmp eax, 8
jb 0x40318b
lea edx, [eax*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403181
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x4031cf
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4031c5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x27c]
cmp edx, 8
jb 0x403213
mov ecx, dword [ebp - 0x290]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403209
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
cmp dword [ebp - 0x24c], 8
lea ecx, [ebp - 0x218]
push ecx
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
push eax
push 0
push 0
push 0x8024
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
test eax, eax
jne 0x403596
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x290], eax
mov dword [ebp - 0x280], eax
lea edx, [ecx + 2]
mov dword [ebp - 0x27c], 7
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403267
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x290]
call fcn.00406490
lea eax, [ebp - 0x290]
push eax
lea ecx, [ebp - 0x248]
call fcn.00405550
mov edx, dword [ebp - 0x27c]
cmp edx, 8
jb 0x4032db
mov ecx, dword [ebp - 0x290]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4032d1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
cmp dword [ebp - 0x238], 0
je 0x40359f
push 1
xor eax, eax
mov dword [ebp - 0x278], 0
push 0x41e2cc
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 7
mov word [ebp - 0x278], ax
call fcn.00406490
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
lea edx, [eax - 1]
cmp eax, edx
jb 0x403a76
sub eax, edx
mov ecx, 1
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
cmovae eax, dword [ebp - 0x248]
push ecx
lea ecx, [ebp - 0x230]
lea eax, [eax + edx*2]
push eax
call fcn.00406490
cmp dword [ebp - 0x264], 8
lea ecx, [ebp - 0x278]
mov ebx, dword [ebp - 0x278]
lea edi, [ebp - 0x230]
mov eax, dword [ebp - 0x230]
cmovae ecx, ebx
cmp dword [ebp - 0x21c], 8
mov edx, dword [ebp - 0x220]
cmovae edi, eax
cmp edx, dword [ebp - 0x268]
jne 0x4033ea
test edx, edx
je 0x4033db
sub edi, ecx
mov ax, word [ecx + edi]
cmp ax, word [ecx]
jne 0x4033e4
add ecx, 2
sub edx, 1
jne 0x4033c4
mov eax, dword [ebp - 0x230]
mov byte [ebp - 0x2b1], 0
jmp 0x4033f1
mov eax, dword [ebp - 0x230]
mov byte [ebp - 0x2b1], 1
mov ecx, dword [ebp - 0x21c]
cmp ecx, 8
jb 0x403437
lea ecx, [ecx*2 + 2]
mov edx, eax
cmp ecx, 0x1000
jb 0x40342d
mov eax, dword [eax - 4]
add ecx, 0x23
sub edx, eax
mov dword [ebp - 0x2ac], eax
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x403a8a
mov eax, dword [ebp - 0x2ac]
push ecx
push eax
call fcn.00406bda
add esp, 8
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x264]
cmp eax, 8
jb 0x403475
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x40346b
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push ecx
push ebx
call fcn.00406bda
add esp, 8
cmp byte [ebp - 0x2b1], 0
je 0x403596
push 1
xor eax, eax
mov dword [ebp - 0x230], 0
push 0x41e2cc
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
call fcn.00406490
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x230]
cmp dword [ebp - 0x21c], 8
mov ebx, dword [ebp - 0x238]
cmovae ecx, dword [ebp - 0x230]
mov eax, dword [ebp - 0x234]
mov edx, dword [ebp - 0x220]
sub eax, ebx
mov dword [ebp - 0x2b0], ecx
mov dword [ebp - 0x2ac], ebx
cmp edx, eax
ja 0x403537
mov eax, dword [ebp - 0x2ac]
lea edi, [ebp - 0x248]
add ebx, edx
cmp dword [ebp - 0x234], 8
mov dword [ebp - 0x238], ebx
cmovae edi, dword [ebp - 0x248]
lea ecx, [edi + eax*2]
lea eax, [edx + edx]
push eax
push dword [ebp - 0x2b0]
push ecx
call fcn.00408090
add esp, 0xc
xor eax, eax
mov word [edi + ebx*2], ax
jmp 0x403552
push edx
push ecx
mov byte [ebp - 0x2ac], 0
lea ecx, [ebp - 0x248]
push dword [ebp - 0x2ac]
push edx
call fcn.00405cc0
mov ecx, dword [ebp - 0x230]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x403596
lea edx, [eax*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40358c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
cmp dword [ebp - 0x238], 0
jne 0x4035a6
xor bl, bl
jmp 0x40396e
push 0x15
xor eax, eax
mov dword [ebp - 0x230], 0
push str.BingChatInstaller.EXE
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
call fcn.00406490
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 8
push eax
lea edx, [ebp - 0x248]
lea ecx, [ebp - 0x2a8]
call fcn.00405ba0
add esp, 4
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x403642
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403638
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a7b
push edx
push ecx
call fcn.00406bda
add esp, 8
xor eax, eax
mov dword [ebp - 0x220], 0
cmp dword [ebp - 0x294], 8
mov word [ebp - 0x230], ax
lea eax, [ebp - 0x2a8]
cmovae eax, dword [ebp - 0x2a8]
push eax
mov dword [ebp - 0x21c], 7
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4036a1
cmp dword [ebp - 0x294], 8
lea eax, [ebp - 0x2a8]
cmovae eax, dword [ebp - 0x2a8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x403907
movzx ebx, byte [ebp - 0x2b2]
mov ecx, 0x20019
add ebx, 0x80000001
mov eax, 0x20219
cmp ebx, 0x80000002
cmovne eax, ecx
lea ecx, [ebp - 0x2b0]
push ecx
push eax
push 0
push 0x41e350
push ebx
mov dword [ebp - 0x2ac], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4036f1
push dword [ebp - 0x2b0]
call edi
jmp 0x4036f6
cmp eax, 2
je 0x403750
lea eax, [ebp - 0x2b0]
push eax
push dword [ebp - 0x2ac]
push 0
push 0x41e350
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403780
push eax
push eax
mov dword [ebp - 0x2b8], eax
lea eax, [ebp - 0x2b8]
push eax
push 0
push str._BingChatInstaller
push dword [ebp - 0x2b0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x2b0]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 2
jne 0x403785
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x2b8]
push eax
push dword [ebp - 0x2ac]
push 0
push str.SOFTWAREMicrosoftBingSvc
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403877
push dword [ebp - 0x2b8]
call edi
jmp 0x403880
cmp eax, 2
je 0x403750
xor edi, edi
lea eax, [ebp - 0x2b0]
push eax
cmp ebx, 0x80000002
mov dword [ebp - 0x2b0], edi
mov ecx, 0xf003f
mov eax, 0xf013f
cmovne eax, ecx
push eax
push edi
push 0x41e350
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4037c0
mov edi, 0x80004005
jmp 0x4037db
push str._BingChatInstaller
push dword [ebp - 0x2b0]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
mov ecx, 0x80004005
cmovne edi, ecx
mov eax, dword [ebp - 0x2b0]
test eax, eax
je 0x4037ec
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x40374a
push ecx
mov edi, esp
mov dword [ebp - 0x2b8], edi
call fcn.00401340
test eax, eax
je 0x403a80
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
mov eax, str.__d_Failed_to_Delete_RunOnce_key
mov byte [ebp - 4], 0xb
mov ecx, edi
test eax, 0xffff0000
jne 0x40384e
movzx eax, ax
push eax
call fcn.004057d0
mov edx, 0xc2c
mov byte [ebp - 4], 0xa
mov ecx, pe_nt_image_headers32
call fcn.004041d0
add esp, 4
xor bl, bl
jmp 0x40390d
push 0x20
push str.__d_Failed_to_Delete_RunOnce_key
call fcn.00405990
mov edx, 0xc2c
mov byte [ebp - 4], 0xa
mov ecx, pe_nt_image_headers32
call fcn.004041d0
add esp, 4
xor bl, bl
jmp 0x40390d
cmp eax, 2
je 0x40390b
push 0
cmp ebx, 0x80000002
mov ecx, 0xf003f
mov eax, 0xf013f
cmovne eax, ecx
push eax
push str.SOFTWAREMicrosoftBingSvc
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyExW]
test eax, eax
je 0x40390b
push ecx
mov edi, esp
mov dword [ebp - 0x2ac], edi
call fcn.00401340
mov ecx, eax
test ecx, ecx
je 0x403a80
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
mov eax, str.__d_Failed_to_Delete_Bsvc_key
mov byte [ebp - 4], 0xc
mov ecx, edi
test eax, 0xffff0000
jne 0x4038e5
movzx eax, ax
push eax
call fcn.004057d0
jmp 0x4038f1
push 0x1d
push str.__d_Failed_to_Delete_Bsvc_key
call fcn.00405990
mov edx, 0xc2d
mov byte [ebp - 4], 0xa
mov ecx, 0x112
call fcn.004041d0
add esp, 4
xor bl, bl
jmp 0x40390d
mov bl, 1
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x294]
cmp edx, 8
jb 0x403951
mov ecx, dword [ebp - 0x2a8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403947
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
xor eax, eax
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x294], 7
mov word [ebp - 0x2a8], ax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x24c]
cmp edx, 8
jb 0x4039b2
mov ecx, dword [ebp - 0x260]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4039a8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
xor eax, eax
mov dword [ebp - 0x250], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x234]
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
cmp edx, 8
jb 0x403a12
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403a08
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a8a
push edx
push ecx
call fcn.00406bda
add esp, 8
xor eax, eax
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
add esi, 0xfffffff0
mov dword [ebp - 0x234], 7
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x403a4e
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00406958
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00401170
call fcn.00405b70
call fcn.00409e97
push 0x80004005
call fcn.00401170
call fcn.00409e97
int3