Function at 0x418530
Capabilities:
Create directory
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x84
mov dword [esp + 4], str.SayakaCP.dll
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
sete al
mov byte [ebp - 0xa], al
mov dword [esp + 4], str.SayakaCP32.dll
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
sete al
mov byte [ebp - 0xb], al
lea eax, [ebp - 0x28]
mov ecx, eax
call fcn.0043d820
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.0043d820
movzx eax, byte [0x46703c]
test al, al
je 0x418599
mov ebx, 0
jmp 0x418b6c
movzx eax, byte [0x46703d]
xor eax, 1
test al, al
je 0x4185ba
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], str.Installing__s_...
call fcn.0041b00c
mov dword [esp], 1
mov eax, dword [fcn.004311f0]
call eax
mov dword [esp], eax
call sub.msvcrt.dll_fflush
cmp dword [ebp + 8], 0
je 0x4185f8
mov eax, dword [ebp + 8]
add eax, 1
movzx eax, byte [eax]
cmp al, 0x3a
jne 0x4185f8
lea eax, [ebp - 0x28]
mov edx, dword [ebp + 8]
mov dword [esp], edx
mov ecx, eax
call fcn.0043e0c0
sub esp, 4
jmp 0x41863c
call fcn.00411583
mov edx, eax
lea eax, [ebp - 0x28]
mov dword [esp], edx
mov ecx, eax
call fcn.0043e0c0
sub esp, 4
cmp dword [ebp + 8], 0
je 0x41863c
lea eax, [ebp - 0x28]
mov dword [esp], 0x44891b
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
lea eax, [ebp - 0x28]
mov edx, dword [ebp + 8]
mov dword [esp], edx
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
lea eax, [ebp - 0x28]
mov ecx, eax
call fcn.004350a0
mov dword [esp], eax
call sub.msvcrt.dll__mkdir
lea eax, [ebp - 0x40]
lea edx, [ebp - 0x28]
mov dword [esp], edx
mov ecx, eax
call fcn.0043e100
sub esp, 4
lea eax, [ebp - 0x40]
mov dword [esp], 0x44891b
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
lea eax, [ebp - 0x40]
mov edx, dword [ebp + 0x10]
mov dword [esp], edx
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Installing__s_to__s
call fcn.00411655
lea eax, [ebp - 0x58]
lea edx, [ebp - 0x40]
mov dword [esp], edx
mov ecx, eax
call fcn.0043d4f0
sub esp, 4
lea eax, [ebp - 0x58]
mov dword [esp], 0x449b18
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], 0x44996f
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x418712
lea eax, [ebp - 0x58]
mov dword [esp], 0x449b18
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
cmp dword [ebp - 0x10], 0
je 0x41871a
jmp 0x4186d0
lea eax, [ebp - 0x70]
lea edx, [ebp - 0x40]
mov dword [esp], edx
mov ecx, eax
call fcn.0043d4f0
sub esp, 4
lea eax, [ebp - 0x70]
mov dword [esp], str..old
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
lea eax, [ebp - 0x70]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], 0x44996f
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x418783
lea eax, [ebp - 0x70]
mov dword [esp], 0x449b18
mov ecx, eax
call fcn.0043e1b0
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
cmp dword [ebp - 0x10], 0
je 0x41878b
jmp 0x418741
mov byte [ebp - 9], 0
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00418230
test al, al
je 0x418aed
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], 0x44996f
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4187de
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
cmp dword [ebp - 0x10], 0
je 0x418804
mov eax, dword [0x446cc4]
cmp dword [ebp + 0x14], eax
je 0x41880b
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp], eax
call sub.msvcrt.dll__unlink
test eax, eax
jne 0x41880b
mov eax, 1
jmp 0x418810
mov eax, 0
test al, al
je 0x418874
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], 9
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MoveFileExA]
call eax
sub esp, 0xc
test eax, eax
setne al
test al, al
je 0x418855
mov byte [ebp - 9], 1
jmp 0x418b23
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], eax
mov dword [esp], str.__FAILED_to_create_file__s
call fcn.00411655
jmp 0x418b23
movzx eax, byte [0x467041]
test al, al
je 0x41888f
call fcn.0041151b
test eax, eax
je 0x41888f
mov eax, 1
jmp 0x418894
mov eax, 0
test al, al
je 0x418977
mov byte [0x46703f], 1
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MoveFileExA]
call eax
sub esp, 0xc
test eax, eax
setne al
test al, al
je 0x4188ed
lea eax, [ebp - 0x70]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], eax
mov dword [esp], str.__Old_file__s_will_be_deleted_on_reboot
call fcn.00411655
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], 4
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MoveFileExA]
call eax
sub esp, 0xc
test eax, eax
setne al
test al, al
je 0x418948
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], eax
mov dword [esp], str.__New_file__s_will_be_replaced_on_reboot
call fcn.00411655
mov byte [ebp - 9], 1
jmp 0x418b23
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], str.__FAILED_to_replace_file__s_with__s
call fcn.00411655
jmp 0x418b23
mov eax, dword [0x446cc0]
cmp dword [ebp + 0x14], eax
jne 0x4189bb
lea eax, [ebp - 0x70]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], 9
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MoveFileExA]
call eax
sub esp, 0xc
test eax, eax
je 0x4189bb
mov eax, 1
jmp 0x4189c0
mov eax, 0
test al, al
je 0x418a82
lea eax, [ebp - 0x70]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MoveFileExA]
call eax
sub esp, 0xc
test eax, eax
setne al
test al, al
je 0x418a12
lea eax, [ebp - 0x70]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], eax
mov dword [esp], str.__Old_file_renamed_to__s._Will_be_deleted_on_reboot
call fcn.00411655
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], 9
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MoveFileExA]
call eax
sub esp, 0xc
test eax, eax
setne al
test al, al
je 0x418a53
mov byte [ebp - 9], 1
jmp 0x418b23
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], str.__FAILED_to_replace_file__s_with__s
call fcn.00411655
jmp 0x418b23
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00411b72
test al, al
je 0x418ac1
mov dword [esp], str.__Scheduled_substitution_on_reboot
call fcn.00411655
mov byte [ebp - 9], 1
mov byte [0x46703f], 1
jmp 0x418b23
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov ebx, eax
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], str.__FAILED_to_schedule_replace_of_file__s_with__s
call fcn.00411655
jmp 0x418b23
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.004350a0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.__FAILED_extraction_of__s_into__s
call fcn.00411655
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
setne al
test al, al
je 0x418b23
call fcn.00411b5a
cmp byte [ebp - 9], 0
je 0x418b37
mov dword [esp], str.__Success
call fcn.00411655
jmp 0x418b3e
mov byte [0x46703c], 1
mov dword [esp], 1
mov eax, dword [fcn.004311f0]
call eax
mov dword [esp], eax
call sub.msvcrt.dll_fflush
movzx ebx, byte [ebp - 9]
lea eax, [ebp - 0x70]
mov ecx, eax
call fcn.0043dfb0
lea eax, [ebp - 0x58]
mov ecx, eax
call fcn.0043dfb0
lea eax, [ebp - 0x40]
mov ecx, eax
call fcn.0043dfb0
lea eax, [ebp - 0x28]
mov ecx, eax
call fcn.0043dfb0
mov eax, ebx
jmp 0x418bc0
mov ebx, dword [ebp - 4]
leave
ret