Function at 0x406840
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a2553
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x62e15c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x68], ebx
mov eax, dword [ebx]
or eax, dword [ebx + 4]
push 0
jne 0x4068ac
call fcn.00449ca1
mov ecx, dword [ebx + 8]
add esp, 4
shl ecx, 4
sub ecx, dword [ebx + 8]
shl ecx, 2
mov dword [ebx], eax
mov dword [ebx + 4], edx
test ecx, ecx
jle 0x4068b9
push ecx
push 0
call fcn.004291b0
cdq
add esp, 8
add dword [ebx], eax
adc dword [ebx + 4], edx
jmp 0x4068b9
call fcn.00449ca1
add esp, 4
mov dword [ebx], eax
mov dword [ebx + 4], edx
call fcn.0042607b
test al, al
je 0x4068e0
cmp dl, bl
cli
sub edi, dword [eax]
pushfd
mov ch, 0x51
salc
push edi
xchg edx, eax
cmp al, 0xcb
jae 0x40692f
dec ebp
invalid
xor eax, eax
mov dword [ebp - 0x2c], 0xf
push 0xffffffffffffffff
mov dword [ebp - 0x60], eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x5c], eax
lea eax, [ebx + 0x110]
push 0
push eax
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
call fcn.00401db0
cmp dword [ebx + 0x128], 0
mov dword [ebp - 4], 0
je 0x406a12
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
add byte [eax], al
mov word [ebp - 0x28], ax
push 1
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
sub esp, 0x18
lea ecx, [ebp - 0x40]
mov eax, esp
push ecx
push eax
call fcn.0043240c
mov ecx, dword [ebx + 0x128]
add esp, 8
push 0
call fcn.00403940
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4069e5
lea eax, [ebp - 0x5c]
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x406995
mov eax, dword [ecx]
jmp 0x406997
mov eax, ecx
xor edx, edx
push 0xffffffffffffffff
mov word [eax], dx
lea eax, [ebp - 0x28]
push edx
push eax
call fcn.00401fe0
call int.004274b2
mov dword [ebp - 0x60], eax
add esp, 0x1c
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0
cmp eax, 8
jb 0x4069cc
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402250
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jmp 0x406b21
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0
cmp eax, 8
jb 0x4069fe
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402250
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp dword [ebp - 0x30], 0
je 0x406b21
push 0x1869f
push 0x2710
call fcn.004291b0
add esp, 8
lea ecx, [ebp - 0x40]
mov esi, eax
push 1
push 0x5a7a10
call fcn.00406da0
push 5
push str.c251f
lea ecx, [ebp - 0x40]
call fcn.00406da0
push 1
push 0x5a7a1c
lea ecx, [ebp - 0x40]
call fcn.00406da0
mov eax, esi
cdq
push edx
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00428781
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.00406ca0
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 0
cmp eax, 0x10
jb 0x406a98
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00402200
lea ecx, [ebp - 0xa4]
call fcn.0043e601
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 3
cmovae eax, dword [ebp - 0x40]
push eax
call fcn.0043ea71
lea ecx, [ebp - 0xa4]
call fcn.0043ee40
mov esi, eax
mov ecx, 1
mov eax, dword [esi + 4]
sub eax, dword [esi]
cmove eax, ecx
mov dword [ebp - 0x5c], eax
inc eax
push eax
call fcn.0043ae66
mov ecx, dword [ebp - 0x5c]
mov edi, eax
inc ecx
mov dword [ebp - 0x60], edi
push ecx
push 0
push edi
call fcn.004463a0
mov ecx, dword [esi + 4]
add esp, 0x10
xor edx, edx
sub ecx, dword [esi]
je 0x406b12
mov eax, dword [esi]
mov al, byte [edx + eax]
mov byte [edx + edi], al
inc edx
mov eax, dword [esi + 4]
sub eax, dword [esi]
cmp edx, eax
jb 0x406b00
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 0
call fcn.0043e677
call fcn.00425edd
test al, al
je 0x406b3c
add ebx, dword [ecx + 0x7e0a9039]
cld
xchg dword [edx], esp
push eax
cmp eax, eax
xor byte [ebp + 0x5d], dl
stc
add ch, byte [esi]
call fcn.00425ba1
test al, al
je 0x406b60
cmpsb byte [esi], byte es:[edi]
in eax, dx
add ah, 0x29
fld dword [edx + 0x29]
push ds
cli
mov cl, 0x45
xchg esi, eax
sbb al, ch
or al, 0x16
mov dh, 0xbc
outsd dx, dword [esi]
xchg esi, eax
pop edi
in al, 0x39
pushfd
pushal
call fcn.00425ba1
test al, al
je 0x406b84
push edi
xchg dword [edi + 0x5b493daf], edi
insb byte es:[edi], dx
xor esi, dword [ebx - 0x74]
or al, 0x63
cld
imul byte [eax + 0x47]
push ebp
xor bh, byte [eax + edi*8 - 0x885293d]
add dword [edx - 0x725fa275], 0x8d509045
inc ebp
pushfd
mov ebx, dword [ebp - 0x60]
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 0
push eax
push dword [ebp - 0x5c]
mov dword [ebp - 0x70], 0
push ebx
call fcn.0043ee90
mov eax, dword [ebp - 0x64]
add esp, 0x10
test eax, eax
jne 0x406bcc
push 0x8d
call fcn.0042ac71
add esp, 4
test ebx, ebx
je 0x406be8
push ebx
call fcn.0043ae6f
add esp, 4
jmp 0x406be8
mov esi, dword [ebp - 0x68]
mov ecx, esi
push eax
call fcn.00406450
test ebx, ebx
je 0x406be4
push ebx
call fcn.0043ae6f
add esp, 4
mov byte [esi + 0xc], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x406c32
mov ecx, dword [ebp - 0x40]
inc eax
cmp eax, 0x1000
jb 0x406c29
test cl, 0x1f
je 0x406c05
call fcn.00448e21
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x406c11
call fcn.00448e21
sub ecx, eax
cmp ecx, 4
jae 0x406c1d
call fcn.00448e21
cmp ecx, 0x23
jbe 0x406c27
call fcn.00448e21
mov ecx, eax
push ecx
call fcn.0043abbd
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043ae55
mov esp, ebp
pop ebp
ret