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

Disassembly:
push 0x24
mov eax, 0x488238
call fcn.00464e48
mov esi, ecx
mov dword [ebp - 0x2c], esi
push str.DownloadArmUpdate...
lea ecx, [ebp - 0x20]
call fcn.0040279b
and dword [ebp - 4], 0
lea edx, [ebp - 0x20]
push 0
push 2
pop ecx
call fcn.00413e51
or dword [ebp - 4], 0xffffffff
pop ecx
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov edi, dword [0x4e20c0]
xor ebx, ebx
test edi, edi
je 0x41f6ca
inc ebx
cmp dword [edi + 0x1c], ebx
je 0x41f1c3
push str.not_supported_self_update_type
lea ecx, [ebp - 0x20]
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x20]
mov dword [ebp - 4], ebx
pop ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, 0x4e20bc
call fcn.0043bb50
xor eax, eax
jmp 0x41f6cc
lea eax, [esi + 0x28]
mov dword [ebp - 0x28], eax
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00402d2a
add eax, 0x10
pop ecx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 2
push eax
mov ecx, esi
call fcn.0041e0b5
mov ebx, eax
test ebx, ebx
je 0x41f206
cmp dword [edi + 0x18], 0
je 0x41f206
mov ecx, dword [edi + 8]
cmp dword [ecx - 0xc], 0
jne 0x41f3f1
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x14]
push dword [eax - 0xc]
push eax
call fcn.00402556
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41f22c
lea eax, [ebp - 0x14]
push eax
jmp 0x41f3e9
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x41f3e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.failed_to_delete_existing_ARM_update_file
lea ecx, [ebp - 0x18]
mov esi, eax
call fcn.0040279b
push esi
push 2
lea edx, [ebp - 0x18]
mov byte [ebp - 4], 3
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00402def
push 0x4bb8dc
push dword [ebp - 0x28]
lea eax, [ebp - 0x20]
push eax
call fcn.004023e9
add esp, 0xc
push 0
mov byte [ebp - 4], 4
call fcn.0046bc6c
pop ecx
push eax
call fcn.0046bbd7
pop ecx
call fcn.0046bbb6
mov esi, eax
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x18]
call fcn.00402824
push esi
mov byte [ebp - 4], 5
lea eax, [ebp - 0x18]
push dword [ebp - 0x20]
push str._s_d
push eax
call fcn.00402762
add esp, 0x10
push 0
push dword [ebp - 0x18]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov esi, eax
cmp esi, 0xa1
je 0x41f387
cmp esi, 3
je 0x41f387
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x28]
push 0x49fb68
push eax
call fcn.00402381
add esp, 0xc
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x18]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00402556
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.00402def
push str.Will_attempt_self_update_download:
lea ecx, [ebp - 0x24]
call fcn.0040279b
push esi
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 8
push eax
push 2
lea edx, [ebp - 0x24]
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00402def
lea eax, [ebp - 0x18]
lea ecx, [edi + 8]
push eax
call fcn.00402d9f
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call fcn.00402d9f
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.00402def
jmp 0x41f3f1
push str.Dismissing_self_update__SHCreateDirectoryEx_failed:
lea ecx, [ebp - 0x24]
call fcn.0040279b
push esi
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 6
push eax
push 2
lea edx, [ebp - 0x24]
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, 0x4e20bc
call fcn.0043bb50
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
jmp 0x41f1bc
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [edi + 8]
call fcn.00402d9f
mov eax, dword [edi + 0xc]
sub eax, 0x10
push eax
call fcn.00402d2a
add eax, 0x10
pop ecx
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 9
test ebx, ebx
jne 0x41f5cf
mov dword [ebp - 0x20], 1
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x18]
call fcn.00402824
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0xa
mov edx, dword [0x4e1f60]
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
push eax
push str.ARM_Update_3
call fcn.0043faeb
mov esi, dword [ebp - 0x18]
pop ecx
pop ecx
cmp dword [esi - 0xc], ebx
jne 0x41f492
mov edx, dword [0x4e1f60]
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update_2
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0043faeb
mov esi, dword [ebp - 0x18]
pop ecx
pop ecx
cmp dword [esi - 0xc], ebx
jne 0x41f492
mov edx, dword [0x4e1f60]
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0043faeb
mov esi, dword [ebp - 0x18]
pop ecx
pop ecx
cmp dword [esi - 0xc], ebx
je 0x41f4d1
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402d9f
push str.ARM_update_redirected_to:
lea ecx, [ebp - 0x24]
call fcn.0040279b
push 0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0xb
push eax
push 2
lea edx, [ebp - 0x24]
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
push 0x927c0
push eax
lea ecx, [edi + 8]
call fcn.0041bc50
pop ecx
pop ecx
cmp eax, 6
jne 0x41f5a9
lea eax, [ebp - 0xd]
xor ebx, ebx
push eax
push ebx
push str.OK_BITS
push str.Get_ARM_Update_Result
mov ecx, 0x4e1f90
mov byte [ebp - 0xd], bl
call fcn.004098b0
push str.download_BITs_success:
lea ecx, [ebp - 0x24]
call fcn.0040279b
push ebx
lea eax, [edi + 8]
mov byte [ebp - 4], 0xc
push eax
push 2
lea edx, [ebp - 0x24]
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00402def
push dword [edi + 0x50]
mov edx, dword [edi + 0x14]
mov ecx, dword [ebp - 0x14]
call fcn.0042d48a
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x41f55d
inc eax
mov dword [edi + 0x18], eax
mov ebx, eax
jmp 0x41f5a9
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], 0
push eax
push ebx
push str.Signature_Validation_Error
mov ecx, 0x4e1f90
call fcn.004098f0
push str.invalid_after_BITs_download:
lea ecx, [ebp - 0x24]
call fcn.0040279b
push ebx
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xd
push eax
push 2
lea edx, [ebp - 0x24]
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00402def
xor ebx, ebx
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], 0
push eax
push dword [ebp - 0x20]
mov ecx, 0x4e1f90
push str.BITS_Result_Self_Update
call fcn.004098f0
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 9
call fcn.00402def
cmp dword [0x4e2078], 0
jne 0x41f6b4
test ebx, ebx
jne 0x41f6b4
mov ecx, dword [ebp - 0x2c]
xor eax, eax
push 1
push eax
push eax
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.004218ce
mov ebx, eax
test ebx, ebx
je 0x41f685
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], 0
push eax
push 0
push str.OK_BB
push str.Get_ARM_Update_Result
mov ecx, 0x4e1f90
call fcn.004098b0
push dword [edi + 0x50]
mov edx, dword [edi + 0x14]
mov ecx, dword [ebp - 0x14]
call fcn.0042d48a
mov esi, eax
pop ecx
test esi, esi
jne 0x41f655
push str.valid_after_BB_download:
lea ecx, [ebp - 0x24]
mov dword [edi + 0x18], 1
call fcn.0040279b
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x14]
jmp 0x41f699
lea eax, [ebp - 0xd]
xor ebx, ebx
push eax
push esi
push str.Signature_Validation_Error
mov ecx, 0x4e1f90
mov byte [ebp - 0xd], bl
call fcn.004098f0
push str.invalid_after_BB_download:
lea ecx, [ebp - 0x24]
call fcn.0040279b
mov byte [ebp - 4], 0xf
lea eax, [ebp - 0x14]
push esi
jmp 0x41f69b
push str.BB_download_failed:
lea ecx, [ebp - 0x24]
call fcn.0040279b
mov byte [ebp - 4], 0x10
lea eax, [ebp - 0x1c]
push 0
push eax
push 2
lea edx, [ebp - 0x24]
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov eax, ebx
call fcn.00464e11
ret