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

Disassembly:
push 0xffffffffffffffff
push 0x492716
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x4ae7cc]
xor eax, esp
mov dword [esp + 0x100], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ae7cc]
xor eax, esp
push eax
lea eax, [esp + 0x11c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x12c]
xor ebp, ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ebp
mov eax, dword [eax + 0x30]
mov dword [esp + 0x20], ebp
cmp eax, ebp
jbe 0x4048fc
jmp 0x4042a0
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x2c]
mov edx, dword [esp + 0x20]
mov esi, dword [ecx + edx*4]
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
mov ecx, esi
mov dword [esp + 0x2c], esi
call edx
test al, al
je 0x4048e6
mov eax, dword [esi + 0xc]
cmp eax, ebp
jne 0x4042d2
mov eax, dword [0x4b1eac]
mov eax, dword [eax + 0xc]
mov edx, dword [0x4ae2cc]
mov edi, dword [eax + 8]
mov eax, dword [edx + 0xc]
mov ecx, 0x4ae2cc
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ecx, 0x499520
mov dword [esp + 0x124], 1
test ecx, 0xffff0000
jne 0x404326
mov edx, ecx
movzx esi, dx
push esi
call fcn.00402610
mov ecx, eax
add esp, 4
cmp ecx, ebp
je 0x404338
lea eax, [esp + 0x18]
push eax
mov eax, esi
call fcn.004027c0
jmp 0x404338
push 0x499520
xor ebx, ebx
lea eax, [esp + 0x1c]
call fcn.004029e0
xor ebp, ebp
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edi
push edx
mov dword [esp + 0x130], 2
call fcn.00419990
add esp, 0xc
mov esi, eax
mov byte [esp + 0x124], 3
mov eax, dword [esi]
cmp dword [eax - 4], 1
jle 0x404372
mov eax, dword [eax - 0xc]
push eax
push esi
call fcn.004028c0
mov eax, dword [esi]
xor ecx, ecx
mov word [esp + 0x6c], cx
mov edi, 7
mov ecx, eax
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], ebp
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bp
jne 0x404390
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x70]
call fcn.004072c0
mov byte [esp + 0x124], 4
xor edx, edx
mov word [esp + 0x88], dx
push ebp
or eax, 0xffffffff
mov ecx, esi
lea edx, [esp + 0x8c]
mov dword [esp + 0xa0], edi
mov dword [esp + 0x9c], ebp
call fcn.00402520
mov ebx, 8
mov byte [esp + 0x124], 6
cmp dword [esp + 0x80], ebx
jb 0x4043fe
mov eax, dword [esp + 0x6c]
push eax
call fcn.00475405
add esp, 4
xor ecx, ecx
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], ebp
mov word [esp + 0x6c], cx
mov byte [esp + 0x124], 7
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404438
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x124], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40445f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + 0xc]
cmp eax, ebp
jne 0x404473
mov edx, dword [0x4b1eac]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax + 0x10]
lea eax, [esp + 0xc0]
push eax
call fcn.004125e0
add esp, 4
mov byte [esp + 0x124], 9
cmp dword [eax + 0x14], ebx
jb 0x404495
mov eax, dword [eax]
xor ecx, ecx
mov word [esp + 0x34], cx
mov ecx, eax
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ebp
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
cmp dx, bp
jne 0x4044b0
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x38]
call fcn.004072c0
lea edx, [esp + 0xdc]
push edx
mov ebx, esi
lea ecx, [esp + 0x8c]
mov byte [esp + 0x128], 0xa
call fcn.00410a40
mov ecx, eax
xor edi, edi
push edi
or eax, 0xffffffff
lea edx, [esp + 0x8c]
mov byte [esp + 0x128], 0xb
call fcn.00402520
mov ebx, 8
mov byte [esp + 0x124], 0xa
cmp dword [esp + 0xf0], ebx
jb 0x404529
mov eax, dword [esp + 0xdc]
push eax
call fcn.00475405
add esp, 4
xor ecx, ecx
mov esi, 7
mov byte [esp + 0x124], 9
mov dword [esp + 0xf0], esi
mov dword [esp + 0xec], edi
mov word [esp + 0xdc], cx
cmp dword [esp + 0x48], ebx
jb 0x404561
mov edx, dword [esp + 0x34]
push edx
call fcn.00475405
add esp, 4
xor eax, eax
mov byte [esp + 0x124], bl
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], edi
mov word [esp + 0x34], ax
cmp dword [esp + 0xd4], ebx
jb 0x404590
mov ecx, dword [esp + 0xc0]
push ecx
call fcn.00475405
add esp, 4
mov ebp, dword [esp + 0x2c]
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], edi
mov word [esp + 0xc0], dx
cmp eax, edi
jne 0x4045bb
mov eax, dword [0x4b1eac]
mov eax, dword [eax + 8]
mov ecx, dword [eax + 0xc]
lea edx, [esp + 0xa4]
push edx
call fcn.004125e0
add esp, 4
mov byte [esp + 0x124], 0xc
cmp dword [eax + 0x14], ebx
jb 0x4045dd
mov eax, dword [eax]
xor ecx, ecx
mov word [esp + 0x50], cx
mov ecx, eax
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], edi
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x4045f1
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x54]
call fcn.004072c0
lea edx, [esp + 0xf8]
push edx
mov ebx, esi
lea ecx, [esp + 0x8c]
mov byte [esp + 0x128], 0xd
call fcn.00410a40
mov ecx, eax
xor edi, edi
push edi
or eax, 0xffffffff
lea edx, [esp + 0x8c]
mov byte [esp + 0x128], 0xe
call fcn.00402520
mov ebx, 8
mov byte [esp + 0x124], 0xd
cmp dword [esp + 0x10c], ebx
jb 0x40466a
mov eax, dword [esp + 0xf8]
push eax
call fcn.00475405
add esp, 4
xor ecx, ecx
mov esi, 7
mov byte [esp + 0x124], 0xc
mov dword [esp + 0x10c], esi
mov dword [esp + 0x108], edi
mov word [esp + 0xf8], cx
cmp dword [esp + 0x64], ebx
jb 0x4046a2
mov edx, dword [esp + 0x50]
push edx
call fcn.00475405
add esp, 4
xor eax, eax
mov byte [esp + 0x124], bl
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], edi
mov word [esp + 0x50], ax
cmp dword [esp + 0xb8], ebx
jb 0x4046d1
mov ecx, dword [esp + 0xa4]
push ecx
call fcn.00475405
add esp, 4
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [esp + 0xb8], esi
mov dword [esp + 0xb4], edi
mov word [esp + 0xa4], dx
cmp eax, edi
jne 0x4046f8
mov eax, dword [0x4b1eac]
mov eax, dword [eax + 8]
mov ecx, dword [eax + 0x10]
lea edx, [esp + 0xdc]
push edx
call fcn.004125e0
add esp, 4
mov byte [esp + 0x124], 0xf
cmp dword [eax + 0x14], ebx
jb 0x40471a
mov eax, dword [eax]
xor ecx, ecx
mov word [esp + 0x34], cx
mov ecx, eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], edi
lea esi, [ecx + 2]
mov edi, edi
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x404730
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x38]
call fcn.004072c0
lea edx, [esp + 0xc0]
push edx
mov ebx, esi
lea ecx, [esp + 0x8c]
mov byte [esp + 0x128], 0x10
call fcn.00410a40
mov ecx, eax
xor ebx, ebx
push ebx
or eax, 0xffffffff
lea edx, [esp + 0x8c]
mov byte [esp + 0x128], 0x11
call fcn.00402520
mov edi, 8
mov byte [esp + 0x124], 0x10
cmp dword [esp + 0xd4], edi
jb 0x4047a9
mov eax, dword [esp + 0xc0]
push eax
call fcn.00475405
add esp, 4
xor ecx, ecx
mov esi, 7
mov byte [esp + 0x124], 0xf
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], ebx
mov word [esp + 0xc0], cx
cmp dword [esp + 0x48], edi
jb 0x4047e1
mov edx, dword [esp + 0x34]
push edx
call fcn.00475405
add esp, 4
xor eax, eax
mov byte [esp + 0x124], 8
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov word [esp + 0x34], ax
cmp dword [esp + 0xf0], edi
jb 0x404811
mov ecx, dword [esp + 0xdc]
push ecx
call fcn.00475405
add esp, 4
mov eax, dword [esp + 0x88]
cmp dword [esp + 0x9c], edi
jae 0x404828
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404886
mov ecx, dword [esp + 0x88]
cmp dword [esp + 0x9c], edi
jae 0x40484b
lea ecx, [esp + 0x88]
lea edx, [esp + 0x28]
push edx
call fcn.00402a80
mov eax, dword [esp + 0x28]
or dword [esp + 0x1c], 1
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x404886
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404886
mov ecx, dword [esp + 0x28]
push 4
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov bl, 1
jmp 0x404888
xor bl, bl
test byte [esp + 0x1c], 1
je 0x4048b4
mov eax, dword [esp + 0x28]
and dword [esp + 0x1c], 0xfffffffe
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4048b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4048c0
mov ecx, dword [esp + 0x24]
mov byte [ecx + 4], 1
mov dword [esp + 0x124], 0xffffffff
cmp dword [esp + 0x9c], edi
jb 0x4048e4
mov edx, dword [esp + 0x88]
push edx
call fcn.00475405
add esp, 4
xor ebp, ebp
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [ecx + 0x30]
jb 0x4042a0
mov edx, dword [esp + 0x24]
mov dword [esp + 0x20], ebp
cmp dword [edx + 0x50], ebp
jbe 0x404d31
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x4c]
mov edx, dword [esp + 0x20]
mov ebp, dword [ecx + edx*4]
mov eax, dword [ebp]
mov edx, dword [eax + 0x10]
mov ecx, ebp
call edx
test al, al
je 0x404d1b
mov eax, dword [ebp + 0x28]
xor ebx, ebx
cmp eax, ebx
jne 0x40493e
mov eax, dword [0x4b1eb0]
mov eax, dword [eax + 0x28]
mov edx, dword [0x4ae2cc]
mov edi, dword [eax + 8]
mov eax, dword [edx + 0xc]
mov ecx, 0x4ae2cc
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ecx, 0x499520
mov dword [esp + 0x124], 0x13
test ecx, 0xffff0000
jne 0x404992
mov edx, ecx
movzx esi, dx
push esi
call fcn.00402610
mov ecx, eax
add esp, 4
cmp ecx, ebx
je 0x4049a2
lea eax, [esp + 0x18]
push eax
mov eax, esi
call fcn.004027c0
jmp 0x4049a2
push 0x499520
xor ebx, ebx
lea eax, [esp + 0x1c]
call fcn.004029e0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edi
push edx
mov dword [esp + 0x130], 0x14
call fcn.00419990
add esp, 0xc
mov byte [esp + 0x124], 0x16
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
cmp dword [eax - 4], 1
jle 0x404a04
mov ecx, dword [eax - 0xc]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.004028c0
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov word [esp + 0x50], cx
mov edi, 7
mov ecx, eax
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
lea esi, [ecx + 2]
lea ecx, [ecx]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x404a20
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x54]
call fcn.004072c0
mov byte [esp + 0x124], 0x17
xor edx, edx
mov word [esp + 0x34], dx
push ebx
or eax, 0xffffffff
mov ecx, esi
lea edx, [esp + 0x38]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebx
call fcn.00402520
mov esi, 8
mov byte [esp + 0x124], 0x19
cmp dword [esp + 0x64], esi
jb 0x404a7f
mov eax, dword [esp + 0x50]
push eax
call fcn.00475405
add esp, 4
mov eax, dword [ebp + 0x28]
xor ecx, ecx
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
mov word [esp + 0x50], cx
cmp eax, ebx
jne 0x404a9e
mov edx, dword [0x4b1eb0]
mov eax, dword [edx + 0x28]
mov ecx, dword [eax + 0x10]
lea eax, [esp + 0xf8]
push eax
call fcn.004125e0
add esp, 4
mov byte [esp + 0x124], 0x1a
cmp dword [eax + 0x14], esi
jb 0x404ac0
mov eax, dword [eax]
xor ecx, ecx
mov word [esp + 0x6c], cx
mov ecx, eax
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x404ad7
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x70]
call fcn.004072c0
lea edx, [esp + 0xa4]
push edx
mov ebx, esi
lea ecx, [esp + 0x38]
mov byte [esp + 0x128], 0x1b
call fcn.00410a40
mov ecx, eax
xor ebx, ebx
push ebx
or eax, 0xffffffff
lea edx, [esp + 0x38]
mov byte [esp + 0x128], 0x1c
call fcn.00402520
mov edi, 8
mov byte [esp + 0x124], 0x1b
cmp dword [esp + 0xb8], edi
jb 0x404b4a
mov eax, dword [esp + 0xa4]
push eax
call fcn.00475405
add esp, 4
xor ecx, ecx
mov ebp, 7
mov byte [esp + 0x124], 0x1a
mov dword [esp + 0xb8], ebp
mov dword [esp + 0xb4], ebx
mov word [esp + 0xa4], cx
cmp dword [esp + 0x80], edi
jb 0x404b85
mov edx, dword [esp + 0x6c]
push edx
call fcn.00475405
add esp, 4
xor eax, eax
mov byte [esp + 0x124], 0x19
mov dword [esp + 0x80], ebp
mov dword [esp + 0x7c], ebx
mov word [esp + 0x6c], ax
cmp dword [esp + 0x10c], edi
jb 0x404bb8
mov ecx, dword [esp + 0xf8]
push ecx
call fcn.00475405
add esp, 4
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x48], edi
jae 0x404bc6
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404bdb
shr eax, 4
and al, 1
cmp al, bl
jne 0x404c02
mov byte [esp + 0x124], 0x16
cmp dword [esp + 0x48], edi
jb 0x404bf6
mov edx, dword [esp + 0x34]
push edx
call fcn.00475405
add esp, 4
xor eax, eax
mov word [esp + 0x34], ax
jmp 0x404ce8
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x48], edi
jae 0x404c10
lea esi, [esp + 0x34]
mov edx, dword [0x4ae2cc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4ae2cc
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x124], 0x1d
cmp esi, ebx
je 0x404c5b
test esi, 0xffff0000
jne 0x404c5f
movzx esi, si
push esi
call fcn.00402610
mov ecx, eax
add esp, 4
cmp ecx, ebx
je 0x404c89
lea edx, [esp + 0x18]
push edx
mov eax, esi
call fcn.004027c0
jmp 0x404c89
xor eax, eax
jmp 0x404c73
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404c64
sub eax, edx
sar eax, 1
mov ebx, eax
push esi
lea eax, [esp + 0x1c]
call fcn.004029e0
mov ebp, 7
xor ebx, ebx
lea edi, [ebp + 1]
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x128], 0x1e
call fcn.00412940
mov byte [esp + 0x128], 0x19
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404cc6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x124], 0x16
cmp dword [esp + 0x48], edi
jb 0x404ce1
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00475405
add esp, 4
xor edx, edx
mov word [esp + 0x34], dx
mov dword [esp + 0x124], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404d1b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [ecx + 0x50]
jb 0x40490d
mov ecx, dword [esp + 0x11c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x100]
xor ecx, esp
call fcn.00475410
add esp, 0x114
ret 4