Function at 0x4068c0
Capabilities:
Create directory
Delete file
Extract resource via kernel32 functions
Get common file path
Move file
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x52067f
mov eax, dword fs:[0]
push eax
mov eax, 0x2758
call fcn.00506e40
mov eax, dword [0x576fe4]
xor eax, esp
mov dword [esp + 0x2754], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x576fe4]
xor eax, esp
push eax
lea eax, [esp + 0x276c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x277c]
mov ebx, ecx
xor edi, edi
push 0x103
lea eax, [esp + 0x165]
push edi
push eax
mov dword [esp + 0x2780], edi
mov byte [esp + 0x16c], 0
call fcn.00505810
add esp, 0xc
push 0x530041
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], edi
call fcn.00403850
mov ecx, dword [esp + 0x2780]
push str.temp
push ecx
lea edx, [esp + 0x20]
push 0x52fde4
push edx
mov byte [esp + 0x2784], 1
call fcn.00402f20
mov eax, dword [esp + 0x28]
add esp, 0x10
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0xa
push 1
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
push eax
push ebp
call fcn.004121e0
lea ecx, [esp + 0x40]
push ecx
mov esi, eax
push 0xffffffffffffffff
push esi
call fcn.00410140
mov eax, dword [esp + 0x4c]
add esp, 0x18
xor edi, edi
mov dword [esp + 0x2c], eax
test eax, eax
jle 0x406e1b
lea edx, [esp + 0x34]
push edx
push edi
push esi
call fcn.00410140
push 5
lea eax, [esp + 0x48]
push str.hipiw
push eax
call fcn.00507105
add esp, 0x18
test eax, eax
jne 0x406aea
push 0x103
push eax
lea ecx, [esp + 0x26d]
push ecx
mov byte [esp + 0x270], al
call fcn.00505810
add esp, 0xc
push 0x104
lea edx, [esp + 0x268]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x268]
push ecx
push 0x52fde4
lea edx, [esp + 0x16c]
push 0x104
push edx
call fcn.00505754
add esp, 0x14
lea eax, [esp + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x2784]
mov eax, dword [esp + 0x15c]
push ecx
lea edx, [esp + 0x164]
push edx
push eax
push edi
push esi
mov ecx, ebx
call fcn.00406580
test eax, eax
jne 0x406ea8
push 3
lea ecx, [esp + 0x164]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x406e10
push 0x3ff
push eax
lea edx, [esp + 0x371]
push edx
mov byte [esp + 0x374], al
call fcn.00505810
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x36c]
push str.Attribute_Set_Error____d__n
push eax
call fcn.00506b3f
lea ecx, [esp + 0x374]
push ecx
push 0x2d7
push str.CI3GSvcManagerApp::LoadFile
call fcn.00403910
add esp, 0x18
jmp 0x406e10
lea edx, [esp + 0x38]
push str.certfr_
push edx
call fcn.00504b80
add esp, 8
test eax, eax
je 0x406c58
push 0x530041
lea ecx, [esp + 0x24]
call fcn.00403850
mov eax, dword [esp + 0x2780]
push str.certfr
push eax
lea ecx, [esp + 0x28]
push 0x52fde4
push ecx
mov byte [esp + 0x2784], 2
call fcn.00402f20
mov edx, dword [esp + 0x30]
add esp, 0x10
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x530041
lea ecx, [esp + 0x18]
call fcn.00403850
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x18]
push 0x52fde0
push ecx
mov byte [esp + 0x2780], 3
call fcn.00402f20
add esp, 0xc
push 0x5c
push 0x2f
lea ecx, [esp + 0x1c]
call fcn.00402680
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x2780]
push edx
push eax
push 0x52fde4
lea ecx, [esp + 0x16c]
push 0x104
push ecx
call fcn.00505754
push 0xfff
lea edx, [esp + 0x781]
push 0
push edx
mov byte [esp + 0x788], 0
call fcn.00505810
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x188]
push edx
lea eax, [esp + 0x794]
push str.Step0_Path____s___File_Name____s___Replace____s_
push eax
call fcn.00506b3f
lea ecx, [esp + 0x79c]
push ecx
push 0x2ef
push str.CI3GSvcManagerApp::LoadFile
call fcn.00403910
mov edx, dword [esp + 0x27c4]
mov ecx, dword [esp + 0x19c]
add esp, 0x40
push edx
lea eax, [esp + 0x164]
push eax
push ecx
push edi
push esi
mov ecx, ebx
call fcn.00406580
test eax, eax
jne 0x406f11
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x2774], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406c4f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
jmp 0x406dec
mov edx, dword [esp + 0x2780]
lea ecx, [esp + 0x38]
push ecx
push edx
push 0x52fde4
lea eax, [esp + 0x16c]
push 0x104
push eax
call fcn.00505754
add esp, 0x14
push 0x530041
lea ecx, [esp + 0x20]
call fcn.00403850
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x38]
push ecx
push edx
lea eax, [esp + 0x24]
push 0x52fde4
push eax
mov byte [esp + 0x2784], 4
call fcn.00402f20
push 0xfff
lea ecx, [esp + 0x177d]
push 0
push ecx
mov byte [esp + 0x1784], 0
call fcn.00505810
mov edx, dword [esp + 0x38]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x184]
push ecx
lea edx, [esp + 0x1790]
push str.Step1_Path____s___File_Name____s___Temp_Path____s_
push edx
call fcn.00506b3f
lea eax, [esp + 0x1798]
push eax
push 0x30a
push str.CI3GSvcManagerApp::LoadFile
call fcn.00403910
mov ecx, dword [esp + 0x27c0]
mov eax, dword [esp + 0x58]
add esp, 0x3c
push ecx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x38], esp
mov ebp, esp
push eax
call fcn.00401c50
add esp, 4
add eax, 0x10
lea edx, [esp + 0x168]
push edx
mov dword [ebp], eax
mov eax, dword [esp + 0x168]
push eax
push edi
push esi
mov ecx, ebx
call fcn.00406640
test eax, eax
je 0x406de8
push 0x530041
lea ecx, [esp + 0x28]
mov dword [esp + 0x2c], 1
call fcn.00403850
mov edx, dword [esp + 0x2780]
lea ecx, [esp + 0x38]
push ecx
push edx
lea eax, [esp + 0x2c]
push str._s___s
push eax
mov byte [esp + 0x2784], 5
call fcn.00402f20
mov ecx, dword [esp + 0x34]
add esp, 0x10
push ecx
lea edx, [esp + 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov eax, dword [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 4
push 0
push eax
call ebp
mov edx, dword [esp + 0x1c]
push 5
lea ecx, [esp + 0x164]
push ecx
push edx
call ebp
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x2774], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406de8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x2774], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e10
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc edi
cmp edi, dword [esp + 0x2c]
jl 0x4069c7
push esi
call fcn.00412250
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x2774], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2780]
add eax, 0xfffffff0
mov dword [esp + 0x2774], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e7a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x276c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2754]
xor ecx, esp
call fcn.0050534a
add esp, 0x2764
ret 0xc
push esi
call fcn.00412250
add esp, 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x2774], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406ed9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2780]
add eax, 0xfffffff0
mov dword [esp + 0x2774], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f07
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x406e7e
push esi
call fcn.00412250
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x2774], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f42
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x2774], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406eb1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406eb1