Function at 0x408240
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4340a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], ecx
mov ebx, dword [esp + 0x54]
push ebx
mov dword [esp + 0x50], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40827f
lea eax, [ebx - 0x10]
jmp 0x40851e
lea ecx, [esp + 0x2c]
call fcn.004105ab
mov byte [esp + 0x4c], 1
call fcn.004273c8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x10], edi
push 0x437094
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov byte [esp + 0x58], 2
call fcn.00406000
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x54], 3
call fcn.00410640
mov esi, eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4082f1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test esi, esi
mov ebp, dword [sym.imp.KERNEL32.dll_MoveFileExW]
je 0x40847b
nop
lea ecx, [esp + 0x2c]
call fcn.004103e8
mov dword [esp + 0x24], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x30]
call fcn.0041092d
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
mov byte [esp + 0x4c], 4
je 0x408376
mov edx, dword [esi + 0xc]
test edx, edx
lea edi, [esi + 0xc]
jl 0x408364
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x408364
push eax
call fcn.00401500
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40835b
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
lea edi, [ebx + 0x10]
mov dword [esp + 0x10], edi
jmp 0x408376
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00401670
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408399
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x2c]
call fcn.0041056e
test eax, eax
jne 0x40846b
mov eax, dword [esp + 0x2c]
push 0x10
lea ecx, [esp + 0x30]
call dword [eax + 0x38]
test eax, eax
je 0x408420
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.004043f0
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x436674
push eax
push ecx
mov byte [esp + 0x5c], 5
call fcn.00406000
mov ecx, dword [esp + 0x1c]
call fcn.00408240
test eax, eax
mov eax, dword [esp + 0x1c]
sete bl
add eax, 0xfffffff0
mov byte [esp + 0x4c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408418
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
jne 0x4084ea
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004043f0
mov eax, dword [eax]
push 5
push 0
push eax
call ebp
mov ebx, eax
mov eax, dword [esp + 0x20]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408463
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
jne 0x4084ea
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x408300
mov ebx, dword [esp + 0x54]
push 4
push 0
push ebx
call ebp
mov esi, eax
lea eax, [edi - 0x10]
mov byte [esp + 0x4c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x4c], 0
call fcn.004105d1
lea eax, [ebx - 0x10]
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, esi
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 4
lea eax, [edi - 0x10]
mov byte [esp + 0x4c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408509
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x4c], 0
call fcn.004105d1
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40853d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebp
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x40
ret 4