Function at 0x407b20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xd0
mov eax, dword [0x4c6ee0]
xor eax, esp
mov dword [esp + 0xcc], eax
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push 0x4c7c08
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x40], ebx
mov byte [esp + 0x1b], bl
mov dword [esp + 0x24], ebx
call sub.libnvos.dll_NvOsGetSystemTime
mov ebp, eax
add esp, 4
cmp ebp, ebx
jne 0x408254
lea eax, [esp + 0x30]
push eax
push 0x16
mov byte [0x4c929c], bl
call sub.libnvflash.dll_NvFlashCommandGetOption
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x40825c
cmp byte [0x4c91f8], bl
je 0x407c18
lea ecx, [esp + 0x48]
push ecx
push 1
call sub.libnvflash.dll_NvFlashCommandGetOption
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x40825c
mov eax, dword [esp + 0x48]
cmp dword [eax], ebx
jne 0x407bbe
mov dword [esp + 0x10], str.bct_file_required_for_this_command
jmp 0x40825c
call fcn.004023a0
test al, al
jne 0x407bd4
mov dword [esp + 0x10], str.setbct_failed
jmp 0x40825c
call fcn.00401f90
test al, al
je 0x40825c
lea edx, [esp + 0x44]
push edx
push 5
call sub.libnvflash.dll_NvFlashCommandGetOption
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x40825c
mov esi, dword [esp + 0x44]
cmp esi, ebx
je 0x407c18
call fcn.00403590
test al, al
jne 0x407c18
mov dword [esp + 0x10], str.odm_data_failure
jmp 0x40825c
call fcn.00406610
test al, al
jne 0x407c2e
mov dword [esp + 0x10], str.Skip_error_check_handler_failed
jmp 0x40825c
mov edx, dword [0x4c918c]
mov eax, dword [0x4c91fc]
xor ecx, ecx
cmp edx, ebx
jbe 0x407c4b
nop
add ecx, dword [eax + 8]
sub edx, 1
mov eax, dword [eax + 0x10]
jne 0x407c40
push ebx
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x48], ecx
mov ecx, dword [0x4c9200]
push 0xc
push ecx
mov dword [esp + 0x34], 0xc
call sub.libnv3p.dll_Nv3pCommandSend
mov ebp, eax
add esp, 0x10
cmp ebp, ebx
jne 0x40825c
call fcn.00401f90
test al, al
jne 0x407c8e
mov dword [esp + 0x10], str.unable_to_do_start_partition
jmp 0x40825c
cmp dword [0x4c918c], ebx
mov edi, dword [0x4c91fc]
mov dword [esp + 0x18], ebx
jbe 0x407e46
mov edx, dword [edi + 4]
mov eax, dword [edi]
push edx
push eax
push str.setting_device:__d__d_n
call sub.libnvapputil.dll_NvAuPrintf
mov ecx, dword [edi]
push 0
lea eax, [esp + 0x5c]
push eax
mov dword [esp + 0x60], ecx
mov ecx, dword [0x4c9200]
mov edx, dword [edi + 4]
push 0xb
push ecx
mov dword [esp + 0x40], 0xb
mov dword [esp + 0x6c], edx
call sub.libnv3p.dll_Nv3pCommandSend
mov ebp, eax
add esp, 0x1c
test ebp, ebp
jne 0x40825c
call fcn.00401f90
test al, al
je 0x407e87
cmp byte [0x4c929c], 1
je 0x407d19
cmp byte [esp + 0xe4], 0
je 0x407d19
call fcn.00402120
cmp al, 1
jne 0x407e94
mov esi, dword [edi + 0xc]
xor ebx, ebx
cmp dword [edi + 8], ebx
jbe 0x407e2a
mov dword [esp + 0x24], 0x11
nop
mov edx, dword [esi]
push edx
push str.creating_partition:__s_n
call sub.libnvapputil.dll_NvAuPrintf
mov eax, dword [esi]
push eax
call sub.libnvos.dll_NvOsStrlen
add esp, 0xc
cmp eax, 0x3f
jbe 0x407d54
mov ebp, 0x3f
jmp 0x407d61
mov ecx, dword [esi]
push ecx
call sub.libnvos.dll_NvOsStrlen
add esp, 4
mov ebp, eax
mov edx, dword [esi]
push ebp
push edx
lea eax, [esp + 0x74]
push eax
call sub.libnvos.dll_NvOsMemcpy
mov byte [esp + ebp + 0x78], 0
mov ecx, dword [esi + 0x20]
mov dword [esp + 0xb8], ecx
mov edx, dword [esi + 0x24]
mov dword [esp + 0xbc], edx
mov eax, dword [esi + 0x18]
mov dword [esp + 0xc0], eax
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0xc4], ecx
mov edx, dword [esi + 4]
mov dword [esp + 0xc8], edx
mov eax, dword [esi + 8]
mov dword [esp + 0xcc], eax
mov ecx, dword [esi + 0x10]
mov dword [esp + 0xd0], ecx
mov edx, dword [esi + 0xc]
mov dword [esp + 0xd4], edx
mov eax, dword [esi + 0x28]
mov dword [esp + 0xd8], eax
mov ecx, dword [esi + 0x2c]
mov dword [esp + 0xdc], ecx
mov edx, dword [esi + 0x30]
push 0
lea ecx, [esp + 0x7c]
push ecx
mov dword [esp + 0xe8], edx
mov edx, dword [0x4c9200]
mov eax, dword [esi + 0x34]
push 0x11
push edx
mov dword [esp + 0xf4], eax
call sub.libnv3p.dll_Nv3pCommandSend
mov ebp, eax
add esp, 0x1c
test ebp, ebp
jne 0x40825c
call fcn.00401f90
test al, al
je 0x407ea1
mov esi, dword [esi + 0x3c]
add ebx, 1
cmp ebx, dword [edi + 8]
jb 0x407d30
mov eax, dword [esp + 0x18]
mov edi, dword [edi + 0x10]
add eax, 1
cmp eax, dword [0x4c918c]
mov dword [esp + 0x18], eax
jb 0x407ca4
xor ebx, ebx
xor eax, eax
call section..text
mov eax, dword [0x4c9200]
push ebx
push ebx
push 0xd
push eax
mov dword [esp + 0x34], 0xd
call sub.libnv3p.dll_Nv3pCommandSend
mov ebp, eax
add esp, 0x10
cmp ebp, ebx
jne 0x40825c
call fcn.00401f90
test al, al
jne 0x407eae
mov dword [esp + 0x10], str.unable_to_do_end_partition
jmp 0x40825c
mov dword [esp + 0x10], str.unable_to_do_set_device
jmp 0x40825c
mov dword [esp + 0x10], str.deleteall_failed
jmp 0x40825c
mov dword [esp + 0x10], str.unable_to_do_create_partition
jmp 0x40825c
cmp byte [0x4c929c], 1
jne 0x407ed8
cmp byte [esp + 0xe4], 0
je 0x407ed8
push 0xffffffffffffffff
mov edi, 0xe
call fcn.00406500
add esp, 4
test al, al
je 0x40825c
lea ecx, [esp + 0x3c]
push ecx
push 0x1f
call sub.libnvflash.dll_NvFlashCommandGetOption
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x407f04
push str.nvflash_cmd_create
push str._s:_error_getting_NCT_part_info._n
call sub.libnvapputil.dll_NvAuPrintf
add esp, 8
jmp 0x40825c
mov ecx, dword [0x4c918c]
cmp ecx, ebx
mov ebp, dword [0x4c91fc]
mov dword [esp + 0x18], ebx
jbe 0x407f96
lea esp, [esp]
mov esi, dword [ebp + 0xc]
xor ebx, ebx
cmp dword [ebp + 8], ebx
jbe 0x407f84
lea ebx, [ebx]
cmp dword [esi + 0x38], 0
je 0x407f73
mov eax, dword [esi + 8]
cmp eax, 1
je 0x407f73
cmp eax, 3
je 0x407f73
mov edi, dword [esi]
call fcn.00402090
test al, al
jne 0x407f73
mov eax, dword [esi + 0x38]
lea edx, [esp + 0x54]
push edx
push eax
call sub.libnvos.dll_NvOsStat
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
add esp, 8
add dword [0x4c7fd0], ecx
adc dword [0x4c7fd4], edx
mov esi, dword [esi + 0x3c]
add ebx, 1
cmp ebx, dword [ebp + 8]
jb 0x407f30
mov ecx, dword [0x4c918c]
mov eax, dword [esp + 0x18]
mov ebp, dword [ebp + 0x10]
add eax, 1
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x407f20
test ecx, ecx
mov eax, dword [0x4c91fc]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], 0
jbe 0x408241
nop
cmp dword [eax + 8], 0
mov esi, dword [eax + 0xc]
mov dword [esp + 0x28], 0
jbe 0x408227
cmp dword [esi + 8], 0xc
jne 0x408026
cmp dword [esp + 0x34], 0
je 0x40800f
cmp dword [0x4c8f00], 0
je 0x40800f
cmp byte [esp + 0x39], 0
je 0x407ffb
mov eax, dword [esi + 0x38]
test eax, eax
je 0x407ff2
push eax
call sub.libnvos.dll_NvOsFree
add esp, 4
mov eax, dword [esp + 0x30]
mov dword [esi + 0x38], eax
jmp 0x408026
cmp dword [esi + 0x38], 0
jne 0x408026
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x38], ecx
mov byte [esp + 0x39], 1
jmp 0x408026
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40801f
push eax
call sub.libnvos.dll_NvOsFree
add esp, 4
mov dword [esi + 0x38], 0
lea edx, [esp + 0x20]
push edx
push 0x21
call sub.libnvflash.dll_NvFlashCommandGetOption
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40825c
cmp dword [esp + 0x20], eax
je 0x4080a3
mov eax, dword [esi]
push 0x434ca8
push eax
call sub.libnvos.dll_NvOsStrcmp
add esp, 8
test eax, eax
jne 0x4080a3
mov ecx, dword [esp + 0x20]
push str.unknown
push ecx
call sub.libnvos.dll_NvOsStrcmp
add esp, 8
test eax, eax
je 0x4080a3
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40807f
push eax
call sub.libnvos.dll_NvOsFree
add esp, 4
mov edx, dword [esp + 0x20]
push edx
call sub.libnvos.dll_NvOsStrlen
add eax, 1
push eax
call sub.libnvos.dll_NvOsAlloc
mov dword [esi + 0x38], eax
mov ecx, dword [esp + 0x28]
push ecx
push eax
call sub.libnvos.dll_NvOsStrcpy
add esp, 0x10
cmp dword [esi + 0x38], 0
jne 0x4080c3
mov edx, dword [0x4bfef0]
mov eax, dword [esi]
push edx
push eax
call sub.libnvos.dll_NvOsStrcmp
add esp, 8
test eax, eax
jne 0x408206
mov eax, dword [esi + 8]
cmp eax, 1
je 0x408206
cmp eax, 3
je 0x408206
mov edi, dword [esi]
call fcn.00402090
test al, al
jne 0x408206
lea ecx, [esp + 0x1f]
push ecx
push 0xf
call sub.libnvflash.dll_NvFlashCommandGetOption
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40825c
cmp byte [esp + 0x1f], al
je 0x408116
mov eax, dword [esi + 4]
call fcn.00407840
test al, al
je 0x40825c
mov eax, dword [0x4bfef0]
mov ecx, dword [esi]
mov edx, dword [esi + 4]
push eax
push ecx
mov dword [esp + 0x5c], edx
call sub.libnvos.dll_NvOsStrcmp
add esp, 8
test eax, eax
jne 0x40815c
mov eax, dword [esp + 0x3c]
cmp dword [eax], 0
je 0x40813f
mov ebx, dword [eax]
jmp 0x40815f
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40814a
mov ebx, eax
jmp 0x40815f
push str.Warning:_No_NCT_file_present._Skip_NCT_partition_download_to_continue._n
call sub.libnvapputil.dll_NvAuPrintf
add esp, 4
jmp 0x408206
mov ebx, dword [esi + 0x38]
cmp dword [esi + 0x30], 0x808
mov dword [esp + 0x58], ebx
jne 0x408174
xor eax, eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
cmp dword [esi + 8], 0xc
jne 0x4081b2
mov edi, 0x4347ec
mov eax, ebx
call fcn.00402e30
test al, al
je 0x4081b2
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 4]
push edx
push eax
push ecx
call fcn.0040afe0
add esp, 0xc
cmp byte [esp + 0x39], 0
mov byte [esp + 0x17], al
je 0x4081f5
mov dword [esi + 0x38], 0
jmp 0x4081f5
cmp dword [esi + 8], 0xd
jne 0x4081dc
mov edi, 0x4347ec
mov eax, ebx
call fcn.00402e30
test al, al
je 0x4081dc
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 4]
push edx
push eax
push ecx
push ebx
call fcn.004039d0
jmp 0x4081f2
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 8]
push edx
push eax
push ecx
lea edx, [esp + 0x60]
push edx
call fcn.00406ed0
add esp, 0x10
test al, al
je 0x40825c
call fcn.00401f90
test al, al
je 0x408294
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov esi, dword [esi + 0x3c]
add ecx, 1
cmp ecx, dword [eax + 8]
mov dword [esp + 0x28], ecx
jb 0x407fc5
mov ecx, dword [0x4c918c]
mov edx, dword [esp + 0x18]
mov eax, dword [eax + 0x10]
add edx, 1
cmp edx, ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], eax
jb 0x407fb0
push 0x4c7c00
call sub.libnvos.dll_NvOsGetSystemTime
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40829e
mov dword [esp + 0x10], str.Getting_system_time_failed
mov eax, dword [esp + 0x10]
xor bl, bl
test eax, eax
je 0x408274
push eax
push 0x4322fc
call sub.libnvapputil.dll_NvAuPrintf
add esp, 8
test ebp, ebp
je 0x408308
mov eax, dword [esp + 0x24]
push ebp
push eax
push str.failed_executing_command__d_NvError_0x_x_n
call sub.libnvapputil.dll_NvAuPrintf
add esp, 0xc
jmp 0x408308
mov dword [esp + 0x10], str.failed_to_verify_partition
jmp 0x40825c
mov ecx, dword [0x4c7c00]
sub ecx, dword [0x4c7c08]
push ecx
push str.Create__format_and_download__took__d_Secs_n
call sub.libnvapputil.dll_NvAuPrintf
add esp, 8
cmp byte [esp + 0x17], 0
je 0x4082da
cmp dword [esp + 0x34], 0
je 0x4082fe
mov edx, dword [0x4c8f00]
push edx
call fcn.0040a250
push eax
push str.Completed_flash_of_SKU:__s_n
jmp 0x4082f6
cmp dword [esp + 0x34], 0
je 0x4082fe
mov eax, dword [0x4c8f00]
test eax, eax
je 0x4082fe
push eax
call fcn.0040a250
push eax
push str.Warning:_Fuse_bypass_partition_is_not_present__could_not_bypass_SKU:__s_n
call sub.libnvapputil.dll_NvAuPrintf
add esp, 0xc
or eax, 0xffffffff
mov bl, 1
call section..text
mov ecx, dword [esp + 0xdc]
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
xor ecx, esp
call fcn.0042a6c4
add esp, 0xd0
ret