Function at 0x409080
Capabilities:
Delete file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x880
mov eax, dword [0x5b0c20]
xor eax, esp
mov dword [esp + 0x87c], eax
mov ecx, dword [esp + 0x88c]
mov eax, dword [esp + 0x888]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x894]
xor esi, esi
mov dword [esp + 0x38], ecx
push edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
lea ecx, [edi + 2]
call fcn.00407e40
push eax
push ecx
lea edx, [esp + 0x488]
push 0x5516e0
push edx
call fcn.00525f70
add esp, 0x14
push 0x26
lea eax, [esp + 0x480]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40910d
lea ecx, [esp + 0x47c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [edi + 0x35c]
xor edx, edx
mov eax, 0x13c00
div ecx
mov ebp, eax
imul ebp, ecx
cmp ebp, 0x13c00
jae 0x409138
xor edx, edx
mov eax, 0x13c00
div ecx
mov ebp, eax
inc ebp
imul ebp, ecx
push ebp
call fcn.00401bb0
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, esi
je 0x40981b
push esi
push 0xa0000026
push 2
push esi
push 7
push 0xc0000000
lea edx, [esp + 0x494]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4091b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x480]
push eax
lea ecx, [esp + 0x27c]
push str.Could_not_create__s_file__error__d._Point_1._n
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push esi
push 0x54ffac
lea edx, [esp + 0x27c]
push edx
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x409758
xor eax, eax
cmp ebp, esi
jbe 0x4091e0
jmp 0x4091c0
mov ecx, dword [esp + 0x18]
lea edi, [eax + ecx]
add eax, 0x200
mov ecx, 0x80
mov esi, str.j:Y
rep movsd dword es:[edi], dword [esi]
cmp eax, ebp
jb 0x4091c0
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x14]
push edx
push ebp
push eax
push ebx
call esi
test eax, eax
je 0x409758
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x26
push 3
push 0
push 7
push 0xc0000000
lea ecx, [esp + 0x494]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40926c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x480]
push edx
lea eax, [esp + 0x27c]
push str.Could_not_open__s_file__error__d._Point_2._n
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0x54ffac
lea ecx, [esp + 0x27c]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
jmp 0x40981f
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x4092be
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x480]
push edx
lea eax, [esp + 0x27c]
push str.Could_not_set_pointer_in__s_file__error__d_n
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0x54ffac
lea ecx, [esp + 0x27c]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x409758
mov eax, dword [esp + 0x2c]
push 0
lea edx, [esp + 0x14]
push edx
push 0x800
push eax
push ebx
call esi
test eax, eax
je 0x409758
cmp dword [esp + 0x10], 0x800
je 0x409325
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x480]
push ecx
lea edx, [esp + 0x27c]
push str.Could_not_write__s_file__error__d._Point_1._n
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0x54ffac
lea eax, [esp + 0x27c]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x409758
movzx eax, byte [edi + 0x2af0]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x688]
push edx
push eax
call fcn.00407670
mov esi, eax
add esp, 0xc
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x40938e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x688]
push ecx
lea edx, [esp + 0x27c]
push str.Could_not_open__s_file__error__d._Point_3._n
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0x54ffac
lea eax, [esp + 0x27c]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x409758
call fcn.0044b8f0
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40940d
cmp dword [0x5b2db8], eax
je 0x4093b0
call fcn.0044b920
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4093d2
cmp dword [0x5b2ebc], 0
jne 0x4093d2
push 0
push 0x550910
push str.Could_not_get_System_Volume.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x409758
mov ecx, dword [0x5b2ec0]
push 0x3f58
mov dword [esp + 0x48], 1
mov dword [esp + 0x50], ecx
call fcn.00401bb0
lea edx, [esp + 0x48]
add esp, 4
mov dword [esp + 0x34], eax
mov dword [eax + 0x734], edx
mov dword [eax + 0x35c], 0x1000
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x734]
mov edx, dword [eax]
lea ecx, [eax + 8]
test edx, edx
jbe 0x409432
mov eax, ecx
mov ebp, dword [eax]
cmp ebp, dword [ecx]
jae 0x40942a
mov ecx, eax
add eax, 0x18
sub edx, 1
jne 0x409422
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
xor edx, edx
push edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edx
mov eax, dword [eax + 0x35c]
push ebp
push eax
lea edx, [esp + 0x48]
push edx
push eax
mov eax, dword [ecx]
push eax
call fcn.00413640
add esp, 0x18
push 0
test eax, eax
jne 0x40947a
push 0x550910
push str.Could_not_read_data_from_disk.
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x409758
push 0
push 0x1600
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x1600
jne 0x409758
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x200
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409758
cmp dword [esp + 0x10], 0x200
jne 0x409758
lea esi, [ebp + 0x1a1]
mov byte [esi], 0x72
cmp dword [0x5b2900], 0
jne 0x4094e0
cmp dword [0x5b2904], 0
jne 0x4094e0
xor eax, eax
jmp 0x4094e5
mov eax, 1
xor ecx, ecx
mov byte [esi + 1], al
push ecx
mov eax, 0x200
mov word [esi + 2], ax
mov word [esi + 4], cx
mov byte [esi + 6], cl
mov eax, dword [edi + 0x734]
mov ecx, dword [eax + 8]
push 0x10
lea edx, [esp + 0x26c]
push edx
push ecx
call fcn.0044b6b0
add esp, 0x10
test eax, eax
je 0x409525
mov edx, dword [esp + 0x264]
mov dword [esi + 7], edx
mov al, byte [edi + 0x3b1c]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov byte [esi + 0xb], al
mov eax, dword [esp + 0x2c]
mov cx, word [eax + 0x438]
push 0
mov word [esi + 0xd], cx
mov dx, word [eax + 0x43a]
mov ecx, dword [esp + 0x18]
push 0
mov word [esi + 0xf], dx
mov ax, word [eax + 0x43c]
push 0x1a1
push ecx
mov word [esi + 0x11], ax
call ebp
cmp eax, 0x1a1
jne 0x409758
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x14]
push edx
push 0x5f
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
call esi
test eax, eax
je 0x409758
cmp dword [esp + 0x10], 0x5f
jne 0x409758
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0x1400
push ecx
call ebp
cmp eax, 0x1400
jne 0x409758
mov ecx, dword [esp + 0x14]
push 0
lea edx, [esp + 0x28]
push edx
push 0x200
lea eax, [esp + 0x70]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409758
cmp dword [esp + 0x24], 0x200
jne 0x409758
mov edx, dword [str.j:Y]
mov eax, dword [0x59f644]
mov ecx, dword [0x59f648]
push 0
mov dword [esp + 0x68], edx
mov edx, dword [0x59f64c]
mov dword [esp + 0x6c], eax
mov eax, dword [edi + 0x734]
push 0
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edx
mov dl, byte [edi + 0x314]
mov byte [esp + 0x7c], 1
mov cl, byte [eax]
mov al, byte [edi + 0x360]
push 0x80
mov byte [esp + 0x81], cl
lea ecx, [esp + 0x84]
push ecx
push 0xffffffffffffffff
mov byte [esp + 0x8b], al
lea eax, [edi + 2]
push eax
push 0
push 0
mov byte [esp + 0x96], dl
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0x1000
push ebx
call ebp
cmp eax, 0x1000
jne 0x409758
push 0
lea edx, [esp + 0x14]
push edx
push 0x200
lea eax, [esp + 0x70]
push eax
push ebx
call esi
test eax, eax
je 0x409758
cmp dword [esp + 0x10], 0x200
jne 0x409758
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0x1600
push ecx
call ebp
cmp eax, 0x1600
jne 0x409758
mov edx, dword [str.j:Y]
mov esi, dword [esp + 0x18]
mov dword [esi], edx
mov eax, dword [0x59f644]
mov dword [esi + 4], eax
mov ecx, dword [0x59f648]
mov dword [esi + 8], ecx
mov edx, dword [0x59f64c]
mov dword [esi + 0xc], edx
lea ebp, [esi + 0x10]
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x28]
push eax
push 0x1f0
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov eax, dword [esp + 0x24]
je 0x40970a
test eax, eax
je 0x409734
push 0
lea edx, [esp + 0x14]
push edx
add eax, 0x10
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409758
mov eax, dword [esp + 0x24]
add eax, 0x10
cmp dword [esp + 0x10], eax
jne 0x409758
mov esi, dword [esp + 0x18]
jmp 0x4096e6
cmp dword [esp + 0x30], 0
je 0x409750
mov ecx, dword [esp + 0x38]
push ecx
push ebx
push edi
call fcn.00408c30
add esp, 0xc
mov dword [esp + 0x1c], eax
jmp 0x409758
mov dword [esp + 0x1c], 1
mov edx, dword [esp + 0x18]
push edx
call fcn.00401bc0
add esp, 4
test ebx, ebx
je 0x409775
cmp ebx, 0xffffffff
je 0x409775
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x409789
cmp eax, 0xffffffff
je 0x409789
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x1c], 0
je 0x40980a
cmp dword [0x5b2db8], 0
je 0x4097ba
call fcn.0041eda0
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40980a
push eax
push 0x54ffac
push str.Could_not_install_BCVE_UEFI_Loader.
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40980a
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + 0x734]
xor esi, esi
cmp dword [eax], esi
jbe 0x40980a
xor edi, edi
lea esp, [esp]
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + 0x35c]
movzx ecx, byte [ecx + 0x2af0]
push edx
lea edx, [esp + 0x688]
push edx
mov edx, dword [edi + eax + 8]
push ecx
push edx
call fcn.00407120
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x734]
inc esi
add esp, 0x10
add edi, 0x18
cmp esi, dword [eax]
jb 0x4097d0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x40981b
push eax
call fcn.00401bc0
add esp, 4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x88c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00524d83
add esp, 0x880
ret