Function at 0x40a520
Capabilities:
Delete file

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
push ebp
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0x28]
sub eax, dword [ebp + 0x24]
lea esi, [ebp + 0x18]
test eax, 0xfffffffc
je 0x40a5af
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
cmp eax, dword [esi + 0x10]
jbe 0x40a555
call fcn.004a68c5
mov eax, dword [esi + 0x10]
mov edi, dword [esi]
mov dword [esp + 0x18], eax
cmp dword [esi + 0xc], eax
jbe 0x40a568
call fcn.004a68c5
mov eax, dword [esi]
test edi, edi
je 0x40a572
cmp edi, eax
je 0x40a577
call fcn.004a68c5
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
je 0x40a5af
test edi, edi
jne 0x40a745
call fcn.004a68c5
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp eax, dword [ecx + 0x10]
jb 0x40a5a2
call fcn.004a68c5
mov eax, dword [esp + 0x14]
mov ebx, dword [eax]
push eax
push edi
lea edi, [esp + 0x20]
call fcn.0040b750
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
jne 0x40a75a
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp + 0x74]
sub ecx, dword [ebp + 0x70]
lea esi, [ebp + 0x64]
test ecx, 0xfffffffc
je 0x40a641
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
cmp eax, dword [esi + 0x10]
jbe 0x40a5e7
call fcn.004a68c5
mov eax, dword [esi + 0x10]
mov edi, dword [esi]
mov dword [esp + 0x18], eax
cmp dword [esi + 0xc], eax
jbe 0x40a5fa
call fcn.004a68c5
mov eax, dword [esi]
test edi, edi
je 0x40a604
cmp edi, eax
je 0x40a609
call fcn.004a68c5
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
je 0x40a641
test edi, edi
jne 0x40a74c
call fcn.004a68c5
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp eax, dword [ecx + 0x10]
jb 0x40a634
call fcn.004a68c5
mov eax, dword [esp + 0x14]
mov ebx, dword [eax]
push eax
push edi
lea edi, [esp + 0x20]
call fcn.0040b750
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x40a668
cmp word [ebx], 0
je 0x40a65f
push ebx
call fcn.004085e0
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
call fcn.004a4a1a
add esp, 4
push ebp
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp + 0x5c]
sub edx, dword [ebp + 0x58]
lea esi, [ebp + 0x4c]
test edx, 0xfffffffc
je 0x40a6ed
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
cmp eax, dword [esi + 0x10]
jbe 0x40a693
call fcn.004a68c5
mov eax, dword [esi + 0x10]
mov edi, dword [esi]
mov dword [esp + 0x18], eax
cmp dword [esi + 0xc], eax
jbe 0x40a6a6
call fcn.004a68c5
mov eax, dword [esi]
test edi, edi
je 0x40a6b0
cmp edi, eax
je 0x40a6b5
call fcn.004a68c5
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
je 0x40a6ed
test edi, edi
jne 0x40a753
call fcn.004a68c5
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp eax, dword [ecx + 0x10]
jb 0x40a6e0
call fcn.004a68c5
mov eax, dword [esp + 0x14]
mov ebx, dword [eax]
push eax
push edi
lea edi, [esp + 0x20]
call fcn.0040b750
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x40a739
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40a710
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx]
mov edi, dword [ebx + 8]
push eax
push edx
call fcn.0040b1a0
mov eax, dword [ebx + 4]
test eax, eax
je 0x40a720
push eax
call fcn.004a4a7f
add esp, 4
mov eax, dword [ebx + 8]
test eax, eax
je 0x40a730
push eax
call fcn.004a4a7f
add esp, 4
push ebx
call fcn.004a4a1a
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
mov ecx, dword [edi]
jmp 0x40a594
mov ecx, dword [edi]
jmp 0x40a626
mov ecx, dword [edi]
jmp 0x40a6d2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebx + 0x388]
cmp eax, 0x2710
jbe 0x40a780
mov esi, ebx
call fcn.0040a7a0
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
push ebx
mov ecx, ebp
mov dword [ebx + 0x1c], 2
call fcn.0040ab60
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4