Function at 0x410820
Capabilities:
Delete file
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4a9e02
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1e4
push ebp
push esi
push edi
call fcn.00410500
mov ebp, eax
mov dword [esp + 0x24], ebp
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x410c7e
mov ecx, dword [ebp + 0x20]
mov eax, dword [ecx - 8]
test eax, eax
jne 0x41086f
mov edx, dword [ebp + 0x54]
mov eax, dword [edx - 8]
test eax, eax
je 0x410c7e
mov eax, dword [ebp + 0x58]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x410889
mov dword [esp + 0x10], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x41089f
mov eax, dword [0x4c0080]
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 0x58]
push ecx
lea ecx, [esp + 0x14]
call fcn.00403cc0
mov edx, dword [esp + 0x10]
mov dword [esp + 0x1f8], 0
push edx
call fcn.00410d10
add esp, 4
test eax, eax
jg 0x4108cb
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x410bba
mov eax, dword [0x4c0080]
push ebx
mov dword [esp + 0x1c], eax
xor ecx, ecx
mov byte [esp + 0x34], 0
mov dword [esp + 0x35], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x39], ecx
mov dword [esp + 0x3d], ecx
mov dword [esp + 0x41], ecx
mov word [esp + 0x45], cx
mov byte [esp + 0x47], cl
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x48]
push edx
push ecx
push edi
mov byte [esp + 0x208], 2
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x410a68
mov eax, dword [esp + 0x64]
test eax, eax
jne 0x410a68
mov eax, dword [esp + 0x68]
push eax
mov esi, eax
call fcn.00410ca0
mov ebp, eax
xor edx, edx
push 0x4c0a34
push edi
lea eax, [esi + ebp - 1]
div ebp
mov esi, eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x410a64
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
lea eax, [esi + esi*4]
shl eax, 2
push eax
mov dword [esp + 0x38], eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 8
lea ecx, [esp + 0x6c]
mov dword [esp + 0x24], eax
call fcn.00432f90
push ebx
push ebp
push 1
push edi
mov dword [esp + 0x3c], 0
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, eax
add esp, 0x10
test esi, esi
jle 0x4109ee
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x6c]
call fcn.00432fd0
push esi
push edi
lea ecx, [esp + 0x74]
call fcn.00433070
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x70]
call fcn.00432fe0
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x2c]
push ebx
push ebp
add eax, 0x14
add edx, esi
push 1
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x3c], edx
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, eax
add esp, 0x10
test esi, esi
jg 0x4109a3
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x6c]
call fcn.00432fd0
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x24]
push edx
push esi
lea ecx, [esp + 0x74]
call fcn.00433070
lea eax, [esp + 0x34]
lea ecx, [esp + 0x6c]
push eax
call fcn.00432fe0
push edi
call fcn.0049c000
push esi
call fcn.0049c000
add esp, 8
xor esi, esi
xor ecx, ecx
lea edx, [esp + 0x1c]
mov cl, byte [esp + esi + 0x34]
push ecx
push str._02X
push edx
call fcn.00403dd0
mov eax, dword [esp + 0x28]
add esp, 0xc
lea ecx, [esp + 0x18]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00404840
inc esi
cmp esi, 0x14
jl 0x410a33
mov ebp, dword [esp + 0x28]
lea ecx, [esp + 0xd4]
call fcn.0049c2a0
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x12d]
mov byte [esp + 0x12c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [0x4c0080]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [esp + 0x20], ecx
mov eax, dword [ebp + 0x58]
lea edx, [esp + 0x12c]
push edx
push eax
lea ecx, [esp + 0xdc]
mov byte [esp + 0x204], 4
call fcn.0049cf70
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
je 0x410b36
xor esi, esi
mov bl, 5
mov eax, dword [0x4c0080]
mov dword [esp + 0x10], eax
xor ecx, ecx
lea edx, [esp + 0x10]
mov cl, byte [esp + esi + 0x12c]
mov byte [esp + 0x1fc], bl
push ecx
push str._02X
push edx
call fcn.00403dd0
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea ecx, [esp + 0x20]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00404840
mov eax, dword [esp + 0x10]
mov edx, dword [0x4c0084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x410b30
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x410b30
mov edx, dword [esp + 0x10]
lea eax, [edx - 0xc]
push eax
call fcn.0049c000
add esp, 4
inc esi
cmp esi, 0x10
jl 0x410ac7
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 0x54]
mov esi, dword [sym.imp.MSVCRT.dll__wcsicmp]
push ecx
push eax
call esi
add esp, 8
test eax, eax
pop ebx
je 0x410bd5
mov edx, dword [esp + 0x1c]
mov ebp, dword [ebp + 0xa8]
push edx
push ebp
call esi
add esp, 8
test eax, eax
je 0x410bd5
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1f8], 3
call fcn.004046f0
lea ecx, [esp + 0xd0]
mov byte [esp + 0x1f8], 2
call fcn.0049c2b0
lea ecx, [esp + 0x14]
mov byte [esp + 0x1f8], 1
call fcn.004046f0
lea ecx, [esp + 0x18]
mov byte [esp + 0x1f8], 0
call fcn.004046f0
lea ecx, [esp + 0x10]
mov dword [esp + 0x1f8], 0xffffffff
call fcn.004046f0
mov al, 1
jmp 0x410c80
mov eax, dword [esp + 0x1c]
mov edx, dword [0x4c0084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x410c00
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x410c00
mov edx, dword [esp + 0x1c]
lea eax, [edx - 0xc]
push eax
call fcn.0049c000
add esp, 4
lea ecx, [esp + 0xd0]
mov byte [esp + 0x1f8], 2
call fcn.0049c2b0
mov eax, dword [esp + 0x14]
mov edx, dword [0x4c0084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x410c3f
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x410c3f
mov edx, dword [esp + 0x14]
lea eax, [edx - 0xc]
push eax
call fcn.0049c000
add esp, 4
mov eax, dword [esp + 0x18]
mov edx, dword [0x4c0084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x410c6a
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x410c6a
mov edx, dword [esp + 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.0049c000
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x1f8], 0xffffffff
call fcn.004046f0
xor al, al
mov ecx, dword [esp + 0x1f0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1f0
ret