Function at 0x4221e0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b5f4c
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x4e43e0]
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 - 0x224], eax
test edi, edi
je 0x42257a
test esi, esi
je 0x42257a
xor eax, eax
cmp ax, word [esi]
je 0x42257a
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004421a0
add esp, 0xc
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
cmp dword [ebp + 0x18], 0
mov ecx, 0x20219
mov eax, 0x20119
mov dword [ebp - 4], 0
cmove eax, ecx
lea ecx, [ebp - 0x230]
push eax
push esi
push edi
call fcn.0040ce20
test eax, eax
jne 0x422563
lea eax, [ebp - 0x220]
mov dword [ebp - 0x220], 0x104
push eax
lea eax, [ebp - 0x218]
push eax
push ebx
lea ecx, [ebp - 0x230]
call fcn.00422e90
test eax, eax
jne 0x422563
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00406da0
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 1
call fcn.00424750
lea ecx, [ebp - 0x21c]
call fcn.00424800
mov esi, dword [ebp - 0x21c]
or ebx, 0xffffffff
mov eax, dword [esi - 0xc]
test eax, eax
jne 0x42230b
xor edi, edi
jmp 0x422548
cmp eax, 1
jg 0x422321
lea eax, [esi - 0x10]
push eax
call fcn.004073b0
add esp, 4
add eax, 0x10
jmp 0x422341
lea ecx, [ebp - 0x21c]
call fcn.004141d0
push eax
push 1
push esi
lea ecx, [ebp - 0x220]
call fcn.004201f0
mov eax, dword [ebp - 0x220]
mov edx, 0x4c26c8
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x42236e
test si, si
je 0x42236a
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x42236e
add ecx, 4
add edx, 4
test si, si
jne 0x422348
xor esi, esi
jmp 0x422373
sbb esi, esi
or esi, 1
lea edx, [eax - 0x10]
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42238a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x4223dc
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.00423930
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 2
call fcn.00407100
mov edx, dword [ebp - 0x220]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4223dc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x21c]
mov edi, dword [esi - 0xc]
cmp edi, 1
jg 0x4223fb
add esi, 0xfffffff0
push esi
call fcn.004073b0
add esp, 4
add eax, 0x10
jmp 0x422421
lea ecx, [ebp - 0x21c]
call fcn.004141d0
push eax
lea eax, [esi - 2]
push 1
lea eax, [eax + edi*2]
push eax
lea ecx, [ebp - 0x220]
call fcn.004201f0
mov eax, dword [ebp - 0x220]
mov edx, 0x4c26c8
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x42244e
test si, si
je 0x42244a
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x42244e
add ecx, 4
add edx, 4
test si, si
jne 0x422428
xor esi, esi
jmp 0x422453
sbb esi, esi
or esi, 1
lea edx, [eax - 0x10]
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42246a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x4224bc
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.00422a80
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 3
call fcn.00407100
mov edx, dword [ebp - 0x220]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4224bc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x224]
test esi, esi
je 0x422534
cmp word [esi], 0
je 0x422534
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 0x4224fc
push 0x104
lea ecx, [ebp - 0x21c]
call fcn.00404850
mov edx, dword [ebp - 0x21c]
cmp dword [edx - 8], 0x104
jl 0x422598
mov dword [edx - 0xc], 0x104
xor ecx, ecx
mov eax, dword [ebp - 0x21c]
push esi
push edx
mov word [eax + 0x208], cx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x21c]
call fcn.00422f90
push dword [ebp - 0x21c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [ebp - 0x21c]
mov edi, eax
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x422565
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x422565
xor edi, edi
mov eax, dword [ebp - 0x230]
test eax, eax
je 0x422576
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x42257c
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.0042a228
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004031c0
int3