Function at 0x412ee0
Capabilities:
Check if file exists
Create directory
Delete file
Move file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x509ffd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x6c
mov eax, dword [0x546330]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.004131a0
test al, al
jne 0x412fd5
push 0x1d
xorps xmm0, xmm0
mov dword [ebp - 0x64], 0
push str.failed_to_install_certificate
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x60], 0
movups xmmword [ebp - 0x74], xmm0
call fcn.00405590
mov dword [ebp - 4], 0
mov ecx, dword [esi + 0x1bc]
test ecx, ecx
je 0x412f80
lea edx, [ebp - 0x74]
mov dword [ebp - 0x78], 0
push edx
lea edx, [ebp - 0x78]
mov dword [ebp - 0x7c], 2
mov eax, dword [ecx]
push edx
lea edx, [ebp - 0x7c]
push edx
call dword [eax + 8]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x60]
cmp ecx, 8
jb 0x412fc1
mov edx, dword [ebp - 0x74]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x412fb7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413187
push ecx
push edx
call fcn.004bd6ef
add esp, 8
xor eax, eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
push str.liveupd
lea edx, [esi + 0x144]
lea ecx, [ebp - 0x5c]
call fcn.00414420
add esp, 4
mov dword [ebp - 4], 1
cmp dword [ebp - 0x4c], 0
je 0x413024
cmp dword [ebp - 0x48], 8
lea eax, [ebp - 0x5c]
cmovae eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x413024
cmp dword [ebp - 0x48], 8
lea eax, [ebp - 0x5c]
push 0
cmovae eax, dword [ebp - 0x5c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push str.updatecfg.ini
lea edx, [esi + 0x34]
lea ecx, [ebp - 0x2c]
call fcn.00414420
add esp, 4
push str.updatecfg.ini
lea edx, [ebp - 0x5c]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x44]
call fcn.00414420
add esp, 4
cmp dword [ebp - 0x1c], 0
je 0x41309a
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41309a
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x30], 8
lea ecx, [ebp - 0x44]
lea eax, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x44]
cmp dword [ebp - 0x18], 8
push ecx
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ecx, dword [ebp - 0x30]
cmp ecx, 8
jb 0x4130d4
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4130ca
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41318c
push ecx
push edx
call fcn.004bd6ef
add esp, 8
mov ecx, dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
cmp ecx, 8
jb 0x41311e
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x413114
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41318c
push ecx
push edx
call fcn.004bd6ef
add esp, 8
mov ecx, dword [ebp - 0x48]
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp ecx, 8
jb 0x413168
mov edx, dword [ebp - 0x5c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41315e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41318c
push ecx
push edx
call fcn.004bd6ef
add esp, 8
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004bd6ac
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004e61e1
call fcn.004e61e1
int3