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

Disassembly:
push 0x20
mov eax, 0x46f9dc
call fcn.00452eb4
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.00411806
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 0x4190e3
mov eax, dword [edi + 0x1c]
cmp eax, 1
je 0x418be9
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.00411806
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017df
mov esi, 0x4b77dc
call fcn.0043030a
xor eax, eax
jmp 0x4190e6
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
call fcn.00408be6
lea eax, [ebp - 0x14]
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 8]
push eax
call fcn.00417be1
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x418c24
cmp dword [edi + 0x18], esi
je 0x418c24
lea ebx, [edi + 8]
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
jne 0x418e12
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 0x418e04
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x418e04
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.00411806
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 0x4945d4
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00407458
add esp, 0xc
push esi
mov byte [ebp - 4], 4
call fcn.004510cb
pop ecx
push eax
call fcn.00451097
pop ecx
call fcn.004510a9
mov dword [ebp - 0x2c], eax
call fcn.0043f3c0
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 0x418da2
cmp esi, 3
je 0x418da2
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x2c]
push 0x479944
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.00411336
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.004077b3
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call fcn.004077b3
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 0x418e12
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.00411336
mov byte [ebp - 4], 5
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017df
mov esi, 0x4b77dc
call fcn.0043030a
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 0x418be2
lea eax, [ebp - 0x14]
lea ebx, [edi + 8]
push eax
mov ecx, ebx
call fcn.004077b3
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 0x418fd8
mov dword [ebp - 0x2c], 1
call fcn.0043f3c0
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 fcn.00434592
mov eax, dword [ebp - 0x18]
add esp, 0x10
cmp dword [eax - 0xc], 0
jne 0x418e84
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update
push dword [0x4b76a8]
push esi
call fcn.00434592
add esp, 0x10
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
je 0x418ecd
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x20]
call fcn.004077b3
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.00411336
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.00416361
add esp, 0xc
cmp eax, 6
jne 0x418fad
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.00407812
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.00411336
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 fcn.00421f01
mov esi, eax
test esi, esi
jne 0x418f5b
mov ecx, dword [ebp - 0x24]
inc eax
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x1c], eax
mov edi, ecx
jmp 0x418fad
lea eax, [ebp - 0xd]
push eax
push esi
push str.Signature_Validation_Error
mov ecx, 0x4b76d8
mov byte [ebp - 0xd], 0
call fcn.0040787d
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.00411336
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 fcn.0040787d
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004017df
xor esi, esi
cmp dword [0x4b7798], esi
jne 0x4190cd
cmp dword [ebp - 0x1c], esi
jne 0x4190cd
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.0041a6eb
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x41909e
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.00407812
mov ebx, dword [edi + 0x24]
mov edi, dword [edi + 0x14]
mov esi, dword [ebp - 0x14]
call fcn.00421f01
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jne 0x419070
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.00411336
mov ecx, dword [ebp + 8]
jmp 0x4190c2
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 fcn.0040787d
push str.invalid_after_BB_download:
lea ecx, [ebp + 8]
call fcn.004012e2
mov byte [ebp - 4], 0xf
push esi
jmp 0x41905c
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.00411336
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.00452f8c
ret 4