Function at 0x403c30
Capabilities:
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x228
mov eax, dword [0x40a004]
xor eax, esp
mov dword [esp + 0x224], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [esp + 4], eax
xor eax, eax
push edi
push 0x30444
mov dword [esp + 0x34], 0x3c
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], 0x15
mov dword [esp + 0x40], 1
mov dword [esp + 0x3c], 1
mov dword [esp + 0x20], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, eax
add esp, 4
mov edx, ecx
mov dword [esp + 0x14], edx
add ecx, 0x30
jne 0x403cc1
push str.malloc_failed_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov dword [edx + 8], ecx
add ecx, 0x400
mov dword [edx], ecx
push 4
mov dword [edx + 0x14], 0
lea eax, [ecx + 4]
mov dword [edx + 0x18], 0
add ecx, 0x10006
mov dword [edx + 0x1c], 0
mov dword [edx + 0xc], eax
mov dword [edx + 4], ecx
mov dword [edx + 0x28], 0
mov dword [edx + 0x2c], 0x3e8
call fcn.00405826
add esp, 4
mov esi, eax
mov dword [esp + 0x54], esi
push 8
call fcn.00405826
add esp, 4
mov edi, eax
push 0x407228
mov dword [edi], 0
mov dword [edi + 4], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x40a400], eax
test eax, eax
jne 0x403d5d
push section..text
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x403d86
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateChannel
push eax
call esi
push str.ReleaseChannel
push dword [0x40a400]
mov dword [0x40a3f8], eax
call esi
mov esi, dword [esp + 0x54]
mov dword [0x40a3fc], eax
cmp dword [ebp + 8], 1
mov dword [esi], edi
mov edi, dword [esp + 0x14]
mov dword [edi + 0x10], esi
jle 0x405661
mov esi, dword [esp + 8]
nop dword [eax]
mov ecx, dword [esi + 4]
mov edx, str.__wait
mov al, byte [ecx]
cmp al, byte [edx]
mov byte [esp + 0xf], al
mov eax, dword [esi + 4]
jne 0x403ddc
cmp byte [esp + 0xf], 0
je 0x403dd8
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
mov byte [esp + 0xf], al
mov eax, dword [esi + 4]
jne 0x403ddc
add ecx, 2
add edx, 2
cmp byte [esp + 0xf], 0
jne 0x403da8
xor ecx, ecx
jmp 0x403de1
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x403e0a
cmp dword [ebp + 8], 2
jbe 0x403e6c
push dword [esi + 8]
add esi, 8
mov dword [esp + 0xc], esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
add eax, eax
mov dword [esp + 0x30], eax
jmp 0x403e55
mov ecx, str.__verbose
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403e30
test dl, dl
je 0x403e2c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403e30
add eax, 2
add ecx, 2
test dl, dl
jne 0x403e10
xor eax, eax
jmp 0x403e35
sbb eax, eax
or eax, 1
test eax, eax
jne 0x403e8d
cmp dword [ebp + 8], 2
jbe 0x403e6c
push dword [esi + 8]
add esi, 8
mov dword [esp + 0xc], esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [edi + 0x28], eax
mov eax, dword [ebp + 8]
add eax, 0xfffffffe
mov dword [ebp + 8], eax
cmp eax, 1
jg 0x403da0
jmp 0x405661
push str.bad_option_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp dword [ebp + 8], 1
jbe 0x405661
nop word [eax + eax]
push 3
lea eax, [esi + 4]
push 0x407bc4
push dword [eax]
mov dword [esp + 0x1c], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x404495
cmp dword [ebp + 8], 3
jbe 0x4052b0
mov eax, dword [esp + 8]
mov esi, dword [esi + 8]
add eax, 0xc
mov dword [esp + 0x24], esi
mov dword [esp + 8], eax
mov ecx, dword [eax]
mov dword [esp + 0x4c], ecx
cmp word [ecx], 0x6172
jne 0x403ef4
cmp byte [ecx + 2], 0x6d
je 0x40519d
push 0
lea eax, [esp + 0x50]
push eax
push ecx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoll]
mov ecx, dword [esp + 0x58]
add esp, 0xc
mov dword [esp + 0x20], eax
cmp byte [ecx], 0
jne 0x4051a8
cmp dword [esp + 0x2c], 0
je 0x403f50
mov edx, dword [esp + 0x1c]
mov ecx, 0x840
test edx, edx
cmovne ecx, edx
mov edx, esi
push ecx
push dword [esp + 0x3c]
mov ecx, edi
push eax
call fcn.00401bb0
mov eax, dword [ebp + 8]
add esp, 0xc
inc dword [esp + 0x2c]
sub eax, 3
mov esi, dword [esp + 8]
jmp 0x40518c
xor esi, esi
mov dword [esp + 0x18], esi
test esi, esi
jne 0x403f7d
mov eax, dword [esp + 0x30]
cdq
sub eax, edx
sar eax, 1
push eax
push str.Waiting_for_connection___ds__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 2
xor esi, esi
mov dword [esp + 0x14], 0
push esi
push esi
lea eax, [esp + 0x68]
mov dword [esp + 0x68], 0x4d36e978
push eax
mov dword [esp + 0x70], 0x11cee325
mov dword [esp + 0x74], 0x8c1bf
mov dword [esp + 0x78], 0x1803e12b
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403fd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_device_information_set._Error_code:__ld_n
call fcn.00401080
add esp, 8
jmp 0x40409c
lea eax, [esp + 0x7c]
mov dword [esp + 0x7c], 0x1c
push eax
push 0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x404095
nop dword [eax]
nop dword [eax + eax]
lea eax, [esp + 0x58]
mov dword [esp + 0x50], 0
push eax
push 0x104
lea eax, [esp + 0x128]
mov dword [esp + 0x60], 0x104
push eax
lea eax, [esp + 0x5c]
push eax
push 0xc
lea eax, [esp + 0x90]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
lea eax, [esp + 0x120]
push 0x407470
push eax
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
jne 0x404066
lea eax, [esp + 0x7c]
inc esi
push eax
push esi
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x404000
jmp 0x404095
add eax, 0x12
push 3
push eax
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov byte [esp + 0x57], 0
lea eax, [esp + 0x54]
push 0
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
mov dword [esp + 0x10], eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
cmp dword [eax + 0x28], 0
je 0x4040e2
movd xmm0, esi
cvtdq2ps xmm0, xmm0
push edi
sub esp, 8
mulss xmm0, dword [0x408130]
cvtps2pd xmm0, xmm0
movsd qword [esp], xmm0
push str.CurTime:__.1f__CurPort:__d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0x14
test edi, edi
jne 0x404101
cmp esi, dword [esp + 0x30]
jge 0x4051ea
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
jmp 0x403f52
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0x10]
mov esi, dword [eax]
mov dword [esi], 0
mov eax, dword [0x40a3f8]
test eax, eax
je 0x40415a
lea edi, [esi + 4]
push 0
push edi
call eax
add esp, 8
test eax, eax
je 0x404156
mov ecx, dword [edi]
lea edx, [esp + 0x6c]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], 0
mov dword [esp + 0x74], 0x1c200
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0x10]
call eax
neg eax
sbb eax, eax
neg eax
mov dword [esi], eax
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 4]
mov ecx, edi
or dword [edi + 0x14], 3
mov byte [eax], 0x7e
mov dword [edi + 0x24], 1
call fcn.00401640
mov ecx, edi
call fcn.00401750
mov ecx, edi
call fcn.00401ab0
cmp eax, 0x81
jne 0x40520b
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.CHECK_BAUD_bootrom_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.BSL_REP_VER:
push 2
call esi
add esp, 4
push eax
call fcn.00401050
mov esi, dword [edi]
add esp, 8
movzx ecx, byte [esi + 2]
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
push ecx
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
lea edx, [esi + 4]
mov ecx, eax
call fcn.00401230
add esp, 4
xor edx, edx
mov ecx, edi
push 0
push 0
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
test eax, eax
je 0x40528f
cmp dword [edi + 0x20], 6
jl 0x40526a
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
jne 0x40526d
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.CMD_CONNECT_bootrom_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
mov edx, dword [esp + 0x2c]
mov ecx, edi
push 0x210
push dword [esp + 0x44]
push dword [esp + 0x30]
call fcn.00401bb0
mov eax, dword [esp + 0x48]
add esp, 0x14
mov ecx, edi
test eax, eax
je 0x404283
push 0x210
push 0
push eax
lea edx, [esp + 0xfc]
call fcn.00401bb0
add esp, 0xc
jmp 0x4042ce
push 0
push 0
mov edx, 4
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
test eax, eax
je 0x40524d
cmp dword [edi + 0x20], 6
jl 0x40522c
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
jne 0x40522f
push str.EXEC_FDL1_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
mov eax, dword [edi + 4]
add esp, 8
and dword [edi + 0x14], 0xfffffffe
mov ecx, edi
xor esi, esi
mov byte [eax], 0x7e
mov dword [edi + 0x24], 1
call fcn.00401640
mov ecx, edi
call fcn.00401750
mov ecx, edi
call fcn.00401ab0
cmp eax, 0x81
je 0x40435c
push str.CHECK_BAUD_FAIL_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
inc esi
add esp, 8
cmp esi, 4
jg 0x40520b
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
mov ecx, edi
call fcn.00401ab0
cmp eax, 0x81
jne 0x404312
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.CHECK_BAUD_FDL1_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.BSL_REP_VER:
push 2
call esi
add esp, 4
push eax
call fcn.00401050
mov esi, dword [edi]
add esp, 8
movzx ecx, byte [esi + 2]
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
push ecx
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
lea edx, [esi + 4]
mov ecx, eax
call fcn.00401230
add esp, 4
xor edx, edx
mov ecx, edi
push 0
push 0
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
test eax, eax
je 0x40528f
cmp dword [edi + 0x20], 6
jl 0x40526a
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
jne 0x40526d
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.CMD_CONNECT_FDL1_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
cmp dword [esp + 0x3c], 0
je 0x404482
push 0
push 0
mov edx, 0x13
mov ecx, edi
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
test eax, eax
je 0x40524d
cmp dword [edi + 0x20], 6
jl 0x40522c
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
jne 0x40522f
push str.KEEP_CHARGE_FDL1_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
mov eax, dword [ebp + 8]
inc dword [esp + 0x2c]
sub eax, 3
mov esi, dword [esp + 8]
jmp 0x40518c
mov eax, dword [esp + 0x10]
mov ecx, str.exec
mov esi, dword [eax]
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4044c2
test dl, dl
je 0x4044be
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4044c2
add eax, 2
add ecx, 2
test dl, dl
jne 0x4044a2
xor eax, eax
jmp 0x4044c7
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4045ab
cmp dword [esp + 0x2c], 1
jle 0x40459a
push eax
push eax
lea edx, [eax + 4]
mov ecx, edi
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov esi, dword [edi + 0x2c]
mov eax, 0x3a98
cmp esi, eax
mov ecx, edi
cmovg eax, esi
mov dword [edi + 0x2c], eax
call fcn.00401750
mov dword [edi + 0x2c], esi
test eax, eax
je 0x4052d4
mov ecx, edi
call fcn.00401ab0
cmp eax, 0x96
jne 0x40453b
push str.FDL2:_incompatible_partition_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x404546
cmp eax, 0x80
jne 0x4052d1
push str.EXEC_FDL2_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
cmp dword [esp + 0x28], 0x15
jne 0x40459a
movsd xmm0, qword [0x408140]
movsd xmm1, qword [0x408138]
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
cvttsd2si eax, xmm0
xor edx, edx
movzx ecx, al
mov eax, 0x20
div ecx
mov dword [esp + 0x40], ecx
shl ecx, 6
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
mov eax, dword [ebp + 8]
mov esi, dword [esp + 0x10]
dec eax
mov dword [esp + 8], esi
jmp 0x40518c
mov ecx, str.exec_addr
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4045d2
test dl, dl
je 0x4045ce
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4045d2
add eax, 2
add ecx, 2
test dl, dl
jne 0x4045b2
xor eax, eax
jmp 0x4045d7
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404682
cmp dword [ebp + 8], 2
jbe 0x405301
mov esi, dword [esp + 8]
add esi, 8
push eax
push eax
mov dword [esp + 0x10], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
mov dword [esp + 0x34], eax
xorps xmm0, xmm0
movaps xmmword [esp + 0xf0], xmm0
movaps xmmword [esp + 0x100], xmm0
push eax
lea eax, [esp + 0xf4]
movq qword [esp + 0x114], xmm0
push str.custom_exec_no_verify__x.bin
push eax
call fcn.00403be0
add esp, 0xc
lea eax, [esp + 0xf0]
push 0x407dc8
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
test eax, eax
je 0x4052ef
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [esp + 0x38]
add esp, 4
push eax
push str.current_exec_addr_is_0x_x_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
jmp 0x405186
mov ecx, str.nand_id
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4046b0
test dl, dl
je 0x4046ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4046b0
add eax, 2
add ecx, 2
test dl, dl
jne 0x404690
xor eax, eax
jmp 0x4046b5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40478a
cmp dword [ebp + 8], 2
jbe 0x40531f
mov esi, dword [esp + 8]
add esi, 8
push eax
push eax
mov dword [esp + 0x10], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
movsd xmm0, qword [0x408140]
mov ecx, eax
and ecx, 3
mov dword [esp + 0x34], eax
add esp, 0xc
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
mov eax, dword [esp + 0x28]
sar eax, 2
and eax, 3
cvttsd2si ecx, xmm0
movsd xmm0, qword [0x408140]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
movzx ecx, cl
mov dword [esp + 0x40], ecx
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
cvttsd2si eax, xmm0
xor edx, edx
movsd xmm0, qword [0x408140]
movzx ecx, al
mov eax, 0x20
div ecx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x28]
sar eax, 4
and eax, 3
movd xmm1, eax
cvtdq2pd xmm1, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
push dword [esp + 0x28]
cvttsd2si eax, xmm0
push str.current_nand_id_is_0x_x_n
push 2
movzx eax, al
shl eax, 6
mov dword [esp + 0x54], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
jmp 0x405186
mov ecx, str.read_flash
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4047b1
test dl, dl
je 0x4047ad
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4047b1
add eax, 2
add ecx, 2
test dl, dl
jne 0x404791
xor eax, eax
jmp 0x4047b6
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40485f
cmp dword [ebp + 8], 5
jbe 0x40535b
mov esi, dword [esp + 8]
mov ecx, dword [esi + 8]
call fcn.00403a00
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], edx
call fcn.00403a00
mov ecx, dword [esp + 8]
mov esi, eax
mov dword [esp + 0x50], esi
mov edi, edx
mov ecx, dword [ecx + 0x10]
call fcn.00403a00
mov ecx, eax
mov dword [esp + 0x20], eax
add ecx, esi
mov esi, edx
adc esi, edi
add ecx, dword [esp + 0x18]
adc esi, dword [esp + 0x24]
xor eax, eax
or esi, edx
or esi, edi
or esi, dword [esp + 0x24]
or eax, esi
jne 0x40533d
mov esi, dword [esp + 8]
mov eax, 0x400
mov ecx, dword [esp + 0x1c]
add esi, 0x14
mov edi, dword [esp + 0x14]
test ecx, ecx
mov edx, dword [esp + 0x18]
cmovne eax, ecx
mov dword [esp + 8], esi
push eax
push dword [esi]
mov ecx, edi
push dword [esp + 0x28]
push dword [esp + 0x5c]
call fcn.00401e50
mov eax, dword [ebp + 8]
add esp, 0x10
sub eax, 5
jmp 0x40518c
mov ecx, str.read_mem
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404886
test dl, dl
je 0x404882
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404886
add eax, 2
add ecx, 2
test dl, dl
jne 0x404866
xor eax, eax
jmp 0x40488b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404914
cmp dword [ebp + 8], 4
jbe 0x40535b
mov ecx, dword [esp + 8]
mov ecx, dword [ecx + 8]
call fcn.00403a00
mov esi, eax
mov edi, edx
mov eax, dword [esp + 8]
mov dword [esp + 0x20], esi
mov ecx, dword [eax + 0xc]
call fcn.00403a00
mov ecx, eax
mov dword [esp + 0x24], eax
add ecx, esi
mov esi, edx
adc esi, edi
xor ecx, ecx
or esi, edx
or esi, edi
or ecx, esi
jne 0x40533d
mov esi, dword [esp + 8]
mov eax, 0x400
mov ecx, dword [esp + 0x1c]
add esi, 0x10
mov edi, dword [esp + 0x14]
test ecx, ecx
mov edx, dword [esp + 0x20]
cmovne eax, ecx
mov dword [esp + 8], esi
push eax
push dword [esi]
mov ecx, edi
push dword [esp + 0x2c]
call fcn.00402050
mov eax, dword [ebp + 8]
add esp, 0xc
sub eax, 4
jmp 0x40518c
mov ecx, str.part_size
mov eax, esi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404940
test dl, dl
je 0x40493c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404940
add eax, 2
add ecx, 2
test dl, dl
jne 0x404920
xor eax, eax
jmp 0x404945
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40496c
cmp dword [ebp + 8], 2
jbe 0x40535b
mov esi, dword [esp + 8]
mov ecx, edi
add esi, 8
mov dword [esp + 8], esi
mov edx, dword [esi]
call fcn.004037e0
jmp 0x405186
mov ecx, str.read_part
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404993
test dl, dl
je 0x40498f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404993
add eax, 2
add ecx, 2
test dl, dl
jne 0x404973
xor eax, eax
jmp 0x404998
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404a40
cmp dword [ebp + 8], 5
jbe 0x405397
mov edi, dword [esp + 8]
lea edx, [esp + 0x40]
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x58], eax
call fcn.00403ae0
mov ecx, dword [edi + 0x10]
mov esi, eax
mov dword [esp + 0x24], edx
lea edx, [esp + 0x40]
call fcn.00403ae0
mov ecx, edx
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x24]
mov edi, eax
add edi, esi
mov dword [esp + 0x20], ecx
adc ecx, edx
cmp ecx, edx
jb 0x405379
ja 0x4049f9
cmp edi, esi
jb 0x405379
mov ecx, dword [esp + 8]
mov eax, 0x1000
mov edi, dword [esp + 0x1c]
add ecx, 0x14
test edi, edi
mov dword [esp + 8], ecx
cmovne eax, edi
mov edi, dword [esp + 0x14]
push eax
push dword [ecx]
mov ecx, edi
push dword [esp + 0x28]
push dword [esp + 0x5c]
push edx
mov edx, dword [esp + 0x6c]
push esi
call fcn.00402310
mov eax, dword [ebp + 8]
add esp, 0x18
mov esi, dword [esp + 8]
sub eax, 5
jmp 0x40518c
mov ecx, str.partition_list
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404a67
test dl, dl
je 0x404a63
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404a67
add eax, 2
add ecx, 2
test dl, dl
jne 0x404a47
xor eax, eax
jmp 0x404a6c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404a93
cmp dword [ebp + 8], 2
jbe 0x4053b5
mov esi, dword [esp + 8]
mov ecx, edi
add esi, 8
mov dword [esp + 8], esi
mov edx, dword [esi]
call fcn.00402d20
jmp 0x405186
mov ecx, str.repartition
mov eax, esi
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404ac0
test dl, dl
je 0x404abc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404ac0
add eax, 2
add ecx, 2
test dl, dl
jne 0x404aa0
xor eax, eax
jmp 0x404ac5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404b59
cmp dword [ebp + 8], 2
jbe 0x4053d3
mov eax, dword [esp + 8]
mov edi, dword [edi + 0xc]
add eax, 8
push ecx
mov edx, edi
mov dword [esp + 0xc], eax
mov ecx, dword [eax]
call fcn.00402980
add esp, 4
mov ecx, str.repartition
mov esi, eax
call fcn.00401ad0
imul eax, esi, 0x4c
mov edx, 0xb
push eax
push edi
mov edi, dword [esp + 0x1c]
mov ecx, edi
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
test eax, eax
je 0x4052d4
cmp dword [edi + 0x20], 6
jl 0x40526a
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
jne 0x40526d
mov esi, dword [esp + 8]
jmp 0x405186
mov ecx, str.erase_part
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404b80
test dl, dl
je 0x404b7c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404b80
add eax, 2
add ecx, 2
test dl, dl
jne 0x404b60
xor eax, eax
jmp 0x404b85
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404c00
cmp dword [ebp + 8], 2
jbe 0x40540f
mov eax, dword [esp + 8]
mov ecx, str.erase_partition
add eax, 8
mov dword [esp + 8], eax
mov esi, dword [eax]
call fcn.00401ad0
push 0x58
lea eax, [esp + 0x9c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor edx, edx
cmp edx, 0x24
jae 0x4053f1
mov al, byte [edx + esi]
movsx ecx, al
mov byte [esp + edx*2 + 0x98], al
mov eax, ecx
sar eax, 8
mov byte [esp + edx*2 + 0x99], al
inc edx
test ecx, ecx
jne 0x404bc0
push 0x4c
lea eax, [esp + 0x9c]
mov dword [esp + 0xe4], ecx
push eax
lea edx, [ecx + 0xa]
jmp 0x404b0c
mov ecx, str.write_part
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404c27
test dl, dl
je 0x404c23
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404c27
add eax, 2
add ecx, 2
test dl, dl
jne 0x404c07
xor eax, eax
jmp 0x404c2c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404cda
cmp dword [ebp + 8], 3
jbe 0x40542d
mov esi, dword [esp + 8]
push str.fixnv
push dword [esi + 8]
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
jne 0x404ca2
push str.runtimenv
push dword [esi + 8]
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
jne 0x404ca2
mov edx, dword [esp + 0x1c]
mov ecx, esi
add ecx, 0xc
mov eax, 0x1000
test edx, edx
mov dword [esp + 8], ecx
cmovne eax, edx
mov edx, dword [esi + 8]
push eax
push dword [ecx]
mov ecx, edi
call fcn.00403000
mov eax, dword [ebp + 8]
add esp, 8
mov esi, dword [esp + 8]
sub eax, 3
jmp 0x40518c
mov ecx, dword [esp + 8]
mov eax, 0x1000
mov edx, dword [esp + 0x1c]
add ecx, 0xc
test edx, edx
mov dword [esp + 8], ecx
cmovne eax, edx
mov edx, dword [esi + 8]
push eax
push dword [ecx]
mov ecx, edi
call fcn.004032d0
mov eax, dword [ebp + 8]
add esp, 8
mov esi, dword [esp + 8]
sub eax, 3
jmp 0x40518c
mov ecx, str.read_pactime
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404d01
test dl, dl
je 0x404cfd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404d01
add eax, 2
add ecx, 2
test dl, dl
jne 0x404ce1
xor eax, eax
jmp 0x404d06
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404d22
mov ecx, edi
call fcn.00402660
mov eax, dword [ebp + 8]
mov esi, dword [esp + 0x10]
dec eax
mov dword [esp + 8], esi
jmp 0x40518c
mov ecx, str.blk_size
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404d50
test dl, dl
je 0x404d4c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404d50
add eax, 2
add ecx, 2
test dl, dl
jne 0x404d30
xor eax, eax
jmp 0x404d55
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404da5
cmp dword [ebp + 8], 2
jbe 0x40544b
mov esi, dword [esp + 8]
add esi, 8
push eax
push eax
mov dword [esp + 0x10], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
mov ecx, eax
add esp, 0xc
test ecx, ecx
jns 0x404d8e
mov dword [esp + 0x1c], 0
jmp 0x405186
cmp ecx, 0xffff
mov eax, 0xffff
cmovg ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x405186
mov ecx, str.chip_uid
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404dd0
test dl, dl
je 0x404dcc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404dd0
add eax, 2
add ecx, 2
test dl, dl
jne 0x404db0
xor eax, eax
jmp 0x404dd5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404e5e
push eax
push eax
lea edx, [eax + 0x1a]
mov ecx, edi
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
mov ecx, edi
call fcn.00401ab0
cmp eax, 0xab
jne 0x4052d1
push str.BSL_REP_READ_CHIP_UID:
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
mov esi, dword [edi]
add esp, 8
movzx ecx, byte [esi + 2]
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
push ecx
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
lea edx, [esi + 4]
mov ecx, eax
call fcn.00401230
mov eax, dword [ebp + 8]
add esp, 4
mov esi, dword [esp + 0x10]
dec eax
mov dword [esp + 8], esi
jmp 0x40518c
mov ecx, str.disable_transcode
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404e85
test dl, dl
je 0x404e81
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404e85
add eax, 2
add ecx, 2
test dl, dl
jne 0x404e65
xor eax, eax
jmp 0x404e8a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404eec
push eax
push eax
lea edx, [eax + 0x21]
mov ecx, edi
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
test eax, eax
je 0x4052d4
cmp dword [edi + 0x20], 6
jl 0x40526a
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
jne 0x40526d
mov eax, dword [ebp + 8]
and dword [edi + 0x14], 0xfffffffd
dec eax
mov esi, dword [esp + 0x10]
mov dword [esp + 8], esi
jmp 0x40518c
mov ecx, str.transcode
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404f13
test dl, dl
je 0x404f0f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404f13
add eax, 2
add ecx, 2
test dl, dl
jne 0x404ef3
xor eax, eax
jmp 0x404f18
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404f5c
cmp dword [ebp + 8], 2
jbe 0x40535b
mov esi, dword [esp + 8]
add esi, 8
mov dword [esp + 8], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
cmp eax, 2
jae 0x40535b
mov ecx, dword [edi + 0x14]
neg eax
sbb eax, eax
and ecx, 0xfffffffd
and eax, 2
or eax, ecx
mov dword [edi + 0x14], eax
jmp 0x405186
mov ecx, str.keep_charge
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404f83
test dl, dl
je 0x404f7f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404f83
add eax, 2
add ecx, 2
test dl, dl
jne 0x404f63
xor eax, eax
jmp 0x404f88
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404fb2
cmp dword [ebp + 8], 2
jbe 0x405469
mov esi, dword [esp + 8]
add esi, 8
mov dword [esp + 8], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [esp + 0x40], eax
jmp 0x405183
mov ecx, str.timeout
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404fe0
test dl, dl
je 0x404fdc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404fe0
add eax, 2
add ecx, 2
test dl, dl
jne 0x404fc0
xor eax, eax
jmp 0x404fe5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40500e
cmp dword [ebp + 8], 2
jbe 0x405487
mov esi, dword [esp + 8]
add esi, 8
mov dword [esp + 8], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [edi + 0x2c], eax
jmp 0x405183
mov ecx, str.end_data
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405035
test dl, dl
je 0x405031
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405035
add eax, 2
add ecx, 2
test dl, dl
jne 0x405015
xor eax, eax
jmp 0x40503a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x405064
cmp dword [ebp + 8], 2
jbe 0x4054a5
mov esi, dword [esp + 8]
add esi, 8
mov dword [esp + 8], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [esp + 0x3c], eax
jmp 0x405183
mov ecx, str.reset
mov eax, esi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405090
test dl, dl
je 0x40508c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405090
add eax, 2
add ecx, 2
test dl, dl
jne 0x405070
xor eax, eax
jmp 0x405095
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4050f5
lea edx, [eax + 5]
push 0
push 0
mov ecx, edi
call fcn.00401510
add esp, 8
mov ecx, edi
call fcn.00401640
mov ecx, edi
call fcn.00401750
test eax, eax
je 0x4052d4
cmp dword [edi + 0x20], 6
jl 0x40526a
mov eax, dword [edi]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
cmp ecx, 0x80
jne 0x40526d
mov eax, dword [ebp + 8]
mov esi, dword [esp + 0x10]
dec eax
mov dword [esp + 8], esi
jmp 0x40518c
mov ecx, str.poweroff
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405120
test dl, dl
je 0x40511c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405120
add eax, 2
add ecx, 2
test dl, dl
jne 0x405100
xor eax, eax
jmp 0x405125
sbb eax, eax
or eax, 1
test eax, eax
jne 0x405131
lea edx, [eax + 0x17]
jmp 0x40509c
mov eax, str.verbose
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x405156
test cl, cl
je 0x405152
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x405156
add esi, 2
add eax, 2
test cl, cl
jne 0x405136
xor eax, eax
jmp 0x40515b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4054e1
cmp dword [ebp + 8], 2
jbe 0x4054c3
mov esi, dword [esp + 8]
add esi, 8
mov dword [esp + 8], esi
push dword [esi]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [edi + 0x28], eax
add esp, 4
mov eax, dword [ebp + 8]
sub eax, 2
mov dword [ebp + 8], eax
cmp eax, 1
jg 0x403ea0
jmp 0x405661
mov al, byte [ecx + 3]
cmp al, 0x2b
je 0x4051c9
test al, al
je 0x4051c9
push str.bad_command_args_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.ram_address_is_unknown_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.find_port_failed_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.wrong_command_or_wrong_mode_detected__reboot_your_phone_by_pressing_POWER_and_VOL_UP_for_7_10_seconds._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
or ecx, 0xffffffff
push ecx
push str.unexpected_response__0x_04x__n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.timeout_reached_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
or ecx, 0xffffffff
push ecx
push str.unexpected_response__0x_04x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.timeout_reached_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.fdl_FILE_addr_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push eax
jmp 0x40526e
push str.timeout_reached_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
lea eax, [esp + 0xf0]
push eax
push str._s_does_not_exist._n
jmp 0x405273
push str.exec_addr_addr_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.nand_id_id_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.32_bit_limit_reached_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.bad_command_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.64_bit_limit_reached_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.read_part_part_name_offset_size_FILE_n_read_ubi_on_nand__read_part_system_0_ubi40m_system.bin_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.partition_list_FILE_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.repartition_FILE_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.name_too_long_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.erase_part_part_name_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.write_part_part_name_FILE_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.blk_size_byte_n_tmax_is_65535_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.keep_charge_0_1_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.timeout_ms_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.end_data_0_1_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
push str.verbose_0_1_2_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405287
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.exec_addr_addr_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.fdl_FILE_addr_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.exec_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.read_part_part_name_offset_size_FILE_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str._read_ubi_on_nand__read_part_system_0_ubi40m_system.bin_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.write_part_part_name_FILE_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.erase_part_part_name_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.partition_list_FILE_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.repartition_FILE_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.reset_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.poweroff_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.timeout_ms_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.blk_size_byte_n_tmax_is_65535_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.nand_id_id_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.disable_transcode_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.keep_charge_0_1_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.end_data_0_1_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
push str.verbose_0_1_2_n
push 2
call esi
add esp, 4
push eax
call fcn.00401050
add esp, 8
mov eax, dword [edi + 0x10]
mov esi, dword [eax]
mov ecx, dword [esi + 4]
mov eax, ecx
test ecx, ecx
je 0x405682
cmp dword [esi], 0
je 0x405682
mov dword [esi], 0
mov eax, dword [ecx]
call dword [eax + 0x14]
mov eax, dword [esi + 4]
test eax, eax
je 0x40569d
mov ecx, dword [0x40a3fc]
test ecx, ecx
je 0x405696
push eax
call ecx
add esp, 4
mov dword [esi + 4], 0
mov edi, dword [edi + 0x10]
mov esi, dword [edi]
test esi, esi
je 0x4056cb
mov eax, dword [0x40a400]
test eax, eax
je 0x4056c0
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x40a400], 0
push 8
push esi
call fcn.00405856
add esp, 8
push 4
push edi
call fcn.00405856
push dword [esp + 0x1c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [esp + 0x238]
add esp, 0xc
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004056f6
mov esp, ebp
pop ebp
ret