Function at 0x416540
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f8d0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x5d2fec]
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
push 0
mov dword [ebp - 4], 0
call fcn.00557010
add esp, 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x34], edx
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0
push str._Y_m_d
push eax
call fcn.004173f0
push 0x5b2524
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x2c], 0
call fcn.004173f0
mov byte [ebp - 4], 2
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x4165cf
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 3
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x4165f3
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 4
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x105
or eax, ecx
jge 0x416626
push 0x105
lea ecx, [ebp - 0x1c]
call fcn.00406e60
mov esi, dword [ebp - 0x1c]
cmp dword [esi - 8], 0x105
jge 0x416639
push 0x80070057
call fcn.00407010
push 0x105
xor eax, eax
mov dword [esi - 0xc], 0x105
push esi
push eax
mov word [esi + 0x20a], ax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push esi
call fcn.005512e5
add esp, 8
test eax, eax
jne 0x41666a
or eax, 0xffffffff
jmp 0x41666e
sub eax, esi
sar eax, 1
inc eax
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00405b70
mov byte [ebp - 4], 5
lea ecx, [edi - 0x10]
mov edx, dword [eax]
or ebx, 0xffffffff
mov dword [ebp - 0x28], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x3c], eax
cmp eax, ecx
je 0x4166e2
cmp dword [ecx + 0xc], 0
lea edi, [ecx + 0xc]
jl 0x4166d3
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x4166d3
push dword [ebp - 0x3c]
call fcn.00406c80
add esp, 4
mov dword [ebp - 0x3c], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x4166cb
mov edi, dword [ebp - 0x28]
push edi
mov ecx, dword [edi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x3c]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
jmp 0x4166e2
push dword [edx - 0xc]
lea ecx, [ebp - 0x18]
push edx
call fcn.00406bd0
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 4
mov eax, ebx
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x416700
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00405ab0
push str._DelFile.log
push eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 6
push eax
call fcn.00406a20
add esp, 0x18
mov byte [ebp - 4], 8
mov eax, ebx
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41674c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x5afd40
lea eax, [ebp + 8]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00406a20
add esp, 0xc
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
jne 0x4167c1
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
je 0x4167bc
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x28], 0xfeff
push ecx
push 2
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
je 0x41680f
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x30]
push 0
push edx
mov eax, dword [ecx - 0xc]
add eax, eax
push eax
push ecx
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x20]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x416829
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov eax, ebx
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x416847
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x416862
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41687d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41689b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4168b9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4168d8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.0054e73a
mov esp, ebp
pop ebp
ret