Function at 0x4019b0
Capabilities:
Check if file exists
Delete directory
Delete file
Extract resource via kernel32 functions
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x304
mov eax, dword [0x41c004]
xor eax, esp
mov dword [esp + 0x300], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x1c], eax
test edi, edi
je 0x401ed3
test eax, eax
je 0x401ed3
xorps xmm0, xmm0
mov dword [esp + 0x80], 0
lea eax, [esp + 0x80]
movq qword [esp + 0x84], xmm0
push eax
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0
movq qword [esp + 0x98], xmm0
mov dword [esp + 0xa0], 0
call dword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
je 0x401a45
cmp eax, 0x720
jne 0x401ed3
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
je 0x401a62
cmp eax, 0x720
jne 0x401ed3
lea edx, [esp + 0x80]
lea ecx, [esp + 0xd0]
call fcn.004010c0
cmp dword [esp + 0xe0], 0
jne 0x401a87
or esi, 0xffffffff
jmp 0x401ea0
lea edx, [esp + 0x90]
lea ecx, [esp + 0xe8]
call fcn.004010c0
cmp dword [esp + 0xf8], 0
je 0x401e91
push 0xa
push 0x65
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x401e91
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x401e91
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0x18], eax
test eax, eax
je 0x401e91
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x401e91
push 0x208
lea eax, [esp + 0x104]
push 0
push eax
call fcn.00405660
add esp, 0xc
lea eax, [esp + 0x100]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x401e91
lea eax, [esp + 0x100]
push eax
lea ecx, [esp + 0x24]
call fcn.004021a0
cmp dword [esp + 0x34], 8
lea ecx, [esp + 0x20]
mov eax, dword [esp + 0x30]
cmovae ecx, dword [esp + 0x20]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x401b5f
push 0x4198f8
lea ecx, [esp + 0x24]
call fcn.00402090
lea eax, [esp + 0xd0]
push 0x4198fc
push eax
lea ecx, [esp + 0x40]
call fcn.00402ff0
add esp, 4
lea ecx, [esp + 0x54]
mov edx, eax
call fcn.00402f30
add esp, 4
lea ecx, [esp + 0x20]
push 0xffffffffffffffff
push 0
push eax
call fcn.00402a90
lea ecx, [esp + 0x50]
call fcn.004020e0
lea ecx, [esp + 0x38]
call fcn.004020e0
cmp dword [esp + 0x34], 8
lea ecx, [esp + 0x20]
cmovae ecx, dword [esp + 0x20]
call fcn.00401540
test al, al
jne 0x401bce
lea ecx, [esp + 0x20]
or esi, 0xffffffff
call fcn.004020e0
jmp 0x401e94
push 0x419904
lea ecx, [esp + 0x54]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
call fcn.004021a0
push str.DOWNLOADER.INI
lea ecx, [esp + 0x3c]
call fcn.004021a0
lea eax, [esp + 0x38]
push eax
push 0x4198f8
lea edx, [esp + 0x28]
lea ecx, [esp + 0xc0]
call fcn.00402e20
add esp, 4
lea ecx, [esp + 0x6c]
mov edx, eax
call fcn.004030c0
add esp, 4
lea ecx, [esp + 0xb8]
call fcn.004020e0
cmp dword [esp + 0x7c], 8
lea ecx, [esp + 0x68]
lea eax, [esp + 0x38]
cmovae ecx, dword [esp + 0x68]
lea edx, [esp + 0x50]
cmp dword [esp + 0x4c], 8
push ecx
cmovae eax, dword [esp + 0x3c]
mov ecx, edi
cmp dword [esp + 0x68], 8
push eax
cmovae edx, dword [esp + 0x58]
call fcn.004018c0
add esp, 8
test eax, eax
je 0x401c81
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x10]
call fcn.00401ef0
lea ecx, [esp + 0x68]
call fcn.004020e0
lea ecx, [esp + 0x38]
call fcn.004020e0
lea ecx, [esp + 0x50]
call fcn.004020e0
push str.INSTALLER.MSI
lea ecx, [esp + 0x54]
call fcn.004021a0
push str.KSU.MSI
lea ecx, [esp + 0x6c]
call fcn.004021a0
lea eax, [esp + 0x68]
push eax
push 0x4198f8
lea edx, [esp + 0x28]
lea ecx, [esp + 0xc0]
call fcn.00402e20
add esp, 4
lea ecx, [esp + 0x3c]
mov edx, eax
call fcn.004030c0
add esp, 4
lea ecx, [esp + 0xb8]
call fcn.004020e0
cmp dword [esp + 0x4c], 8
lea esi, [esp + 0x38]
lea eax, [esp + 0x68]
mov ecx, edi
cmovae esi, dword [esp + 0x38]
lea edx, [esp + 0x50]
cmp dword [esp + 0x7c], 8
push esi
cmovae eax, dword [esp + 0x6c]
cmp dword [esp + 0x68], 8
push eax
cmovae edx, dword [esp + 0x58]
call fcn.004018c0
add esp, 8
test eax, eax
je 0x401d37
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x10]
call fcn.00401ef0
lea ecx, [esp + 0x38]
call fcn.004020e0
lea ecx, [esp + 0x68]
call fcn.004020e0
lea ecx, [esp + 0x50]
call fcn.004020e0
push str..exe
lea eax, [esp + 0xec]
push eax
push 0x419974
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x5c]
call fcn.00402e20
add esp, 4
lea ecx, [esp + 0xc0]
mov edx, eax
call fcn.004030c0
add esp, 4
lea ecx, [esp + 0xa4]
mov edx, eax
call fcn.00402f30
add esp, 4
lea ecx, [esp + 0xb8]
call fcn.004020e0
lea ecx, [esp + 0x50]
call fcn.004020e0
cmp dword [esp + 0xb4], 8
lea edx, [esp + 0xa0]
push dword [esp + 0x18]
cmovae edx, dword [esp + 0xa4]
lea ecx, [esp + 0x24]
cmp dword [esp + 0x38], 8
push ebx
push dword [esp + 0x24]
cmovae ecx, dword [esp + 0x2c]
call fcn.00401350
add esp, 0xc
lea eax, [esp + 0xa0]
lea ecx, [esp + 0xc]
push eax
call fcn.00401ef0
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
cmp esi, ebx
je 0x401e5a
nop
xor edi, edi
cmp dword [esi + 0x14], 8
jb 0x401e0c
mov eax, dword [esi]
jmp 0x401e0e
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x401e53
cmp edi, 4
je 0x401e3c
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 5
jb 0x401e02
jmp 0x401e53
cmp dword [esi + 0x14], 8
jb 0x401e46
mov eax, dword [esi]
jmp 0x401e48
mov eax, esi
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
add esi, 0x18
cmp esi, ebx
jne 0x401e00
cmp dword [esp + 0x34], 8
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [esp + 0xa0]
xor esi, esi
call fcn.004020e0
lea ecx, [esp + 0xc]
call fcn.00402200
lea ecx, [esp + 0x20]
call fcn.004020e0
jmp 0x401e94
or esi, 0xffffffff
lea ecx, [esp + 0xe8]
call fcn.004020e0
mov ecx, dword [esp + 0xe4]
cmp ecx, 8
jb 0x401eba
inc ecx
push ecx
push dword [esp + 0xd4]
call fcn.00402720
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x300]
xor ecx, esp
call fcn.004033cd
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 0x30c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004033cd
mov esp, ebp
pop ebp
ret 0x10