Function at 0x416770
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file

Disassembly:
push 0xffffffffffffffff
push 0x5b7b6c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2b0
push ebx
mov ebx, dword [esp + 0x2d0]
push ebp
mov ebp, dword [esp + 0x2cc]
push esi
mov esi, dword [esp + 0x2d4]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push edi
mov edi, dword [esp + 0x2d0]
push ebx
push esi
push ecx
push eax
push edi
push str.SaveLib2_dwType_0x_x__dwRecordSize_0x_x___dwStoreFlag_0x_x__lpBuff_0x_x___dwSize_0x_x_
push str.CheckModule
push 0xf
push 0x642404
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], ecx
call fcn.004439a0
mov ecx, dword [0x61cab0]
xor eax, eax
add esp, 0x24
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
lea edx, [esp + 0xb8]
mov dword [esp + 0x2c8], eax
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [esp + 0xbc]
push edi
push eax
lea ecx, [esp + 0x20]
push str._sopl__lu__lu.tmp
push ecx
call fcn.0059a7f7
mov edx, dword [esp + 0x28]
add esp, 0x14
push edx
push str.SaveLib2_temp__s_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
xor eax, eax
add esp, 0x14
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
cmp ebx, dword [ebp + 8]
ja 0x416a0a
lea ecx, [esp + 0x24]
call fcn.0059c526
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2d0], 1
call fcn.0059c586
mov edi, dword [esp + 0x28]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
push ecx
mov ecx, 0x639d50
call fcn.0042b1c0
mov edx, dword [esp + 0x2c]
mov esi, eax
push esi
push edx
push ebx
push str.CSDUserCfgTrans_Trans_Src_size_0x_x__Encrypt_size_0x_x__bEncrypt__lu_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
add esp, 0x1c
test esi, esi
je 0x416914
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
ja 0x416914
push eax
call fcn.0059e258
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x416918
mov ecx, dword [ebp + 8]
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x1c], 1
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov eax, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp]
mov edx, dword [esp + 0x2c]
mov dword [ecx], edx
jmp 0x416918
mov ebx, dword [esp + 0x20]
lea ecx, [esp + 0x24]
mov byte [esp + 0x2c8], 0
call fcn.0059c559
test ebx, ebx
je 0x416a0a
mov esi, dword [ebp + 4]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov ebp, dword [ebp]
push 1
push esi
push eax
push ecx
lea ecx, [esp + 0x50]
call fcn.0043a7c0
push str.SaveLib2_Open
push str.CheckModule
push 0xf
push 0x642404
mov byte [esp + 0x2d8], 2
call fcn.004439a0
mov edx, dword [esp + 0x24]
add esp, 0x10
lea ecx, [esp + 0x40]
push 0
push edx
call fcn.0043a930
test eax, eax
mov dword [esp + 0x18], eax
je 0x4169f0
push str.SaveLib2_WriteExtraHead
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
add esp, 0x10
lea ecx, [esp + 0x40]
push esi
push ebp
call fcn.0043bb60
test eax, eax
mov dword [esp + 0x18], eax
je 0x4169e7
push str.SaveLib2_Append
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
mov eax, dword [esp + 0x2c]
add esp, 0x10
lea ecx, [esp + 0x40]
push eax
push ebx
call fcn.0043c0a0
lea ecx, [esp + 0x40]
mov dword [esp + 0x18], eax
call fcn.0043c330
lea ecx, [esp + 0x40]
call fcn.0043b3b0
push ebx
call fcn.0059e281
add esp, 4
lea ecx, [esp + 0x40]
mov byte [esp + 0x2c8], 0
call fcn.0043a8b0
mov ecx, dword [0x61cab0]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x2d0]
mov byte [esp + 0x2c8], 3
push edx
call fcn.004100c0
add esp, 4
test eax, eax
jne 0x416a5b
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c8], al
call fcn.0059db8f
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c8], 0xffffffff
call fcn.0059db8f
xor eax, eax
jmp 0x416b21
push eax
mov eax, dword [0x639d18]
push eax
lea ecx, [esp + 0x18]
push str._s_tsafedoc_s
push ecx
call fcn.0059a7f7
mov edx, dword [esp + 0x20]
add esp, 0x10
push edx
push str.SaveLib2_dst__s_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
mov eax, dword [esp + 0x2c]
add esp, 0x14
test eax, eax
jne 0x416abe
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x416ab1
mov esi, 1
jmp 0x416ae0
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x416ade
mov eax, dword [0x639d2c]
mov edx, dword [esp + 0x10]
neg eax
sbb eax, eax
and eax, 2
add eax, 3
push eax
mov eax, dword [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, eax
push esi
push str.SaveLib2_ret__lu_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c8], 0
call fcn.0059db8f
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c8], 0xffffffff
call fcn.0059db8f
mov eax, esi
mov ecx, dword [esp + 0x2c0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2bc
ret