Function at 0x40dd30
Capabilities:
Delete file
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x2b8
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea eax, [esi + 0x5678]
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [esp + 0x2cc]
mov edx, dword [esi]
mov ecx, 0xab
xor eax, eax
lea edi, [esp + 0x1c]
mov ebp, 1
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 4]
mov ecx, esi
mov dword [esp + 0x1c], 0x8994
mov dword [esp + 0x2a4], ebp
mov dword [esp + 0x2a8], ebp
mov edi, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0
call dword [edx]
test eax, eax
jne 0x40dd9e
xor edi, edi
jmp 0x40ded1
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x40df06
mov eax, dword [esi + 0x52e8]
mov ecx, dword [ebx + 0x24]
cmp eax, ecx
mov eax, dword [esi + 0x5194]
mov dword [esp + 0x2a4], ebp
mov dword [esp + 0x2a8], ebp
mov dword [esp + 0x20], 0
je 0x40de03
test eax, eax
je 0x40dddd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esi + 0x52ec]
mov dword [esi + 0x5194], 0
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor edi, edi
mov dword [esp + 0x20], 0x6c6b1
jmp 0x40dea7
test eax, eax
je 0x40dea7
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebp
push 0
push 0
push 3
push 0
lea edi, [esi + 0x52ec]
push 3
push 0xc0000000
push edi
mov dword [esi + 0x5194], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
mov dword [esi + 0x5194], eax
je 0x40de73
cmp eax, 0xffffffff
je 0x40de73
lea edx, [esi + 0x51ac]
lea ecx, [esi + 0x51a4]
push edx
lea edx, [esi + 0x519c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x40de73
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x5194]
push eax
call ebp
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
mov dword [esi + 0x5194], 0
call ebp
mov ecx, dword [esi + 0x5198]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
call ebp
mov edi, 1
mov edx, dword [esi]
mov ecx, esi
call dword [edx]
test eax, eax
je 0x40dec6
mov ecx, dword [esi + 0x5694]
lea eax, [esp + 0x1c]
push 0x2ac
push eax
call fcn.004263b0
test edi, edi
je 0x40ded1
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x40deec
mov eax, dword [esi + 0x5194]
test eax, eax
je 0x40dee2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x5194], 0
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2b8
ret 4
mov eax, dword [esi + 0x561c]
test eax, eax
je 0x40df68
mov eax, dword [esi + 0x5620]
cmp eax, ebp
jne 0x40df40
mov ecx, dword [esi + 0x562c]
test ecx, ecx
je 0x40df40
mov edx, dword [ebx + 0x14]
push edx
call fcn.00419450
mov ecx, dword [esi + 0x562c]
push ebp
push eax
lea eax, [ebx + 0x28]
push eax
call fcn.00418cf0
jmp 0x40df68
test eax, eax
jne 0x40df68
mov ecx, dword [esi + 0x5628]
test ecx, ecx
je 0x40df68
mov edx, dword [ebx + 0x14]
push edx
call fcn.00419450
lea ecx, [ebx + 0x28]
push eax
push ecx
push ecx
mov ecx, dword [esi + 0x5628]
call fcn.004180e0
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x5194]
lea eax, [esp + 0x14]
push 0
lea ebp, [ebx + 0x28]
push eax
push ecx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40dfd0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
call ebx
test eax, eax
mov dword [esp + 0x20], eax
jne 0x40dfa3
mov dword [esp + 0x20], 2
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
test eax, eax
jne 0x40dfb4
xor edi, edi
jmp 0x40ded1
lea ecx, [esp + 0x1c]
push 0x2ac
push ecx
mov ecx, dword [esi + 0x5694]
call fcn.004263b0
xor edi, edi
jmp 0x40ded1
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 0x52e8]
push edx
push ebp
push eax
call fcn.004174d0
add esp, 0xc
mov dword [esi + 0x52e8], eax
jmp 0x40deca