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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e786
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x426050]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
lea esi, [ebp - 0x434]
mov dword [ebp - 0x440], eax
call fcn.00405410
xor edi, edi
mov dword [ebp - 4], edi
mov esi, dword [ebp - 0x434]
call fcn.004047f0
cmp eax, 0x100000
ja 0x40554b
mov eax, dword [ebp - 0x434]
call fcn.00404ff0
test eax, eax
je 0x405558
mov ecx, dword [ebp - 0x434]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x434]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ecx, ecx
cmp eax, edi
sete cl
cmp eax, edi
mov dword [ebp - 0x430], edi
mov eax, 0x42115c
mov esi, ecx
jne 0x405582
mov eax, 0x42105c
mov edx, dword [ebp - 0x434]
push eax
push edx
lea eax, [ebp - 0x430]
push eax
call fcn.0040bdd8
add esp, 0xc
test eax, eax
je 0x4055bf
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x434]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x405837
cmp esi, edi
mov ebx, 1
mov byte [ebp - 4], bl
je 0x4055f4
mov ecx, dword [ebp - 0x430]
push ecx
push ebx
lea edx, [ebp - 0x438]
push 2
push edx
mov byte [ebp - 0x438], 0xff
mov byte [ebp - 0x437], 0xfe
call fcn.0040c7cd
add esp, 0x10
jmp 0x405606
mov eax, dword [ebp - 0x430]
push 2
push edi
push eax
call fcn.0040ccdd
add esp, 0xc
push 0x206
lea ecx, [ebp - 0x222]
push edi
push ecx
mov word [ebp - 0x224], di
call fcn.0040dae0
lea edx, [ebp - 0x44c]
add esp, 0xc
push edx
call fcn.0040b7da
add esp, 4
lea eax, [ebp - 0x44c]
push eax
lea ecx, [ebp - 0x470]
push ecx
call fcn.0040b255
lea edx, [ebp - 0x470]
push edx
lea eax, [ebp - 0x224]
push 0x104
push eax
call fcn.0040cd7c
add esp, 0x14
push 0x42107c
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimW]
lea eax, [ebp - 0x224]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x405680
sub eax, edx
mov edx, dword [ebp - 0x430]
push edx
sar eax, 1
push ebx
add eax, eax
push eax
lea ecx, [ebp - 0x224]
push ecx
call fcn.0040c7cd
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x206
lea edx, [ebp - 0x42a]
push edi
push edx
mov esi, eax
mov word [ebp - 0x42c], di
call fcn.0040dae0
add esp, 0xc
push esi
push str.___d_
lea eax, [ebp - 0x42c]
push 0x104
push eax
call fcn.0040ac78
lea eax, [ebp - 0x42c]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4056f0
mov ecx, dword [ebp - 0x430]
sub eax, edx
push ecx
sar eax, 1
lea edx, [eax + eax]
push ebx
push edx
lea eax, [ebp - 0x42c]
push eax
call fcn.0040c7cd
mov eax, 0x421170
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x405722
mov ecx, dword [ebp - 0x430]
sub eax, edx
push ecx
sar eax, 1
push ebx
lea edx, [eax + eax]
push edx
push 0x421170
call fcn.0040c7cd
mov ecx, dword [ebp - 0x440]
add esp, 0x10
lea eax, [ebp - 0x43c]
push eax
call fcn.00402130
push 0xd
lea ecx, [ebp - 0x43c]
push ecx
mov byte [ebp - 4], 2
call fcn.00406a90
push 0xa
lea edx, [ebp - 0x43c]
push edx
call fcn.00406a90
mov edx, dword [ebp - 0x43c]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x405787
mov ecx, dword [ebp - 0x430]
sub eax, esi
push ecx
sar eax, 1
push ebx
add eax, eax
push eax
push edx
call fcn.0040c7cd
mov eax, 0x421178
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4057b2
mov ecx, dword [ebp - 0x430]
sub eax, edx
push ecx
sar eax, 1
push ebx
lea edx, [eax + eax]
push edx
push 0x421178
call fcn.0040c7cd
mov eax, dword [ebp - 0x430]
push eax
call fcn.0040d0c0
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x43c]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40580b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x430]
push ecx
call fcn.0040c151
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x434]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405843
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0040ac69
mov esp, ebp
pop ebp
ret