Function at 0x402240
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x438130]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x43a9c4]
push esi
mov esi, dword [ebp + 8]
push edi
test al, 1
jne 0x40227d
or eax, 1
mov ecx, 0x43a990
mov dword [0x43a9c4], eax
call fcn.004077e0
push 0x429090
call fcn.00418853
add esp, 4
mov ecx, 0x43a990
call fcn.00408c40
test eax, eax
je 0x4022a6
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push str.BitsJob:_Cancel
push eax
mov dword [ebp - 0x1c], 4
call fcn.00407b90
add esp, 8
mov eax, dword [esi]
lea ecx, [ebp - 0x2c]
push ecx
push esi
call dword [eax + 0x28]
test eax, eax
js 0x40248b
cmp dword [ebp - 0x2c], 1
jge 0x4022f0
push dword [0x43acc0]
push 0
push 0x42d824
push 0
push 0
push 0x202
push 0x42a468
call fcn.00401fb0
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00419146
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x40233d
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push eax
call edi
cmp eax, 0x102
jne 0x40233d
cmp dword [esi + 0x30], 0
je 0x40233d
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [esi + 0x30]
call edi
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esi + 0x30]
test eax, eax
je 0x40233d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x30], 0
push 0x43a950
lea ecx, [ebp - 0x28]
call fcn.004072b0
lea ecx, [ebp - 0x28]
mov dword [0x43a948], 0
mov byte [0x43a935], 1
call fcn.004072f0
mov eax, dword [esi]
push 0
push esi
call dword [eax + 0x2c]
test eax, eax
js 0x40248b
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
mov ecx, esi
call fcn.00402b00
mov esi, dword [ebp - 0x18]
mov edi, eax
test edi, edi
js 0x40247f
test esi, esi
je 0x40247d
mov eax, dword [esi]
lea ecx, [ebp - 0x14]
push ecx
push esi
call dword [eax + 0x28]
mov edi, eax
test edi, edi
js 0x40247f
mov eax, dword [esi]
push esi
call dword [eax + 0x20]
mov edi, eax
test edi, edi
js 0x40247f
lea ecx, [ebp - 0x18]
call fcn.00401510
lea eax, [ebp - 0x18]
mov ecx, 0x43a934
push eax
call fcn.00403860
movdqu xmm0, xmmword [0x42d824]
sub esp, 0x10
mov ecx, 0x43a934
mov eax, esp
movdqu xmmword [eax], xmm0
call fcn.00405230
push 0x42a4dc
lea ecx, [ebp - 0x1c]
call fcn.00401380
lea eax, [ebp - 0x1c]
mov ecx, 0x43a934
push eax
call fcn.004051c0
lea ecx, [ebp - 0x1c]
call fcn.00401750
mov ecx, 0x43a934
call fcn.00404f40
push 4
push 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
call fcn.004037f0
mov ecx, eax
call fcn.00408c40
test eax, eax
je 0x402475
movdqu xmm0, xmmword [ebp - 0x14]
mov dword [ebp - 0x28], eax
sub esp, 0x10
mov eax, esp
mov dword [ebp - 0x24], 3
movdqu xmmword [eax], xmm0
lea eax, [ebp - 0x1c]
push eax
call fcn.00418030
push dword [eax]
lea eax, [ebp - 0x28]
push str.BitsJob:_job_cancelled_guid_s
push eax
call fcn.00407b90
add esp, 0x20
lea ecx, [ebp - 0x1c]
call fcn.00401750
lea ecx, [ebp - 0x18]
call fcn.00401750
xor edi, edi
test esi, esi
je 0x402489
mov ecx, dword [esi]
push esi
call dword [ecx + 8]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00419146
mov esp, ebp
pop ebp
ret 4