Function at 0x418ae1
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes

Disassembly:
push 0x20
mov eax, 0x46f414
call fcn.004529c4
push str.DownloadArmUpdate...
lea ecx, [ebp - 0x24]
call fcn.004012e2
xor esi, esi
push esi
lea eax, [ebp - 0x24]
push eax
push 2
pop ebx
push ebx
mov dword [ebp - 4], esi
call fcn.004117b0
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x24]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017df
mov edi, dword [0x4b77e0]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x24], edi
cmp edi, esi
je 0x419077
mov eax, dword [edi + 0x1c]
cmp eax, 1
je 0x418b7d
push str.not_supported_self_update_type
lea ecx, [ebp + 8]
call fcn.004012e2
push esi
lea eax, [ebp + 8]
push eax
push ebx
mov dword [ebp - 4], 1
call fcn.004117b0
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017df
mov esi, 0x4b77dc
call fcn.0043004a
xor eax, eax
jmp 0x41907a
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
call main
lea eax, [ebp - 0x14]
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 8]
push eax
call fcn.00417b78
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x418bb8
cmp dword [edi + 0x18], esi
je 0x418bb8
lea ebx, [edi + 8]
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
jne 0x418da6
push 2
xor esi, esi
pop ebx
lea eax, [edi + 4]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401103
push dword [ebp - 0x14]
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x418d98
push dword [ebp - 0x14]
call dword [sym.imp.kernel32.dll_DeleteFileW]
test eax, eax
jne 0x418d98
call dword [sym.imp.kernel32.dll_GetLastError]
push str.failed_to_delete_existing_ARM_update_file
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x2c], eax
call fcn.004012e2
mov byte [ebp - 4], 3
push dword [ebp - 0x2c]
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.004117b0
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017df
mov eax, dword [ebp + 8]
add eax, 0x24
push 0x4945cc
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040740d
add esp, 0xc
push esi
mov byte [ebp - 4], 4
call main
pop ecx
push eax
call main
pop ecx
call fcn.00450bb9
mov dword [ebp - 0x2c], eax
call fcn.0043eec2
push eax
lea ecx, [ebp - 0x18]
call fcn.004013a1
mov byte [ebp - 4], 5
push dword [ebp - 0x2c]
lea eax, [ebp - 0x18]
push dword [ebp - 0x20]
push str._s_d
push eax
call fcn.004012c2
add esp, 0x10
push esi
push dword [ebp - 0x18]
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov esi, eax
cmp esi, 0xa1
je 0x418d36
cmp esi, 3
je 0x418d36
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x2c]
push 0x479924
push eax
call fcn.0040107c
add esp, 0xc
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 7
call fcn.00401103
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.004017df
push str.Will_attempt_self_update_download:
lea ecx, [ebp - 0x28]
call fcn.004012e2
push esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
mov byte [ebp - 4], 8
call fcn.004112e0
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017df
lea eax, [ebp - 0x18]
lea ebx, [edi + 8]
push eax
mov ecx, ebx
call fcn.00407768
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call fcn.00407768
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004017df
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004017df
jmp 0x418da6
push str.Dismissing_self_update__SHCreateDirectoryEx_failed:
lea ecx, [ebp + 8]
call fcn.004012e2
push esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 8]
push eax
push ebx
mov byte [ebp - 4], 6
call fcn.004112e0
mov byte [ebp - 4], 5
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017df
mov esi, 0x4b77dc
call fcn.0043004a
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004017df
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004017df
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004017df
jmp 0x418b76
lea eax, [ebp - 0x14]
lea ebx, [edi + 8]
push eax
mov ecx, ebx
call fcn.00407768
lea eax, [edi + 0xc]
push eax
lea ecx, [ebp - 0x20]
call fcn.00401326
xor esi, esi
mov byte [ebp - 4], 9
cmp dword [ebp - 0x1c], esi
jne 0x418f6c
mov dword [ebp - 0x2c], 1
call fcn.0043eec2
push eax
lea ecx, [ebp - 0x18]
call fcn.004013a1
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update_2
mov byte [ebp - 4], 0xa
push dword [0x4b76a8]
mov esi, reloc.OLEAUT32.dll_SysReAllocString
push esi
call main
mov eax, dword [ebp - 0x18]
add esp, 0x10
cmp dword [eax - 0xc], 0
jne 0x418e18
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update
push dword [0x4b76a8]
push esi
call main
add esp, 0x10
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
je 0x418e61
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x20]
call fcn.00407768
push str.ARM_update_redirected_to:
lea ecx, [ebp - 0x28]
call fcn.004012e2
push 0
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
push 2
mov byte [ebp - 4], 0xb
call fcn.004112e0
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017df
push 0x927c0
push dword [ebp - 0x20]
lea ecx, [ebp - 0x2c]
push ebx
call fcn.00416301
add esp, 0xc
cmp eax, 6
jne 0x418f41
lea eax, [ebp - 0xd]
push eax
push 0
push str.OK_BITS
push str.Get_ARM_Update_Result
mov esi, 0x4b76d8
mov byte [ebp - 0xd], 0
call fcn.004077c7
push str.download_BITs_success:
lea ecx, [ebp - 0x28]
call fcn.004012e2
push 0
push ebx
lea eax, [ebp - 0x28]
push eax
push 2
mov byte [ebp - 4], 0xc
call fcn.004112e0
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017df
mov ebx, dword [edi + 0x24]
mov edi, dword [edi + 0x14]
mov esi, dword [ebp - 0x14]
call main
mov esi, eax
test esi, esi
jne 0x418eef
mov ecx, dword [ebp - 0x24]
inc eax
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x1c], eax
mov edi, ecx
jmp 0x418f41
lea eax, [ebp - 0xd]
push eax
push esi
push str.Signature_Validation_Error
mov ecx, 0x4b76d8
mov byte [ebp - 0xd], 0
call main
push str.invalid_after_BITs_download:
lea ecx, [ebp - 0x28]
call fcn.004012e2
push esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x28]
push eax
push 2
mov byte [ebp - 4], 0xd
call fcn.004112e0
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017df
and dword [ebp - 0x1c], 0
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0xd]
push eax
push dword [ebp - 0x2c]
mov ecx, 0x4b76d8
push str.BITS_Result_Self_Update
mov byte [ebp - 0xd], 0
call main
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004017df
xor esi, esi
cmp dword [0x4b7798], esi
jne 0x419061
cmp dword [ebp - 0x1c], esi
jne 0x419061
push 1
push esi
push esi
push esi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call fcn.0041a67e
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x419032
lea eax, [ebp + 0xb]
push eax
push esi
push str.OK_BB
push str.Get_ARM_Update_Result
mov esi, 0x4b76d8
mov byte [ebp + 0xb], 0
call fcn.004077c7
mov ebx, dword [edi + 0x24]
mov edi, dword [edi + 0x14]
mov esi, dword [ebp - 0x14]
call main
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jne 0x419004
mov eax, dword [ebp - 0x24]
push str.valid_after_BB_download:
lea ecx, [ebp + 8]
mov dword [eax + 0x18], 1
call fcn.004012e2
mov byte [ebp - 4], 0xe
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
push 2
call fcn.004112e0
mov ecx, dword [ebp + 8]
jmp 0x419056
lea eax, [ebp + 0xb]
push eax
push esi
push str.Signature_Validation_Error
mov ecx, 0x4b76d8
mov dword [ebp - 0x1c], ebx
mov byte [ebp + 0xb], bl
call main
push str.invalid_after_BB_download:
lea ecx, [ebp + 8]
call fcn.004012e2
mov byte [ebp - 4], 0xf
push esi
jmp 0x418ff0
push str.BB_download_failed:
lea ecx, [ebp - 0x2c]
call fcn.004012e2
push esi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
push 2
mov byte [ebp - 4], 0x10
call fcn.004112e0
mov ecx, dword [ebp - 0x2c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017df
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004017df
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004017df
mov eax, dword [ebp - 0x1c]
call fcn.00452a9c
ret 4