Function at 0x420c40
Capabilities:
Check if file exists
Delete file
Print debug messages
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c40e6
mov eax, dword fs:[0]
push eax
sub esp, 0xa44
mov eax, dword [0x624500]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov ecx, 0x5fe518
mov dword [ebp - 0xa1c], 0
mov dword [ebp - 0xa4c], edi
mov eax, dword [edi + 0x10]
mov eax, dword [eax]
add eax, 8
cmp eax, dword [edi + 8]
cmovb ecx, eax
mov eax, dword [ecx + 4]
or eax, 0x70
cmp eax, 0x7ff7a574
je 0x420cd4
mov edx, ecx
mov ecx, edi
call fcn.00436d40
test eax, eax
jne 0x420cb1
xor edx, edx
jmp 0x420cd9
mov eax, dword [edi + 0xc]
cmp dword [eax + 0xc], 0
jle 0x420cc1
mov ecx, edi
call fcn.0043c530
mov eax, dword [edi + 0x10]
mov ecx, 0x5fe518
mov eax, dword [eax]
add eax, 8
cmp eax, dword [edi + 8]
cmovb ecx, eax
mov edx, dword [ecx]
add edx, 0x10
lea ecx, [ebp - 0xa1c]
call fcn.00409c4a
mov dword [ebp - 4], 0
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x62bd6c]
cmp eax, dword [ecx + 4]
jg 0x4211ea
push 0x104
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0xa1c]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x218]
push eax
call fcn.00594cd0
mov ecx, eax
add esp, 4
or esi, 0xffffffff
mov dword [ebp - 0xa44], ecx
test ecx, ecx
jne 0x420dc3
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0xa1c]
add edx, 0xfffffff0
mov eax, dword [edx]
mov dword [ebp - 0xa20], eax
cmp dword [edx + 4], ecx
je 0x420dba
mov eax, dword [edx + 0xc]
lea ecx, [edx + 0xc]
shr eax, 0x1f
test al, al
je 0x420d89
cmp dword [edx + 8], 0
jl 0x421220
mov dword [edx + 4], 0
xor ecx, ecx
mov eax, dword [ebp - 0xa1c]
mov byte [ebp - 4], cl
mov word [eax], cx
jmp 0x420ec3
mov byte [ebp - 4], 2
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x420da0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0xa20]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xa1c], eax
mov byte [ebp - 4], 0
jmp 0x420ec3
mov eax, dword [ebp - 0xa1c]
mov edx, dword [eax - 0xc]
mov dword [ebp - 0xa48], edx
lea edx, [ebp - 0x218]
sub edx, eax
sar edx, 1
mov dword [ebp - 0xa20], edx
test ecx, ecx
js 0x42122a
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, dword [ebp - 0xa44]
or ecx, edx
jge 0x420e16
push dword [ebp - 0xa44]
lea ecx, [ebp - 0xa1c]
call fcn.0040595f
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [ebp - 0xa20]
cmp ecx, dword [ebp - 0xa48]
ja 0x420e86
lea edx, [eax + ecx*2]
mov ecx, dword [ebp - 0xa44]
mov dword [ebp - 0xa20], edx
lea edx, [ecx + ecx]
test edx, edx
je 0x420eab
test eax, eax
jne 0x420e50
call fcn.00591458
mov dword [eax], 0x16
call fcn.0059137f
jmp 0x420e9f
cmp dword [ebp - 0xa20], 0
je 0x420e3e
mov ecx, dword [eax - 8]
add ecx, ecx
cmp ecx, edx
jae 0x420e74
call fcn.00591458
mov dword [eax], 0x22
call fcn.0059137f
jmp 0x420e9f
push edx
push dword [ebp - 0xa20]
push eax
call fcn.0058d260
add esp, 0xc
jmp 0x420e9f
push dword [ebp - 0xa44]
lea ecx, [ebp - 0x218]
push ecx
push dword [eax - 8]
push eax
call fcn.00405d4d
add esp, 0x10
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [ebp - 0xa44]
cmp ecx, dword [eax - 8]
jg 0x421220
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0xa1c]
mov word [eax + ecx*2], dx
push dword [ebp - 0xa1c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x420f29
mov eax, dword [edi + 8]
mov dword [eax], 1
mov dword [eax + 4], 0x7ff7a501
mov eax, dword [ebp - 0xa1c]
add dword [edi + 8], 8
add eax, 0xfffffff0
mov dword [ebp - 4], 3
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x420f09
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00539e65
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0xa48], ecx
add ecx, 1
mov dword [ebp - 0xa44], ecx
js 0x421234
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, dword [ebp - 0xa44]
or ecx, edx
jge 0x420f73
push dword [ebp - 0xa44]
lea ecx, [ebp - 0xa1c]
call fcn.0040595f
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [ebp - 0xa48]
xor edx, edx
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [ebp - 0xa44]
cmp ecx, dword [eax - 8]
jg 0x421220
mov dword [eax - 0xc], ecx
xorps xmm0, xmm0
mov eax, dword [ebp - 0xa1c]
mov word [eax + ecx*2], dx
mov eax, 0x14
movups xmmword [ebp - 0xa40], xmm0
mov dword [ebp - 0xa28], edx
movq qword [ebp - 0xa30], xmm0
mov word [ebp - 0xa30], ax
mov eax, dword [ebp - 0xa1c]
mov dword [ebp - 0xa38], eax
lea eax, [ebp - 0xa40]
push eax
mov word [ebp - 0xa24], dx
mov dword [ebp - 0xa34], edx
mov dword [ebp - 0xa3c], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ecx, eax
xor eax, eax
test ecx, ecx
mov dword [ebp - 0xa48], ecx
sete al
mov dword [ebp - 0xa44], eax
test ecx, ecx
je 0x421151
mov byte [ebp - 4], 4
call fcn.00405c3d
mov ecx, eax
test ecx, ecx
je 0x42123e
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xa20], eax
mov byte [ebp - 4], 5
lea eax, [ebp - 0xa20]
push dword [ebp - 0xa1c]
push 0x602378
push eax
call fcn.004057e8
mov esi, dword [ebp - 0xa20]
add esp, 8
mov eax, esp
push ecx
mov dword [eax], 0x5fdbf4
mov eax, esp
mov dword [eax], esi
call fcn.0042f150
add esp, 8
sub eax, 3
je 0x4211e2
sub eax, 1
je 0x421179
sub eax, 1
jne 0x42108f
mov dword [ebp - 0xa44], 1
mov eax, dword [0x5fd6e0]
mov dword [ebp - 0xa18], eax
mov eax, dword [0x5fd6e4]
push 0x7f8
mov dword [ebp - 0xa14], eax
lea eax, [ebp - 0xa10]
push 0
push eax
call fcn.0058d810
push dword [ebp - 0xa1c]
lea eax, [ebp - 0xa12]
push str.Delete__s_failed__r_n
push eax
call fcn.0040988e
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [ebp - 0xa18]
add esp, 0x18
push eax
call edi
mov eax, dword [0x5fd6e0]
mov dword [ebp - 0xa18], eax
mov eax, dword [0x5fd6e4]
push 0x7f8
mov dword [ebp - 0xa14], eax
lea eax, [ebp - 0xa10]
push 0
push eax
call fcn.0058d810
push dword [ebp - 0xa48]
lea eax, [ebp - 0xa12]
push str.SHFileOperation_error_code_:__x_r_n
push eax
call fcn.0040988e
add esp, 0x18
lea eax, [ebp - 0xa18]
push eax
call edi
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 8
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42114b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0xa4c]
mov eax, dword [edi + 8]
mov ecx, dword [ebp - 0xa44]
mov dword [eax], ecx
mov dword [eax + 4], 0x7ff7a501
mov edx, dword [ebp - 0xa1c]
add dword [edi + 8], 8
add edx, 0xfffffff0
mov dword [ebp - 4], 9
jmp 0x4211c7
push edi
call fcn.00420c40
mov edx, dword [edi + 8]
xor ecx, ecx
add esp, 4
test eax, eax
setne cl
mov dword [edx], ecx
mov dword [edx + 4], 0x7ff7a501
lea edx, [esi - 0x10]
add dword [edi + 8], 8
or esi, 0xffffffff
mov byte [ebp - 4], 6
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4211b7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0xa1c]
add edx, 0xfffffff0
mov dword [ebp - 4], 7
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x420f09
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x420f09
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x62bd6c
call fcn.0053a412
add esp, 4
cmp dword [0x62bd6c], 0xffffffff
jne 0x420d04
push 0x5cd323
call fcn.0053a13c
push 0x62bd6c
call fcn.0053a3c8
add esp, 8
jmp 0x420d04
push 0x80070057
call fcn.00405d25
push 0x80070057
call fcn.00405d25
push 0x80070057
call fcn.00405d25
push 0x80004005
call fcn.00405d25
int3