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

Disassembly:
push 0x20
mov eax, 0x479109
call fcn.0045be74
push str.DownloadArmUpdate...
lea ecx, [ebp - 0x24]
call fcn.004020a6
xor ebx, ebx
push ebx
lea eax, [ebp - 0x24]
push eax
push 2
pop esi
push esi
mov dword [ebp - 4], ebx
call fcn.004152d1
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x24]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov edi, dword [0x4c47f0]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], edi
cmp edi, ebx
je 0x41e4b1
mov eax, dword [edi + 0x1c]
cmp eax, 1
je 0x41dfaa
push str.not_supported_self_update_type
lea ecx, [ebp + 8]
call fcn.004020a6
push ebx
lea eax, [ebp + 8]
push eax
push esi
mov dword [ebp - 4], 1
call fcn.004152d1
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov esi, 0x4c47ec
call fcn.004391d5
xor eax, eax
jmp 0x41e4b4
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
call fcn.0040c4af
lea eax, [ebp - 0x14]
mov dword [ebp - 4], esi
mov ecx, dword [ebp + 8]
push eax
call fcn.0041ceb1
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x41dfdd
cmp dword [edi + 0x18], ebx
je 0x41dfdd
mov eax, dword [edi + 8]
cmp dword [eax - 0xc], ebx
jne 0x41e1c4
lea eax, [edi + 4]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401ec7
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41e1b8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x41e1b8
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.004020a6
push esi
lea eax, [ebp - 0x18]
push eax
push 2
mov byte [ebp - 4], 3
call fcn.004152d1
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x18]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov eax, dword [ebp + 8]
add eax, 0x28
push 0x49f34c
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040adb6
add esp, 0xc
push ebx
mov byte [ebp - 4], 4
call fcn.00459264
pop ecx
push eax
call fcn.00459230
pop ecx
call fcn.00459242
mov esi, eax
call fcn.0044825c
push eax
lea ecx, [ebp - 0x18]
call fcn.0041872d
push esi
mov byte [ebp - 4], 5
push dword [ebp - 0x20]
lea eax, [ebp - 0x18]
push str._s_d
push eax
call fcn.00402086
add esp, 0x10
push ebx
push dword [ebp - 0x18]
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov esi, eax
cmp esi, 0xa1
je 0x41e155
cmp esi, 3
je 0x41e155
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x2c]
push 0x48415c
push eax
call fcn.00401e40
add esp, 0xc
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 7
call fcn.00401ec7
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.004025d2
push str.Will_attempt_self_update_download:
lea ecx, [ebp - 0x28]
call fcn.004020a6
push esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push eax
push 2
mov byte [ebp - 4], 8
call fcn.00414e01
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
lea eax, [ebp - 0x18]
lea ecx, [edi + 8]
push eax
call fcn.00402573
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call fcn.00402573
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004025d2
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004025d2
jmp 0x41e1c4
push str.Dismissing_self_update__SHCreateDirectoryEx_failed:
lea ecx, [ebp + 8]
call fcn.004020a6
push esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 8]
push eax
push 2
mov byte [ebp - 4], 6
call fcn.00414e01
mov byte [ebp - 4], 5
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
mov esi, 0x4c47ec
call fcn.004391d5
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004025d2
jmp 0x41dfa3
lea eax, [ebp - 0x14]
push eax
lea ecx, [edi + 8]
call fcn.00402573
lea eax, [edi + 0xc]
push eax
lea ecx, [ebp - 0x20]
call fcn.004020ea
mov byte [ebp - 4], 9
cmp dword [ebp - 0x1c], ebx
jne 0x41e3a7
mov dword [ebp - 0x2c], 1
call fcn.0044825c
push eax
lea ecx, [ebp - 0x18]
call fcn.0041872d
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update_3
mov byte [ebp - 4], 0xa
push dword [0x4c46b8]
mov esi, reloc.OLEAUT32.dll_SysReAllocString
push esi
call fcn.0043d278
mov eax, dword [ebp - 0x18]
add esp, 0x10
cmp dword [eax - 0xc], ebx
jne 0x41e253
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update_2
push dword [0x4c46b8]
push esi
call fcn.0043d278
mov eax, dword [ebp - 0x18]
add esp, 0x10
cmp dword [eax - 0xc], ebx
jne 0x41e253
lea eax, [ebp - 0x18]
push eax
push str.ARM_Update
push dword [0x4c46b8]
push esi
call fcn.0043d278
add esp, 0x10
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], ebx
je 0x41e29a
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x20]
call fcn.00402573
push str.ARM_update_redirected_to:
lea ecx, [ebp - 0x28]
call fcn.004020a6
push ebx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
push 2
mov byte [ebp - 4], 0xb
call fcn.00414e01
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
push 0x927c0
push dword [ebp - 0x20]
lea eax, [edi + 8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041ac5f
add esp, 0xc
cmp eax, 6
jne 0x41e37a
lea eax, [ebp - 0xd]
push eax
push ebx
push str.OK_BITS
push str.Get_ARM_Update_Result
mov esi, 0x4c46e8
mov byte [ebp - 0xd], bl
call fcn.0040b111
push str.download_BITs_success:
lea ecx, [ebp - 0x28]
call fcn.004020a6
push ebx
lea eax, [edi + 8]
push eax
lea eax, [ebp - 0x28]
push eax
push 2
mov byte [ebp - 4], 0xc
call fcn.00414e01
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
mov ebx, dword [edi + 0x3c]
mov edi, dword [edi + 0x14]
mov esi, dword [ebp - 0x14]
call fcn.004289ab
mov esi, eax
test esi, esi
jne 0x41e329
mov ecx, dword [ebp - 0x24]
inc eax
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x1c], eax
jmp 0x41e378
lea eax, [ebp - 0xd]
push eax
push esi
mov edi, str.Signature_Validation_Error
mov ebx, 0x4c46e8
mov byte [ebp - 0xd], 0
call fcn.0040b14d
push str.invalid_after_BITs_download:
lea ecx, [ebp - 0x28]
call fcn.004020a6
push esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x28]
push eax
push 2
mov byte [ebp - 4], 0xd
call fcn.00414e01
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
and dword [ebp - 0x1c], 0
xor ebx, ebx
lea eax, [ebp - 0xd]
push eax
push dword [ebp - 0x2c]
mov byte [ebp - 0xd], bl
mov edi, str.BITS_Result_Self_Update
mov ebx, 0x4c46e8
call fcn.0040b14d
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004025d2
mov edi, dword [ebp - 0x24]
xor ebx, ebx
cmp dword [0x4c47a8], ebx
jne 0x41e49b
cmp dword [ebp - 0x1c], ebx
jne 0x41e49b
push 1
push ebx
push ebx
push ebx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call fcn.0042028c
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x41e46c
lea eax, [ebp + 0xb]
push eax
push ebx
push str.OK_BB
push str.Get_ARM_Update_Result
mov esi, 0x4c46e8
mov byte [ebp + 0xb], bl
call fcn.0040b111
mov ebx, dword [edi + 0x3c]
mov edi, dword [edi + 0x14]
mov esi, dword [ebp - 0x14]
call fcn.004289ab
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jne 0x41e43e
mov eax, dword [ebp - 0x24]
push str.valid_after_BB_download:
lea ecx, [ebp + 8]
mov dword [eax + 0x18], 1
call fcn.004020a6
mov byte [ebp - 4], 0xe
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
push 2
call fcn.00414e01
mov ecx, dword [ebp + 8]
jmp 0x41e490
lea eax, [ebp + 0xb]
push eax
mov byte [ebp + 0xb], bl
mov dword [ebp - 0x1c], ebx
push esi
mov edi, str.Signature_Validation_Error
mov ebx, 0x4c46e8
call fcn.0040b14d
push str.invalid_after_BB_download:
lea ecx, [ebp + 8]
call fcn.004020a6
mov byte [ebp - 4], 0xf
push esi
jmp 0x41e42a
push str.BB_download_failed:
lea ecx, [ebp - 0x2c]
call fcn.004020a6
push ebx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
push 2
mov byte [ebp - 4], 0x10
call fcn.00414e01
mov ecx, dword [ebp - 0x2c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004025d2
mov eax, dword [ebp - 0x1c]
call fcn.0045bf4c
ret 4