Function at 0x422220
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b5f9c
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 0x4225ba
test esi, esi
je 0x4225ba
xor eax, eax
cmp ax, word [esi]
je 0x4225ba
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004421e0
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 0x4225a3
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.00422ed0
test eax, eax
jne 0x4225a3
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00406da0
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 1
call fcn.00424790
lea ecx, [ebp - 0x21c]
call fcn.00424840
mov esi, dword [ebp - 0x21c]
or ebx, 0xffffffff
mov eax, dword [esi - 0xc]
test eax, eax
jne 0x42234b
xor edi, edi
jmp 0x422588
cmp eax, 1
jg 0x422361
lea eax, [esi - 0x10]
push eax
call fcn.004073b0
add esp, 4
add eax, 0x10
jmp 0x422381
lea ecx, [ebp - 0x21c]
call fcn.004141d0
push eax
push 1
push esi
lea ecx, [ebp - 0x220]
call fcn.00420230
mov eax, dword [ebp - 0x220]
mov edx, 0x4c26c8
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x4223ae
test si, si
je 0x4223aa
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x4223ae
add ecx, 4
add edx, 4
test si, si
jne 0x422388
xor esi, esi
jmp 0x4223b3
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 0x4223ca
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x42241c
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.00423970
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 0x42241c
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 0x42243b
add esi, 0xfffffff0
push esi
call fcn.004073b0
add esp, 4
add eax, 0x10
jmp 0x422461
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.00420230
mov eax, dword [ebp - 0x220]
mov edx, 0x4c26c8
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x42248e
test si, si
je 0x42248a
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x42248e
add ecx, 4
add edx, 4
test si, si
jne 0x422468
xor esi, esi
jmp 0x422493
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 0x4224aa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x4224fc
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.00422ac0
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 0x4224fc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x224]
test esi, esi
je 0x422574
cmp word [esi], 0
je 0x422574
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 0x42253c
push 0x104
lea ecx, [ebp - 0x21c]
call fcn.00404850
mov edx, dword [ebp - 0x21c]
cmp dword [edx - 8], 0x104
jl 0x4225d8
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.00422fd0
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 0x4225a5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4225a5
xor edi, edi
mov eax, dword [ebp - 0x230]
test eax, eax
je 0x4225b6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x4225bc
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.0042a265
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004031c0
int3