Function at 0x10022300
Capabilities:
Check if file exists
Copy file
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10086903
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x100ad708]
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 esi, ecx
mov dword [ebp - 0x34], esi
xor ebx, ebx
push ebx
mov dword [ebp - 0x24], ebx
push dword [esi + 0x3c]
mov dword [esi + 0x24], 2
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov eax, dword [str.SafeLive.dll]
lea ecx, [esi + 0x30]
xor edi, edi
mov dword [ebp - 0x40], str.update.exe
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x4c], ecx
jmp 0x10022366
mov esi, dword [ebp - 0x34]
push 0x1008d094
push ecx
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
call fcn.10021890
add esp, 0xc
push 0x1008ccb4
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0
call fcn.100219d0
push dword [ebp + edi*4 - 0x40]
lea ecx, [ebp - 0x14]
call fcn.100219d0
mov dword [ebp - 0x18], 0
mov eax, dword [esi + 0x3c]
lea edi, [esi + 0x3c]
mov byte [ebp - 4], 1
mov dword [ebp - 0x20], 0
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x100223c7
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x100223db
call fcn.1000a7c0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
test eax, eax
je 0x100227d2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
or ebx, 2
mov dword [ebp - 0x24], ebx
lea esi, [eax + 0x10]
mov eax, dword [edi]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], eax
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x30], edi
lea edx, [edi + 1]
test edx, edx
js 0x100227dc
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x10022421
push edx
lea ecx, [ebp - 0x20]
call fcn.1000b890
mov esi, dword [ebp - 0x20]
add edi, edi
push edi
push dword [ebp - 0x28]
push edi
push esi
call fcn.10010a90
lea ecx, [edi + esi]
add esp, 0x10
test ecx, ecx
jne 0x1002244a
call fcn.1005e257
mov dword [eax], 0x16
call fcn.1005e17e
jmp 0x10022453
mov ax, word [0x1008ccb4]
mov word [ecx], ax
mov eax, dword [ebp - 0x30]
inc eax
cmp eax, dword [esi - 8]
jg 0x100227dc
mov edi, dword [ebp - 0x2c]
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + edi*4 - 0x40]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.10021890
add esp, 0xc
and ebx, 0xfffffffd
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x38], ebx
mov byte [ebp - 4], 3
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100224a6
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100224c9
push 0
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
or esi, 0xffffffff
jmp 0x10022703
mov esi, dword [ebp - 0x34]
mov byte [ebp - 4], 4
mov dword [ebp - 0x20], 0
mov eax, dword [esi + 0x30]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x100224ea
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x100224fe
call fcn.1000a7c0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
test eax, eax
je 0x100227d2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
or ebx, 8
mov dword [ebp - 0x24], ebx
lea edi, [eax + 0x10]
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x28], eax
mov esi, dword [eax - 0xc]
lea ebx, [esi + 1]
test ebx, ebx
js 0x100227dc
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x10022542
push ebx
lea ecx, [ebp - 0x20]
call fcn.1000b890
mov edi, dword [ebp - 0x20]
add esi, esi
push esi
push dword [ebp - 0x28]
push esi
push edi
call fcn.10010a90
lea ecx, [esi + edi]
add esp, 0x10
test ecx, ecx
jne 0x1002256b
call fcn.1005e257
mov dword [eax], 0x16
call fcn.1005e17e
jmp 0x10022574
mov ax, word [0x1008ccb4]
mov word [ecx], ax
cmp ebx, dword [edi - 8]
jg 0x100227dc
xor eax, eax
mov dword [edi - 0xc], ebx
mov word [edi + ebx*2], ax
mov ecx, dword [edi - 0x10]
mov dword [ebp - 0x30], eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 5
mov dword [ebp - 0x48], eax
test ecx, ecx
je 0x100225a3
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x100225b7
call fcn.1000a7c0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
test eax, eax
je 0x100227d2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
mov ecx, dword [ebp - 0x2c]
lea esi, [eax + 0x10]
mov eax, dword [ebp - 0x38]
or eax, 0x18
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + ecx*4 - 0x40]
test eax, eax
jne 0x100225df
xor ecx, ecx
jmp 0x100225f3
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100225e4
sub ecx, edx
sar ecx, 1
mov ebx, dword [edi - 0xc]
mov dword [ebp - 0x28], ecx
lea edx, [ecx + ebx]
mov dword [ebp - 0x38], edx
test edx, edx
js 0x100227dc
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x10022624
push edx
lea ecx, [ebp - 0x30]
call fcn.1000b890
mov esi, dword [ebp - 0x30]
add ebx, ebx
push ebx
push edi
push ebx
push esi
call fcn.10010a90
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
add eax, eax
push eax
mov ecx, dword [ebp + edx*4 - 0x40]
push ecx
push eax
lea eax, [ebx + esi]
push eax
call fcn.10010a90
mov eax, dword [ebp - 0x38]
add esp, 0x20
cmp eax, dword [esi - 8]
jg 0x100227dc
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea edi, [esi - 0x10]
mov ebx, dword [ebp - 0x14]
add ebx, 0xfffffff0
cmp edi, ebx
je 0x100226ad
cmp dword [ebx + 0xc], ecx
jl 0x100226a1
mov eax, dword [edi]
cmp eax, dword [ebx]
jne 0x100226a1
push edi
call fcn.1001b020
add esp, 4
lea edx, [ebx + 0xc]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10022699
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [esi + 0x10]
mov dword [ebp - 0x14], eax
jmp 0x100226ad
push dword [esi - 0xc]
lea ecx, [ebp - 0x14]
push esi
call fcn.1000b930
mov ebx, dword [ebp - 0x44]
or esi, 0xffffffff
and ebx, 0xffffffef
mov byte [ebp - 4], 4
mov dword [ebp - 0x24], ebx
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x100226d1
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x48]
and ebx, 0xfffffff7
mov dword [ebp - 0x24], ebx
mov eax, esi
mov byte [ebp - 4], 3
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100226f2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x18]
mov eax, esi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10022721
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x14]
mov eax, esi
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10022742
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x4c]
inc edi
mov dword [ebp - 0x2c], edi
cmp edi, 2
jl 0x10022363
mov edi, dword [ebp - 0x34]
push 0x1008ccb4
mov dword [ebp - 0x1c], 0
lea eax, [edi + 0x3c]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.10021890
add esp, 0xc
push str.update.ini
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 6
call fcn.100219d0
push 0
push dword [ebp - 0x1c]
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x100227b2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.1002ef19
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.10007f60
push 0x80070057
call fcn.10007f60
int3