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

Disassembly:
push 0x24
mov eax, 0x4dbbb4
call fcn.004becb0
mov ebx, ecx
mov esi, edx
test byte [0x589f38], 1
jne 0x4903bf
or dword [0x589f38], 1
call fcn.00407002
mov dword [0x589f34], 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 0x4903f3
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.004024df
call fcn.0045c866
pop ecx
call fcn.00407202
mov eax, dword [ebx + 0x34]
dec eax
cmp eax, 8
ja case.default.0x490417
jmp dword [eax*4 + 0x490bcd]
cmp dword [ebx + 0x1c], 0
jle 0x49042f
mov ecx, dword [ebx + 8]
cmp ecx, 1
mov eax, dword [ebx + 0x18]
jg 0x490434
call fcn.004998d4
mov ebx, dword [ebx + 4]
mov esi, dword [ebx + 4]
test ecx, ecx
jle 0x49042f
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.00407202
lea ecx, [ebp - 0x30]
call fcn.0041608f
mov eax, dword [ebp - 0x14]
call fcn.004bed88
ret
mov ecx, dword [ebx + 8]
cmp ecx, 1
jle 0x49042f
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 4]
test ecx, ecx
jle 0x49042f
mov ebx, dword [ebx]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x490450
cmp dword [ebx + 8], 0
jle 0x49042f
push dword [ebx + 4]
lea ecx, [ebp - 0x20]
call fcn.0040228a
mov esi, dword [ebp - 0x20]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4904b5
push dword [esi - 0xc]
push esi
call fcn.00406b8d
movzx eax, al
mov dword [ebp - 0x14], eax
lea ecx, [esi - 0x10]
call fcn.004027b0
jmp case.default.0x490417
cmp dword [ebx + 0x1c], 1
jle 0x49042f
mov eax, dword [ebx + 0x18]
add eax, 4
mov eax, dword [eax]
call fcn.00491da4
cmp dword [ebx + 8], 0
mov edi, eax
jle 0x49042f
push dword [ebx + 4]
lea ecx, [ebp - 0x1c]
call fcn.0040228a
mov byte [ebp - 4], 1
cmp dword [ebx + 8], 1
jle 0x49042f
mov eax, dword [ebx + 4]
add eax, 4
push eax
lea ecx, [ebp - 0x14]
call fcn.0040228a
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.004024df
call fcn.0045c866
cmp byte [ebp - 0x20], 0
pop ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
je 0x490554
push str.Attempting_to_Backup_for_Set_Registry_Value___64_bit
call fcn.004024df
call fcn.0045c866
pop ecx
push dword [ebp - 0x20]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [esi + 8]
jmp 0x49056f
push str.Attempting_to_Backup_for_Set_Registry_Value___32_bit
call fcn.004024df
call fcn.0045c866
pop ecx
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [esi + 4]
mov esi, edi
call fcn.00497702
xor edx, edx
cmp dword [ebx + 8], edx
movzx esi, al
jle 0x49042f
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
xor edi, edi
inc edi
cmp dword [ebx + 0x1c], edi
jle 0x49042f
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.00491da4
push eax
lea ecx, [ebp - 0x30]
call fcn.00491ff6
test eax, eax
jne 0x4905e8
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Key_Created
call fcn.004024df
call fcn.0045c866
xor esi, esi
cmp dword [ebx + 0x1c], esi
pop ecx
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
sub eax, esi
je 0x490658
dec eax
je 0x49062b
dec eax
dec eax
je 0x49060d
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004027b0
lea ecx, [ebp - 0x30]
call fcn.0041608f
mov eax, esi
jmp 0x490463
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x49042f
cmp ecx, edi
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x49042f
push 2
jmp 0x490673
cmp dword [ebx + 0x1c], 2
jle 0x49042f
mov eax, dword [ebx + 0x18]
add eax, 8
cmp dword [ebx + 8], edi
jle 0x49042f
push dword [eax]
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + 4]
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.00491fa2
jmp 0x490681
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x49042f
cmp ecx, edi
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x49042f
push edi
mov ebx, dword [ebx + 4]
push eax
push ebx
lea eax, [ebp - 0x30]
push eax
call fcn.00491fc0
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Value_Set_ok_
mov esi, eax
call fcn.004024df
call fcn.0045c866
pop ecx
lea ecx, [ebp - 0x30]
call fcn.0041608f
xor eax, eax
test esi, esi
sete al
mov esi, eax
jmp 0x4905e8
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Attempting_to_create_key
call fcn.004024df
call fcn.0045c866
xor eax, eax
cmp dword [ebx + 8], eax
pop ecx
jle 0x49042f
cmp dword [ebx + 0x1c], eax
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx]
jle 0x49042f
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.00491da4
push eax
lea ecx, [ebp - 0x30]
call fcn.00491ff6
test eax, eax
jne case.default.0x490417
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.create_key_OK_
call fcn.004024df
call fcn.0045c866
pop ecx
lea ecx, [ebp - 0x30]
call fcn.0041608f
mov dword [ebp - 0x14], 1
jmp case.default.0x490417
cmp dword [ebx + 0x1c], 0
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
call fcn.00491da4
cmp dword [ebx + 8], 0
mov dword [ebp - 0x20], eax
jle 0x49042f
push dword [ebx + 4]
lea ecx, [ebp - 0x1c]
call fcn.0040228a
mov byte [ebp - 4], 8
mov al, byte [ebx + 0x30]
mov byte [ebp - 0xd], al
call fcn.0047380a
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 0x4907b3
push str.Attempting_to_Backup_for_Set_Registry_Value___64_bit
call fcn.004024df
call fcn.0045c866
test edi, edi
setne al
pop ecx
movzx eax, al
push eax
push dword [ebp - 0x1c]
push dword [esi + 8]
jmp 0x4907d2
push str.Attempting_to_Backup_for_Set_Registry_Value___32_bit
call fcn.004024df
call fcn.0045c866
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.004975a1
cmp dword [ebx + 8], 0
jle 0x49042f
cmp dword [ebx + 0x1c], 0
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
push ecx
call fcn.00491da4
push eax
mov eax, dword [ebp - 0x18]
lea edi, [ebp - 0x30]
call fcn.00416053
test eax, eax
jne 0x4908de
mov ecx, edi
call fcn.0041608f
push dword [ebp - 0x18]
xor esi, esi
cmp dword [ebx + 8], esi
jle 0x49042f
mov eax, dword [ebx + 4]
push ecx
mov dword [ebp - 0x24], esp
mov ecx, esp
push eax
call fcn.0040228a
mov byte [ebp - 4], 9
cmp dword [ebx + 0x1c], esi
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
call fcn.00491da4
push eax
mov byte [ebp - 4], 8
call fcn.0048f787
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 0x490876
push str.KEY_DELETED
jmp 0x49087b
push str.KEY_NOT_DELETED
call fcn.004024df
call fcn.0045c866
pop ecx
cmp dword [0x589f34], esi
je 0x4908e5
cmp dword [ebx + 8], esi
jle 0x49042f
cmp dword [ebx + 0x1c], esi
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
push ecx
call fcn.00491da4
push eax
mov eax, dword [ebp - 0x18]
lea edi, [ebp - 0x30]
call fcn.00416053
test eax, eax
jne 0x4908e5
cmp dword [ebx + 8], esi
jle 0x49042f
push dword [ebx + 4]
mov ecx, 0x58588c
push dword [0x585894]
call fcn.004a4959
jmp 0x4908e5
mov dword [ebp - 0x14], 1
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004027b0
mov esi, dword [ebp - 0x14]
jmp 0x4905fe
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.004024df
call fcn.0045c866
cmp dword [ebx + 8], esi
pop ecx
jle 0x49042f
cmp dword [ebx + 0x1c], 1
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
jle 0x49042f
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.00491da4
push eax
lea ecx, [ebp - 0x30]
call fcn.00491ff6
test eax, eax
jne case.default.0x490417
xor edi, edi
cmp dword [ebx + 0x1c], edi
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
sub eax, edi
je 0x4909bd
dec eax
je 0x49098f
dec eax
dec eax
jne 0x4905fe
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x49042f
cmp ecx, 1
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x49042f
push 2
jmp 0x4909da
cmp dword [ebx + 0x1c], 2
jle 0x49042f
mov eax, dword [ebx + 0x18]
add eax, 8
cmp dword [ebx + 8], 1
jle 0x49042f
push dword [eax]
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + 4]
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.00491fa2
jmp 0x4909e8
mov ecx, dword [ebx + 8]
cmp ecx, 2
jle 0x49042f
cmp ecx, 1
mov ebx, dword [ebx + 4]
mov eax, dword [ebx + 8]
jle 0x49042f
push 1
mov ebx, dword [ebx + 4]
push eax
push ebx
lea eax, [ebp - 0x30]
push eax
call fcn.00491fc0
lea ecx, [ebp - 0x30]
mov esi, eax
call fcn.0041608f
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 0x490a1b
push str.Create_key_and_create_Value_done
call fcn.004024df
call fcn.0045c866
pop ecx
jmp case.default.0x490417
push str.Create_key_and_create_Value_FAILED
jmp 0x490a0b
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push str.Attempting_to_Delete_Value
call fcn.004024df
call fcn.0045c866
xor edi, edi
cmp dword [ebx + 0x1c], edi
pop ecx
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov eax, dword [eax]
call fcn.00491da4
cmp dword [ebx + 8], edi
mov dword [ebp - 0x20], eax
jle 0x49042f
push dword [ebx + 4]
lea ecx, [ebp - 0x14]
call fcn.0040228a
mov byte [ebp - 4], 0xa
cmp dword [ebx + 8], 1
jle 0x49042f
mov eax, dword [ebx + 4]
add eax, 4
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040228a
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 0x490ab3
push str.Attempting_to_backup_Value_to_be_deleted___64_bit
call fcn.004024df
call fcn.0045c866
pop ecx
push dword [ebp - 0x24]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [esi + 8]
jmp 0x490acd
push str.Attempting_to_backup_Value_to_be_deleted___32_bit
call fcn.004024df
call fcn.0045c866
pop ecx
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [esi + 4]
mov esi, dword [ebp - 0x20]
call fcn.00497702
cmp dword [ebx + 8], edi
jle 0x49042f
push dword [ebx + 4]
lea ecx, [ebp - 0x24]
call fcn.0040228a
mov byte [ebp - 4], 0xc
cmp dword [ebx + 0x1c], edi
jle 0x49042f
mov eax, dword [ebx + 0x18]
mov esi, dword [ebp - 0x24]
mov eax, dword [eax]
push esi
call fcn.00491da4
push eax
mov eax, dword [ebp - 0x18]
lea edi, [ebp - 0x30]
call fcn.00416053
test eax, eax
jne 0x490ba6
call fcn.00499991
push eax
lea ecx, [ebp - 0x18]
call fcn.004727f7
mov byte [ebp - 4], 0xd
cmp dword [ebx + 8], 1
jle 0x49042f
mov eax, dword [ebx + 4]
add eax, 4
push eax
lea ecx, [ebp - 0x20]
call fcn.0040228a
mov byte [ebp - 4], 0xe
cmp dword [ebx + 8], 1
jle 0x49042f
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 0x490b76
push str.Value_Deleted_ok_
jmp 0x490b7b
push str.Value_Deleted_failed_
call fcn.004024df
call fcn.0045c866
pop ecx
lea ecx, [ebp - 0x30]
call fcn.0041608f
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004027b0
jmp 0x490ba8
xor edi, edi
lea ecx, [esi - 0x10]
call fcn.004027b0
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004027b0
mov esi, edi
jmp 0x4905fe