Function at 0x497b20
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e1e2
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x5c5244]
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 edi, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x230], eax
test edi, edi
je 0x497e88
test esi, esi
je 0x497e88
xor eax, eax
cmp ax, word [esi]
je 0x497e88
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004f39e0
add esp, 0xc
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x22c]
cmp dword [ebp + 0x18], 0
je 0x497bc8
push 0x20119
jmp 0x497bcd
push 0x20219
push esi
push edi
call fcn.0042e900
test eax, eax
jne 0x497e56
lea eax, [ebp - 0x220]
mov dword [ebp - 0x220], 0x104
push eax
lea eax, [ebp - 0x218]
push eax
push ebx
lea ecx, [ebp - 0x22c]
call fcn.00498ca0
test eax, eax
jne 0x497e56
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x21c]
call fcn.0042b850
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x21c]
call fcn.004995b0
lea ecx, [ebp - 0x21c]
call fcn.00499660
mov eax, dword [ebp - 0x21c]
cmp dword [eax - 0xc], 0
jne 0x497c56
xor esi, esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x21c]
call fcn.00427700
jmp 0x497e58
push 1
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00472e30
mov byte [ebp - 4], 2
mov ecx, 0x56e350
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x497c9b
test dx, dx
je 0x497c97
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x497c9b
add eax, 4
add ecx, 4
test dx, dx
jne 0x497c75
xor esi, esi
jmp 0x497ca0
sbb esi, esi
or esi, 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x220]
call fcn.00427700
test esi, esi
jne 0x497cef
mov eax, dword [ebp - 0x21c]
lea ecx, [ebp - 0x21c]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00487170
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x21c]
push eax
call fcn.00427b10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x220]
call fcn.00427700
push 1
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00487170
mov byte [ebp - 4], 4
mov ecx, 0x56e350
mov eax, dword [eax]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x497d36
test dx, dx
je 0x497d32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x497d36
add eax, 4
add ecx, 4
test dx, dx
jne 0x497d10
xor esi, esi
jmp 0x497d3b
sbb esi, esi
or esi, 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x220]
call fcn.00427700
test esi, esi
jne 0x497d8a
mov eax, dword [ebp - 0x21c]
lea ecx, [ebp - 0x21c]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00472e30
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x21c]
push eax
call fcn.00427b10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x220]
call fcn.00427700
mov ebx, dword [ebp - 0x230]
test ebx, ebx
je 0x497e37
cmp word [ebx], 0
je 0x497e37
mov edx, dword [ebp - 0x21c]
mov ecx, 1
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x497dd2
push 0x104
lea ecx, [ebp - 0x21c]
call fcn.00429130
mov edx, dword [ebp - 0x21c]
cmp dword [edx - 8], 0x104
jl 0x497ea6
mov dword [edx - 0xc], 0x104
xor ecx, ecx
mov eax, dword [ebp - 0x21c]
push ebx
push edx
mov word [eax + 0x208], cx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [ebp - 0x21c]
push dword [eax - 8]
push eax
call fcn.00510553
mov edx, eax
add esp, 8
test edx, edx
js 0x497ea6
mov ecx, dword [ebp - 0x21c]
cmp edx, dword [ecx - 8]
jg 0x497ea6
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x21c]
mov word [eax + edx*2], cx
push dword [ebp - 0x21c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x21c]
call fcn.00427700
jmp 0x497e58
xor esi, esi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x22c]
test eax, eax
je 0x497e7a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov eax, esi
jmp 0x497e8a
xor eax, eax
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.004da3bd
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004225f0
int3