Function at 0x40104c
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
mov eax, dword [0x4241d0]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
xor eax, eax
mov word [esp + 0x40], ax
mov eax, ebx
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x401080
sub eax, edx
sar eax, 1
push eax
push ebx
lea esi, [esp + 0x44]
call fcn.00401853
push 9
push str._json_err
mov eax, esi
call fcn.00401496
cmp eax, 0xffffffff
je 0x40115c
push dword [esp + 0x50]
mov eax, esi
push 5
push str.path
call fcn.00401496
mov ebx, eax
mov eax, esi
add ebx, 5
push eax
lea esi, [esp + 0x60]
call fcn.0040138a
mov eax, dword [esp + 0x5c]
push 8
pop ebx
cmp dword [esp + 0x70], ebx
jae 0x4010e4
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40114a
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x70], ebx
jae 0x4010fd
lea eax, [esp + 0x5c]
push eax
lea esi, [esp + 0x18]
lea edi, [esp + 0x10]
call fcn.00402621
cmp dword [esp + 0x10], 0
pop ecx
je 0x401135
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x70], ebx
jae 0x401121
lea eax, [esp + 0x5c]
push 0
push eax
call fcn.004034fe
push dword [esp + 0x14]
call fcn.0040b6f5
add esp, 0xc
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x70], ebx
jae 0x401143
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
xor ebx, ebx
lea esi, [esp + 0x5c]
call fcn.0040155f
jmp 0x401326
call section..text
test eax, eax
je 0x401326
push 2
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
cmp dword [section..share], edi
jne 0x401326
cmp ebx, edi
je 0x401326
push ebx
lea eax, [esp + 0x1c]
push eax
call fcn.004025dc
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], edi
je 0x40131e
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push 0x426ef8
call fcn.004025a8
inc dword [section..share]
push 4
call fcn.0040b917
pop ecx
cmp eax, edi
je 0x4011c9
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x4011cb
xor eax, eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
push eax
lea edi, [esp + 0x20]
call fcn.00401428
lea esi, [esp + 0x10]
call fcn.00402184
mov eax, dword [0x4262cc]
mov ecx, 0x4262cc
call dword [eax + 0xc]
mov ebx, eax
add ebx, 0x10
xor edi, edi
mov dword [esp + 0xc], ebx
cmp dword [esp + 0x38], edi
jbe 0x4012a1
push edi
lea eax, [esp + 0x20]
call fcn.004013b5
mov eax, dword [eax]
sub eax, 0x10
call fcn.00401775
push dword [esp + 0x10]
mov esi, eax
add esi, 0x10
mov ecx, esi
mov dword [esp + 0x18], esi
call fcn.004059b5
pop ecx
lea eax, [esp + 0x58]
push eax
push 0
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x401260
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
jmp 0x401264
xor eax, eax
xor ecx, ecx
mov edx, eax
or edx, ecx
je 0x401277
test ecx, ecx
jl 0x401288
jg 0x401277
cmp eax, 0xfa000
jbe 0x401288
lea eax, [esi - 0x10]
call fcn.004026d1
inc edi
cmp edi, dword [esp + 0x38]
jb 0x401218
jmp 0x4012a1
lea eax, [esp + 0x14]
lea edi, [esp + 0xc]
call fcn.00401349
lea eax, [esi - 0x10]
call fcn.004026d1
mov ebx, dword [esp + 0xc]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4012e3
push dword [esp + 0x10]
lea esi, [esp + 0x18]
lea edi, [esp + 0x10]
call fcn.00402621
cmp dword [esp + 0x10], 0
pop ecx
je 0x4012dc
push 1
push dword [esp + 0x14]
call fcn.004034fe
push dword [esp + 0x14]
call fcn.0040b6f5
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
dec dword [section..share]
lea eax, [ebx - 0x10]
call fcn.004026d1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
call fcn.004026d1
lea esi, [esp + 0x1c]
call fcn.00401688
push dword [esp + 0x1c]
call fcn.0040b54c
mov eax, dword [esp + 0x1c]
pop ecx
add eax, 0xfffffff0
call fcn.004026d1
push 1
xor ebx, ebx
lea esi, [esp + 0x40]
call fcn.0040155f
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040b557
mov esp, ebp
pop ebp
ret 0x10