Function at 0x401fda
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x304
mov eax, dword [0x41e280]
xor eax, esp
mov dword [esp + 0x300], eax
push ebx
push esi
push edi
mov edi, 0x400
lea esi, [esp + 0x44]
call fcn.0040132f
xor eax, eax
push 0x206
mov word [esp + 0x104], ax
xor ebx, ebx
lea eax, [esp + 0x106]
push ebx
push eax
call fcn.0040dc60
add esp, 0xc
mov esi, 0x208
push esi
mov dword [esp + 0x10], ebx
call fcn.00409788
pop ecx
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x40204a
push esi
push ebx
push eax
call fcn.0040dc60
add esp, 0xc
mov esi, 0x100
push esi
call fcn.00409788
pop ecx
mov dword [esp + 0x2c], eax
cmp eax, ebx
je 0x402069
push esi
push ebx
push eax
call fcn.0040dc60
add esp, 0xc
call fcn.00401131
mov edi, 0x94
push edi
mov dword [esp + 0x20], eax
lea eax, [esp + 0x6c]
push ebx
push eax
call fcn.0040dc60
add esp, 0xc
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0x6c], edi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
call fcn.00401131
cmp eax, 0x20
lea eax, [esp + 0xc]
push eax
call fcn.00402d5b
mov edi, dword [esp + 0x10]
pop ecx
cmp edi, ebx
je 0x4020c1
mov eax, dword [edi]
push edi
call dword [eax + 0x14]
test eax, eax
jbe 0x4020c1
mov eax, edi
call fcn.00401d3d
test dword [0x420440], esi
push str.___t69m_
lea eax, [esp + 0x3c]
push eax
seta byte [esp + 0x23]
call section..text
push dword [eax]
lea edi, [esp + 0x24]
call fcn.00401377
mov eax, dword [eax]
lea ecx, [esp + 0x100]
movzx edx, word [eax]
inc eax
mov word [ecx], dx
inc eax
inc ecx
inc ecx
cmp dx, bx
jne 0x4020ef
lea esi, [esp + 0x20]
call fcn.004013de
lea esi, [esp + 0x38]
call fcn.00401115
cmp dword [esp + 0x1c], 0x20
je 0x402177
push str._tiRSOOO5zghb
lea eax, [esp + 0x3c]
push eax
call section..text
push dword [eax]
lea edi, [esp + 0x24]
call fcn.00401377
mov eax, dword [eax]
mov edx, eax
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x402135
sub eax, edx
lea edi, [esp + 0x100]
dec edi
dec edi
mov cx, word [edi + 2]
inc edi
inc edi
cmp cx, bx
jne 0x40214a
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [esp + 0x20]
call fcn.004013de
lea esi, [esp + 0x38]
call fcn.00401115
push str._si_iez_ovURj
lea eax, [esp + 0x3c]
push eax
call section..text
push dword [eax]
lea edi, [esp + 0x24]
call fcn.00401377
mov eax, dword [eax]
mov edx, eax
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x402195
sub eax, edx
lea edi, [esp + 0x100]
dec edi
dec edi
mov cx, word [edi + 2]
inc edi
inc edi
cmp cx, bx
jne 0x4021aa
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [esp + 0x20]
call fcn.004013de
lea esi, [esp + 0x38]
call fcn.00401115
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x104]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov edi, dword [esp + 0x2c]
test eax, eax
jne 0x402304
mov esi, dword [esp + 0x10]
push ebx
push esi
mov ecx, edi
mov dword [esp + 0x24], 1
call fcn.00402b64
pop ecx
pop ecx
call fcn.00401987
push ebx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push ebx
push 3
push ebx
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x402250
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x40224a
cmp eax, 2
jne 0x402257
mov dword [esp + 0x1c], ebx
jmp 0x402257
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
call fcn.004019eb
pop ecx
cmp esi, ebx
je 0x402274
push 0x208
push ebx
push esi
call fcn.0040dc60
add esp, 0xc
cmp edi, ebx
je 0x402287
push 0x100
push ebx
push edi
call fcn.0040dc60
add esp, 0xc
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x1c], ebx
je 0x402304
push 0xffffffffffffffff
call fcn.0040140a
pop ecx
cmp edi, ebx
je 0x4022b9
push 0x100
push ebx
push edi
call fcn.0040dc60
add esp, 0xc
push edi
call fcn.004096ab
pop ecx
cmp esi, ebx
je 0x4022d3
push 0x208
push ebx
push esi
call fcn.0040dc60
add esp, 0xc
push esi
call fcn.004096ab
pop ecx
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x4022e1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea esi, [esp + 0x44]
call fcn.0040134e
or eax, 0xffffffff
mov ecx, dword [esp + 0x30c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040937e
mov esp, ebp
pop ebp
ret 0x10
lea eax, [esp + 0x4c]
push eax
call fcn.00404ae1
lea eax, [esp + 0x3c]
mov dword [esp], str.__j8Pw_1_1oR
push eax
call section..text
push dword [eax]
lea eax, [esp + 0x50]
push eax
call fcn.004025a8
lea esi, [esp + 0x38]
call fcn.00401115
cmp dword [esp + 0x64], 0x10
mov eax, dword [esp + 0x50]
jae 0x402343
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4023bc
cmp dword [esp + 0x64], 0x10
mov eax, dword [esp + 0x50]
jae 0x40235e
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4023bc
push 0xfffffffffffffff6
call fcn.0040140a
pop ecx
push ebx
push 1
lea ecx, [esp + 0x54]
call fcn.0040267e
cmp edi, ebx
je 0x402397
push 0x100
push ebx
push edi
call fcn.0040dc60
add esp, 0xc
push edi
call fcn.004096ab
pop ecx
cmp dword [esp + 0x10], ebx
je 0x4022d3
push 0x208
push ebx
push dword [esp + 0x18]
call fcn.0040dc60
add esp, 0xc
push dword [esp + 0x10]
jmp 0x4022cd
mov edi, 0x104
lea esi, [esp + 0x20]
call fcn.0040132f
mov eax, dword [esp + 0x20]
push eax
mov dword [eax], 0x202020
call fcn.00401ddc
pop ecx
test eax, eax
jne 0x402419
push 0xfffffffffffffffd
call fcn.0040140a
pop ecx
call fcn.0040134e
push ebx
push 1
lea ecx, [esp + 0x54]
call fcn.0040267e
cmp dword [esp + 0x2c], ebx
je 0x402397
push 0x100
push ebx
push dword [esp + 0x34]
call fcn.0040dc60
add esp, 0xc
push dword [esp + 0x2c]
jmp 0x402391
movzx eax, byte [esp + 0x1b]
mov edi, dword [esp + 0x2c]
push eax
push dword [esp + 0x14]
mov ecx, edi
call fcn.00402b64
push dword [esp + 0x18]
mov ecx, edi
call fcn.0040304c
add esp, 0xc
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, ebx
jge 0x4024ba
lea esi, [esp + 0x20]
call fcn.0040134e
push ebx
push 1
lea ecx, [esp + 0x54]
call fcn.0040267e
cmp edi, ebx
je 0x402477
push 0x100
push ebx
push edi
call fcn.0040dc60
add esp, 0xc
push edi
call fcn.004096ab
pop ecx
cmp dword [esp + 0x10], ebx
je 0x402499
push 0x208
push ebx
push dword [esp + 0x18]
call fcn.0040dc60
add esp, 0xc
push dword [esp + 0x10]
call fcn.004096ab
pop ecx
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x4024a7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or edi, 0xffffffff
lea esi, [esp + 0x44]
call fcn.0040134e
mov eax, edi
jmp 0x4022ed
mov esi, dword [esp + 0xc]
cmp esi, ebx
je 0x4024e9
mov eax, dword [esi]
push esi
call dword [eax + 0x14]
test eax, eax
jbe 0x4024e9
call fcn.00401987
push dword [esp + 0x10]
mov dword [esp + 0x2c], eax
call fcn.00402d03
pop ecx
push dword [esp + 0x28]
call fcn.004019eb
pop ecx
push edi
call fcn.004033e4
pop ecx
push dword [esp + 0x34]
mov dword [esp + 0x20], eax
call fcn.0040140a
mov eax, dword [ebp + 8]
cmp word [eax + 0x28], 0x37
pop ecx
jne 0x402514
cmp word [eax + 0x2a], 0x21
jne 0x402514
call fcn.00402f19
lea esi, [esp + 0x20]
call fcn.0040134e
push ebx
push 1
lea ecx, [esp + 0x54]
call fcn.0040267e
cmp edi, ebx
je 0x402543
push 0x100
push ebx
push edi
call fcn.0040dc60
add esp, 0xc
push edi
call fcn.004096ab
pop ecx
cmp dword [esp + 0x10], ebx
je 0x402565
push 0x208
push ebx
push dword [esp + 0x18]
call fcn.0040dc60
add esp, 0xc
push dword [esp + 0x10]
call fcn.004096ab
pop ecx
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x402573
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov edi, dword [esp + 0x1c]
jmp 0x4024aa