Function at 0x407950
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Move file
Persist via lnk shortcut
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443524
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [0x45e09c]
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 dword [ebp - 4], 2
call fcn.00413b40
mov ecx, eax
push 0
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x407ae1
push 0x60
push str.d:jenkins.jenkinsworkspaceweiduangamemicrogamemicrogamebox_srcmicrogameboxutilsutils.cc
lea ecx, [ebp - 0xb8]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xa4], 0xf
mov byte [ebp - 0xb8], al
call fcn.0040a820
push 3
push 0x446f74
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 3
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0xf
mov byte [ebp - 0xa0], 0
call fcn.0040a820
mov byte [ebp - 4], 4
call fcn.00413b40
mov edi, eax
lea ecx, [ebp - 0x16c]
push 0x465
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.00404650
mov esi, eax
push str.RemoveInstalledDir
push esi
mov byte [ebp - 4], 5
call fcn.004035f0
mov edx, dword [edi]
add esp, 8
mov ecx, edi
push esi
call dword [edx + 0x1c]
lea ecx, [ebp - 0x16c]
call fcn.004055a0
mov edx, dword [ebp - 0x8c]
mov byte [ebp - 4], 3
cmp edx, 0x10
jb 0x407a88
mov ecx, dword [ebp - 0xa0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407a7e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4082cd
push edx
push ecx
call fcn.0040f18e
add esp, 8
mov edx, dword [ebp - 0xa4]
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0xf
mov byte [ebp - 0xa0], 0
mov byte [ebp - 4], 2
cmp edx, 0x10
jb 0x407ae1
mov ecx, dword [ebp - 0xb8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407ad7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4082d2
push edx
push ecx
call fcn.0040f18e
add esp, 8
mov eax, dword [ebp + 0x10]
or ebx, 0xffffffff
cmp dword [eax - 0xc], 8
jl 0x4082c3
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x4082c3
call fcn.00413b40
mov ecx, eax
push 0
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x407dab
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0xa0]
push 0x60
push str.d:jenkins.jenkinsworkspaceweiduangamemicrogamemicrogamebox_srcmicrogameboxutilsutils.cc
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0xf
mov byte [ebp - 0xa0], 0
call fcn.0040a820
push 3
push 0x446f74
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 6
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xc0], 0xf
mov byte [ebp - 0xd4], 0
call fcn.0040a820
mov byte [ebp - 4], 7
call fcn.00413b40
push 1
push 2
lea ecx, [ebp - 0x16c]
mov dword [ebp - 0x88], eax
call fcn.004041d0
push ebx
push 0x446f58
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 8
call fcn.0040be50
push ebx
push 0x446f5c
lea ecx, [ebp - 0xa0]
mov edi, eax
call fcn.0040be50
push 0x64
mov esi, eax
lea eax, [ebp - 0x74]
push 0
push eax
call fcn.0041ef10
add esp, 0xc
cmp esi, ebx
je 0x407c7e
lea eax, [esi - 1]
cmp edi, eax
jae 0x407c7e
mov eax, dword [ebp - 0x90]
lea edx, [edi + 1]
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0xf
mov byte [ebp - 0xb8], 0
cmp eax, edx
jb 0x4082d7
sub esi, edi
sub eax, edx
lea ecx, [esi - 1]
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x8c], 0x10
lea eax, [ebp - 0xa0]
cmovae eax, dword [ebp - 0xa0]
push ecx
add eax, edx
lea ecx, [ebp - 0xb8]
push eax
call fcn.0040a820
cmp dword [ebp - 0xa4], 0x10
lea eax, [ebp - 0xb8]
cmovae eax, dword [ebp - 0xb8]
push eax
push 0x46a
lea eax, [ebp - 0x74]
push str.__4d___s_
push eax
call fcn.00403ca0
add esp, 0x10
lea ecx, [ebp - 0xb8]
call fcn.00404ec0
jmp 0x407c94
push 0x46a
lea eax, [ebp - 0x74]
push str.__4d_
push eax
call fcn.00403ca0
add esp, 0xc
cmp dword [ebp - 0xc0], 0x10
lea eax, [ebp - 0xd4]
cmovae eax, dword [ebp - 0xd4]
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.00405480
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.00405480
lea eax, [ebp - 0x16c]
mov byte [ebp - 4], 9
push str._RemoveInstalledDir__delete:
push eax
call fcn.004035f0
mov ecx, dword [ebp - 0x78]
mov eax, 0x446f48
test ecx, ecx
cmovne eax, ecx
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.004035f0
mov ecx, dword [ebp - 0x88]
lea edx, [ebp - 0x16c]
add esp, 0x20
mov eax, dword [ecx]
push edx
call dword [eax + 0x1c]
lea ecx, [ebp - 0x16c]
call fcn.004055a0
mov edx, dword [ebp - 0xc0]
mov byte [ebp - 4], 6
cmp edx, 0x10
jb 0x407d52
mov ecx, dword [ebp - 0xd4]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407d48
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4082dc
push edx
push ecx
call fcn.0040f18e
add esp, 8
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xc0], 0xf
mov byte [ebp - 0xd4], 0
mov byte [ebp - 4], 2
cmp edx, 0x10
jb 0x407dab
mov ecx, dword [ebp - 0xa0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407da1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4082e1
push edx
push ecx
call fcn.0040f18e
add esp, 8
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x407dca
test al, 1
je 0x407dca
and eax, 0xfffffffe
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
call fcn.00402f00
mov ecx, eax
test ecx, ecx
je 0x4082e6
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x84], eax
push dword [ebp + 8]
lea eax, [ebp - 0x84]
mov byte [ebp - 4], 0xa
push dword [ebp + 0x10]
push str._s_s.json
push eax
call fcn.00402e10
mov esi, dword [ebp - 0x84]
add esp, 0x10
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call edi
test eax, eax
jne 0x407e45
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407e45
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x407e3a
push esi
call edi
test eax, eax
jne 0x407e45
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
call fcn.00402f00
mov ecx, eax
test ecx, ecx
je 0x4082f0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x80], eax
push dword [ebp + 8]
lea eax, [ebp - 0x80]
mov byte [ebp - 4], 0xb
push dword [ebp + 0x10]
push str._s_s.exe
push eax
call fcn.00402e10
mov esi, dword [ebp - 0x80]
add esp, 0x10
push esi
call edi
test eax, eax
jne 0x407eb1
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407eb1
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x407ea6
push esi
call edi
test eax, eax
jne 0x407eb1
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
call fcn.00402f00
mov ecx, eax
test ecx, ecx
je 0x4082fa
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x7c], eax
push dword [ebp + 8]
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 0xc
push dword [ebp + 0x10]
push str._s_s.ico
push eax
call fcn.00402e10
mov edi, dword [ebp - 0x7c]
add esp, 0x10
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call esi
test eax, eax
jne 0x407f23
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407f23
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x407f18
push edi
call esi
test eax, eax
jne 0x407f23
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
call fcn.00402f00
mov ecx, eax
test ecx, ecx
je 0x408304
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x88], eax
push dword [ebp + 8]
lea eax, [ebp - 0x88]
mov byte [ebp - 4], 0xd
push dword [ebp + 0x10]
push str._s_s.ui
push eax
call fcn.00402e10
mov esi, dword [ebp - 0x88]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x407fa0
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407fa0
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x407f95
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x407fa0
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0
je 0x40803f
call fcn.00402f00
mov ecx, eax
test ecx, ecx
je 0x40830e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x78], eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x78]
mov byte [ebp - 4], 0xe
push dword [ebp + 0x10]
push str._s_s.lnk
push eax
call fcn.00402e10
mov edi, dword [ebp - 0x78]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x408021
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408021
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x408016
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x408021
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov byte [ebp - 4], 0xd
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40803c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x7c]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push dword [ebp + 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40824e
call fcn.00413b40
mov ecx, eax
push 2
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x40815e
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0xa0]
push 0x60
push str.d:jenkins.jenkinsworkspaceweiduangamemicrogamemicrogamebox_srcmicrogameboxutilsutils.cc
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0xf
mov byte [ebp - 0xa0], 0
call fcn.0040a820
push 3
push 0x446fdc
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0xf
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0xf
mov byte [ebp - 0xb8], 0
call fcn.0040a820
mov byte [ebp - 4], 0x10
call fcn.00413b40
mov dword [ebp - 0xbc], eax
lea ecx, [ebp - 0x16c]
push 0x48d
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.00404650
mov ebx, eax
push str.RemoveInstalledDir__failed_delete:
push ebx
mov byte [ebp - 4], 0x11
call fcn.00405480
mov eax, dword [ebp - 0x78]
mov ecx, 0x446f48
test eax, eax
cmovne ecx, eax
push ecx
push ebx
call fcn.004035f0
mov ecx, dword [ebp - 0xbc]
add esp, 0x10
mov eax, dword [ecx]
push ebx
call dword [eax + 0x1c]
lea ecx, [ebp - 0x16c]
call fcn.004055a0
lea ecx, [ebp - 0xb8]
call fcn.00404ec0
lea ecx, [ebp - 0xa0]
call fcn.00404ec0
or ebx, 0xffffffff
mov byte [ebp - 4], 0xc
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408179
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x408194
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x80]
mov eax, ebx
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4081b2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x84]
mov eax, ebx
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4081d3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor esi, esi
mov edx, dword [ebp + 8]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4081f3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov eax, ebx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408211
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x408230
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
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.0040f17d
mov esp, ebp
pop ebp
ret
mov byte [ebp - 4], 0xc
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408269
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x408284
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x80]
mov eax, ebx
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4082a2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x84]
mov eax, ebx
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4082c3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, 1
jmp 0x4081d5
call fcn.00422ef9
call fcn.00422ef9
call fcn.0040a0f0
call fcn.00422ef9
call fcn.00422ef9
push 0x80004005
call fcn.00402bb0
push 0x80004005
call fcn.00402bb0
push 0x80004005
call fcn.00402bb0
push 0x80004005
call fcn.00402bb0
push 0x80004005
call fcn.00402bb0
int3