Function at 0x476e7c
Capabilities:
Check if file exists
Copy file
Delete registry value
Move file

Disassembly:
push 0x24
mov eax, 0x4d0257
call fcn.004ae920
mov ebx, ecx
mov esi, edx
test byte [0x56d9f0], 1
jne 0x476ea6
or dword [0x56d9f0], 1
call fcn.00407527
mov dword [0x56d9ec], eax
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0x2001f
mov edi, 0xffffff00
cmp byte [esi], al
je 0x476eda
mov al, byte [ebx + 0x30]
xor ecx, ecx
test al, al
sete cl
dec ecx
and ecx, edi
add ecx, 0x2021f
mov dword [ebp - 0x18], ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Attempting_to_Run_Operation
call fcn.0040253e
call fcn.0044dcca
pop ecx
call fcn.00407727
mov eax, dword [ebx + 0x34]
dec eax
cmp eax, 8
ja case.default.0x476efe
jmp dword [eax*4 + 0x4776b4]
cmp dword [ebx + 0x1c], 0
jle 0x476f16
mov ecx, dword [ebx + 8]
cmp ecx, 1
mov eax, dword [ebx + 0x18]
jg 0x476f1b
call fcn.0048b094
mov ebx, dword [ebx + 4]
mov esi, dword [ebx + 4]
test ecx, ecx
jle 0x476f16
mov ebx, dword [ebx]
xor ecx, ecx
cmp dword [eax], ecx
sete cl
push ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x14], eax
call fcn.00407727
lea ecx, [ebp - 0x30]
call fcn.00411fc7
mov eax, dword [ebp - 0x14]
call fcn.004ae9f8
ret
mov ecx, dword [ebx + 8]
cmp ecx, 1
jle 0x476f16
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 4]
test ecx, ecx
jle 0x476f16
mov ebx, dword [ebx]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x476f37
cmp dword [ebx + 8], 0
jle 0x476f16
push dword [ebx + 4]
lea ecx, [ebp - 0x20]
call fcn.00402582
mov esi, dword [ebp - 0x20]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x476f9c
push dword [esi - 0xc]
push esi
call fcn.004070cb
movzx eax, al
mov dword [ebp - 0x14], eax
lea ecx, [esi - 0x10]
call fcn.00402883
jmp case.default.0x476efe
cmp dword [ebx + 0x1c], 1
jle 0x476f16
mov eax, dword [ebx + 0x18]
add eax, 4
mov eax, dword [eax]
call fcn.0047888b
cmp dword [ebx + 8], 0
mov edi, eax
jle 0x476f16
push dword [ebx + 4]
lea ecx, [ebp - 0x1c]
call fcn.00402582
mov byte [ebp - 4], 1
cmp dword [ebx + 8], 1
jle 0x476f16
mov eax, dword [ebx + 4]
add eax, 4
push eax
lea ecx, [ebp - 0x14]
call fcn.00402582
push ecx
mov byte [ebp - 4], 2
mov al, byte [ebx + 0x30]
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Attempting_to_Set_Registry_Value___32_bit
mov byte [ebp - 0x20], al
call fcn.0040253e
call fcn.0044dcca
cmp byte [ebp - 0x20], 0
pop ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
je 0x47703b
push str.Attempting_to_Backup_for_Set_Registry_Value___64_bit
call fcn.0040253e
call fcn.0044dcca
pop ecx
push dword [ebp - 0x20]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [esi + 8]
jmp 0x477056
push str.Attempting_to_Backup_for_Set_Registry_Value___32_bit
call fcn.0040253e
call fcn.0044dcca
pop ecx
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [esi + 4]
mov esi, edi
call fcn.0047e321
xor edx, edx
cmp dword [ebx + 8], edx
movzx esi, al
jle 0x476f16
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
xor edi, edi
inc edi
cmp dword [ebx + 0x1c], edi
jle 0x476f16
mov eax, dword [ebx + 0x18]
push edx
push edx
push dword [ebp - 0x18]
add eax, 4
mov eax, dword [eax]
push edx
push edx
push ecx
call fcn.0047888b
push eax
lea ecx, [ebp - 0x30]
call fcn.00478b0a
test eax, eax
jne 0x4770cf
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Key_Created
call fcn.0040253e
call fcn.0044dcca
xor esi, esi
cmp dword [ebx + 0x1c], esi
pop ecx
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
sub eax, esi
je 0x47713f
dec eax
je 0x477112
dec eax
dec eax
je 0x4770f4
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402883
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.00402883
lea ecx, [ebp - 0x30]
call fcn.00411fc7
mov eax, esi
jmp 0x476f4a
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x476f16
cmp ecx, edi
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x476f16
push 2
jmp 0x47715a
cmp dword [ebx + 0x1c], 2
jle 0x476f16
mov eax, dword [ebx + 0x18]
add eax, 8
cmp dword [ebx + 8], edi
jle 0x476f16
push dword [eax]
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + 4]
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.00478ab6
jmp 0x477168
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x476f16
cmp ecx, edi
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x476f16
push edi
mov ebx, dword [ebx + 4]
push eax
push ebx
lea eax, [ebp - 0x30]
push eax
call fcn.00478ad4
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Value_Set_ok_
mov esi, eax
call fcn.0040253e
call fcn.0044dcca
pop ecx
lea ecx, [ebp - 0x30]
call fcn.00411fc7
xor eax, eax
test esi, esi
sete al
mov esi, eax
jmp 0x4770cf
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Attempting_to_create_key
call fcn.0040253e
call fcn.0044dcca
xor eax, eax
cmp dword [ebx + 8], eax
pop ecx
jle 0x476f16
cmp dword [ebx + 0x1c], eax
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx]
jle 0x476f16
mov ebx, dword [ebx + 0x18]
push eax
push eax
push dword [ebp - 0x18]
push eax
push eax
mov eax, dword [ebx]
push ecx
call fcn.0047888b
push eax
lea ecx, [ebp - 0x30]
call fcn.00478b0a
test eax, eax
jne case.default.0x476efe
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.create_key_OK_
call fcn.0040253e
call fcn.0044dcca
pop ecx
lea ecx, [ebp - 0x30]
call fcn.00411fc7
mov dword [ebp - 0x14], 1
jmp case.default.0x476efe
cmp dword [ebx + 0x1c], 0
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
call fcn.0047888b
cmp dword [ebx + 8], 0
mov dword [ebp - 0x20], eax
jle 0x476f16
push dword [ebx + 4]
lea ecx, [ebp - 0x1c]
call fcn.00402582
mov byte [ebp - 4], 8
mov al, byte [ebx + 0x30]
mov byte [ebp - 0xd], al
call fcn.00460c64
xor ecx, ecx
cmp byte [ebp - 0xd], cl
sete cl
dec ecx
and ecx, edi
add ecx, 0x200
movzx edi, al
neg edi
sbb edi, edi
and edi, ecx
push ecx
or edi, 0x20019
cmp byte [ebp - 0xd], 0
mov ecx, esp
mov dword [ebp - 0x24], esp
je 0x47729a
push str.Attempting_to_Backup_for_Set_Registry_Value___64_bit
call fcn.0040253e
call fcn.0044dcca
test edi, edi
setne al
pop ecx
movzx eax, al
push eax
push dword [ebp - 0x1c]
push dword [esi + 8]
jmp 0x4772b9
push str.Attempting_to_Backup_for_Set_Registry_Value___32_bit
call fcn.0040253e
call fcn.0044dcca
test edi, edi
setne al
pop ecx
movzx eax, al
push eax
push dword [ebp - 0x1c]
push dword [esi + 4]
mov esi, dword [ebp - 0x20]
call fcn.0047e1c0
cmp dword [ebx + 8], 0
jle 0x476f16
cmp dword [ebx + 0x1c], 0
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
push ecx
call fcn.0047888b
push eax
mov eax, dword [ebp - 0x18]
lea edi, [ebp - 0x30]
call fcn.00411f8b
test eax, eax
jne 0x4773c5
mov ecx, edi
call fcn.00411fc7
push dword [ebp - 0x18]
xor esi, esi
cmp dword [ebx + 8], esi
jle 0x476f16
mov eax, dword [ebx + 4]
push ecx
mov dword [ebp - 0x24], esp
mov ecx, esp
push eax
call fcn.00402582
mov byte [ebp - 4], 9
cmp dword [ebx + 0x1c], esi
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
call fcn.0047888b
push eax
mov byte [ebp - 4], 8
call fcn.0047626e
xor ecx, ecx
add esp, 0xc
cmp eax, esi
sete cl
mov dword [ebp - 0x14], ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
cmp dword [ebp - 0x14], esi
je 0x47735d
push str.KEY_DELETED
jmp 0x477362
push str.KEY_NOT_DELETED
call fcn.0040253e
call fcn.0044dcca
pop ecx
cmp dword [0x56d9ec], esi
je 0x4773cc
cmp dword [ebx + 8], esi
jle 0x476f16
cmp dword [ebx + 0x1c], esi
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
push ecx
call fcn.0047888b
push eax
mov eax, dword [ebp - 0x18]
lea edi, [ebp - 0x30]
call fcn.00411f8b
test eax, eax
jne 0x4773cc
cmp dword [ebx + 8], esi
jle 0x476f16
push dword [ebx + 4]
mov ecx, 0x569544
push dword [0x56954c]
call fcn.0049618c
jmp 0x4773cc
mov dword [ebp - 0x14], 1
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.00402883
mov esi, dword [ebp - 0x14]
jmp 0x4770e5
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
xor esi, esi
push str.Attempting_to_Create_key_and_create_Value
mov dword [ebp - 0x14], esi
call fcn.0040253e
call fcn.0044dcca
cmp dword [ebx + 8], esi
pop ecx
jle 0x476f16
cmp dword [ebx + 0x1c], 1
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
jle 0x476f16
mov eax, dword [ebx + 0x18]
push esi
push esi
push dword [ebp - 0x18]
add eax, 4
mov eax, dword [eax]
push esi
push esi
push ecx
call fcn.0047888b
push eax
lea ecx, [ebp - 0x30]
call fcn.00478b0a
test eax, eax
jne case.default.0x476efe
xor edi, edi
cmp dword [ebx + 0x1c], edi
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
sub eax, edi
je 0x4774a4
dec eax
je 0x477476
dec eax
dec eax
jne 0x4770e5
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x476f16
cmp ecx, 1
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x476f16
push 2
jmp 0x4774c1
cmp dword [ebx + 0x1c], 2
jle 0x476f16
mov eax, dword [ebx + 0x18]
add eax, 8
cmp dword [ebx + 8], 1
jle 0x476f16
push dword [eax]
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + 4]
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.00478ab6
jmp 0x4774cf
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x476f16
cmp ecx, 1
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x476f16
push 1
mov ebx, dword [ebx + 4]
push eax
push ebx
lea eax, [ebp - 0x30]
push eax
call fcn.00478ad4
lea ecx, [ebp - 0x30]
mov esi, eax
call fcn.00411fc7
xor eax, eax
cmp esi, edi
sete al
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
mov dword [ebp - 0x14], eax
cmp eax, edi
je 0x477502
push str.Create_key_and_create_Value_done
call fcn.0040253e
call fcn.0044dcca
pop ecx
jmp case.default.0x476efe
push str.Create_key_and_create_Value_FAILED
jmp 0x4774f2
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Attempting_to_Delete_Value
call fcn.0040253e
call fcn.0044dcca
xor edi, edi
cmp dword [ebx + 0x1c], edi
pop ecx
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
call fcn.0047888b
cmp dword [ebx + 8], edi
mov dword [ebp - 0x20], eax
jle 0x476f16
push dword [ebx + 4]
lea ecx, [ebp - 0x14]
call fcn.00402582
mov byte [ebp - 4], 0xa
cmp dword [ebx + 8], 1
jle 0x476f16
mov eax, dword [ebx + 4]
add eax, 4
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402582
mov byte [ebp - 4], 0xb
mov al, byte [ebx + 0x30]
push ecx
mov byte [ebp - 0x24], al
mov ecx, esp
mov dword [ebp - 0x28], esp
test al, al
je 0x47759a
push str.Attempting_to_backup_Value_to_be_deleted___64_bit
call fcn.0040253e
call fcn.0044dcca
pop ecx
push dword [ebp - 0x24]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [esi + 8]
jmp 0x4775b4
push str.Attempting_to_backup_Value_to_be_deleted___32_bit
call fcn.0040253e
call fcn.0044dcca
pop ecx
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [esi + 4]
mov esi, dword [ebp - 0x20]
call fcn.0047e321
cmp dword [ebx + 8], edi
jle 0x476f16
push dword [ebx + 4]
lea ecx, [ebp - 0x24]
call fcn.00402582
mov byte [ebp - 4], 0xc
cmp dword [ebx + 0x1c], edi
jle 0x476f16
mov eax, dword [ebx + 0x18]
mov esi, dword [ebp - 0x24]
mov eax, dword [eax]
push esi
call fcn.0047888b
push eax
mov eax, dword [ebp - 0x18]
lea edi, [ebp - 0x30]
call fcn.00411f8b
test eax, eax
jne 0x47768d
call fcn.0048b151
push eax
lea ecx, [ebp - 0x18]
call fcn.00402821
mov byte [ebp - 4], 0xd
cmp dword [ebx + 8], 1
jle 0x476f16
mov eax, dword [ebx + 4]
add eax, 4
push eax
lea ecx, [ebp - 0x20]
call fcn.00402582
mov byte [ebp - 4], 0xe
cmp dword [ebx + 8], 1
jle 0x476f16
mov eax, dword [ebx + 4]
push dword [eax + 4]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edi, eax
neg edi
sbb edi, edi
inc edi
push ecx
mov ecx, esp
mov dword [ebp - 0x28], esp
je 0x47765d
push str.Value_Deleted_ok_
jmp 0x477662
push str.Value_Deleted_failed_
call fcn.0040253e
call fcn.0044dcca
pop ecx
lea ecx, [ebp - 0x30]
call fcn.00411fc7
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00402883
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
jmp 0x47768f
xor edi, edi
lea ecx, [esi - 0x10]
call fcn.00402883
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.00402883
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402883
mov esi, edi
jmp 0x4770e5