Function at 0x10021a20
Capabilities:
Contain obfuscated stackstrings
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x1011ce9b
mov eax, dword fs:[0]
push eax
mov eax, 0x11e8
call fcn.100dc630
mov eax, dword [0x10157de0]
xor eax, esp
mov dword [esp + 0x11e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10157de0]
xor eax, esp
push eax
lea eax, [esp + 0x11fc]
mov dword fs:[0], eax
mov eax, dword [esp + 0x120c]
sub esp, 0x1c
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x122c]
mov dword [esp + 0x54], esp
mov dword [esp + 0x40], eax
mov eax, esp
push 0x1012b9e4
push str.1028
push str.__line:
sub esp, 0x1c
mov dword [esp + 0x78], ecx
mov ecx, esp
mov dword [esp + 0x70], esp
xor ebx, ebx
push 0x1c
mov ebp, 0xf
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push str.._adaptor_cflashtool_api.cpp
mov dword [esp + 0x64], edx
mov edi, 1
mov byte [ecx + 4], bl
mov dword [esp + 0x68], eax
call fcn.10007180
lea esi, [esp + 0x220]
call fcn.1001a7c0
add esp, 0x1c
mov esi, eax
mov dword [esp + 0x122c], ebx
push 3
push 0x1012ba0c
lea ecx, [esp + 0x16c]
mov dword [esp + 0x184], ebp
mov dword [esp + 0x180], ebx
mov byte [esp + 0x170], bl
call fcn.10007180
push esi
lea ecx, [esp + 0x168]
push ecx
lea edx, [esp + 0x228]
push edx
mov byte [esp + 0x1238], 1
call fcn.1000a2c0
add esp, 0xc
push eax
lea eax, [esp + 0x1ec]
push eax
mov byte [esp + 0x1234], 2
call fcn.1000a370
add esp, 0xc
push eax
lea ecx, [esp + 0x23c]
push ecx
mov byte [esp + 0x1230], 3
call fcn.1000a370
add esp, 0xc
push eax
mov byte [esp + 0x1228], 4
mov eax, dword [esp + 0x40]
push eax
call fcn.1000a370
sub esp, 0x10
mov byte [esp + 0x123c], 5
mov ecx, esp
mov dword [esp + 0x64], esp
push 0x29
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push str.cflashtool_api::FlashTool_Connect_BROM_Ex
mov byte [ecx + 4], bl
call fcn.10007180
mov byte [esp + 0x123c], 4
mov ecx, edi
lea ebx, [esp + 0x360]
call fcn.10054c90
mov ebp, 0x10
cmp dword [esp + 0x22c], ebp
jb 0x10021bc3
mov edx, dword [esp + 0x218]
push edx
call fcn.100d41da
add esp, 4
xor ebx, ebx
mov esi, 0xf
mov dword [esp + 0x22c], esi
mov dword [esp + 0x228], ebx
mov byte [esp + 0x218], bl
cmp dword [esp + 0x1d8], ebp
jb 0x10021bf8
mov eax, dword [esp + 0x1c4]
push eax
call fcn.100d41da
add esp, 4
mov dword [esp + 0x1d8], esi
mov dword [esp + 0x1d4], ebx
mov byte [esp + 0x1c4], bl
cmp dword [esp + 0x210], ebp
jb 0x10021c26
mov ecx, dword [esp + 0x1fc]
push ecx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x210], esi
mov dword [esp + 0x20c], ebx
mov byte [esp + 0x1fc], bl
cmp dword [esp + 0x154], ebp
jb 0x10021c54
mov edx, dword [esp + 0x140]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x154], esi
mov dword [esp + 0x150], ebx
mov byte [esp + 0x140], bl
mov byte [esp + 0x1204], 0xb
cmp dword [esp + 0x1f4], ebp
jb 0x10021c8a
mov eax, dword [esp + 0x1e0]
push eax
call fcn.100d41da
add esp, 4
push 0x1ff
lea ecx, [esp + 0xff9]
push ebx
push ecx
mov dword [esp + 0x200], esi
mov dword [esp + 0x1fc], ebx
mov byte [esp + 0x1ec], bl
mov byte [esp + 0x1000], bl
call fcn.100d9c70
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx]
add esp, 0xc
sub eax, ebx
mov dword [esp + 0x28], ebx
je 0x10021fd1
sub eax, 1
je 0x10021cea
sub eax, 1
jne 0x10021feb
mov edx, dword [ecx + 4]
push edx
push 0x1012c61c
jmp 0x10021fdb
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], ecx
call fcn.1005bc40
mov eax, dword [eax]
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x20]
push ecx
mov esi, eax
call fcn.1000a440
mov edx, dword [eax]
mov dword [esp + 0x18], edx
mov dword [eax], ebx
mov byte [esp + 0x1204], 0xc
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x10021d37
push eax
call fcn.10073330
add esp, 4
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x10021f96
jmp 0x10021d50
push 0x1012b9e4
push str.1042
push str.__line:
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x60], esp
push 0x1c
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push str.._adaptor_cflashtool_api.cpp
mov byte [ecx + 4], bl
call fcn.10007180
lea esi, [esp + 0xb8]
call fcn.1001a7c0
add esp, 0x1c
mov esi, eax
mov byte [esp + 0x1210], 0xd
push 3
push 0x1012ba0c
lea ecx, [esp + 0x50]
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.10007180
push esi
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x6c]
push ecx
mov byte [esp + 0x121c], 0xe
call fcn.1000a2c0
add esp, 0xc
push eax
lea edx, [esp + 0x84]
push edx
mov byte [esp + 0x1218], 0xf
call fcn.1000a370
add esp, 0xc
push eax
lea eax, [esp + 0xbc]
push eax
mov byte [esp + 0x1214], 0x10
call fcn.1000a370
add esp, 0xc
push eax
lea ecx, [esp + 0xec]
push ecx
mov byte [esp + 0x1210], 0x11
call fcn.1000a370
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x12
call fcn.1005bc40
mov eax, dword [eax]
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0xd4]
push eax
call fcn.1000a4f0
add esp, 0xc
mov byte [esp + 0x1204], 0x13
mov esi, dword [eax + 4]
push 0x1c
add esi, 4
push str.not_support_handle_type_port
mov ecx, esi
call fcn.100087c0
mov eax, dword [edi + 0x14]
cmp dword [edi + 0x18], ebp
jb 0x10021e6d
mov edi, dword [edi + 4]
jmp 0x10021e70
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087c0
lea ecx, [esp + 0xcc]
mov byte [esp + 0x1204], 0x12
call fcn.10006d40
cmp dword [esp + 0xfc], ebp
jb 0x10021ea6
mov ecx, dword [esp + 0xe8]
push ecx
call fcn.100d41da
add esp, 4
mov esi, 0xf
mov dword [esp + 0xfc], esi
mov dword [esp + 0xf8], ebx
mov byte [esp + 0xe8], bl
cmp dword [esp + 0xc8], ebp
jb 0x10021ed9
mov edx, dword [esp + 0xb4]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0x8c], ebp
jb 0x10021f04
mov eax, dword [esp + 0x78]
push eax
call fcn.100d41da
add esp, 4
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0x70], ebp
jb 0x10021f29
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x54], ebp
jb 0x10021f48
mov edx, dword [esp + 0x40]
push edx
call fcn.100d41da
add esp, 4
mov byte [esp + 0x1204], 0xc
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
cmp dword [esp + 0xa8], ebp
jb 0x10021f75
mov eax, dword [esp + 0x94]
push eax
call fcn.100d41da
add esp, 4
mov eax, dword [esp + 0x18]
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
cmp eax, ebx
jne 0x10021d50
mov byte [esp + 0x1204], 0xb
cmp eax, ebx
je 0x10021faf
push eax
call fcn.10073330
add esp, 4
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x328]
push ecx
mov dword [esp + 0x1208], 0xffffffff
call fcn.10054f30
mov eax, 0xc0030007
jmp 0x10023320
movzx edx, word [ecx + 4]
push edx
push str.COM_d
lea eax, [esp + 0xffc]
push eax
call fcn.100d336d
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [esp + 0x1214], ebx
je 0x1002202a
mov eax, dword [0x1015d9ec]
cmp eax, ebx
je 0x1002202a
push 0x1013022c
push eax
call edi
cmp eax, ebx
je 0x1002202a
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x34]
push ecx
push edx
push esi
lea ecx, [esp + 0x1000]
push ecx
call eax
jmp 0x1002202e
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
push eax
call dword [sym.imp.FlashtoollibEx.dll_flashtool_create_session_with_handle]
mov dword [esp + 0x30], eax
cmp eax, ebx
jne 0x10022065
lea ecx, [esp + 0x328]
push ecx
mov dword [esp + 0x1208], 0xffffffff
call fcn.10054f30
mov eax, 0xc001000a
jmp 0x10023320
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x4c]
mov dword [esp + 0x11c], edx
mov edx, dword [esi + 0x48]
push 0x42c
mov dword [esp + 0x138], ebx
mov dword [esp + 0x138], edx
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], ebx
mov dword [esp + 0x130], eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x134], ecx
mov ecx, dword [esi + 0x3c]
lea edx, [esp + 0xbb4]
push ebx
mov dword [esp + 0x140], ebx
push edx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], 0x10021a00
mov dword [esp + 0x144], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0xbb8], ebx
call fcn.100d9c70
mov eax, dword [0x1015d9ec]
add esp, 0xc
cmp eax, ebx
je 0x1002211d
push 0x10130060
push eax
call edi
cmp eax, ebx
je 0x1002211d
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0xbac]
push ecx
push edx
call eax
mov edi, eax
mov dword [esp + 0x1c], eax
jmp 0x10022126
mov edi, 0xc001000c
mov dword [esp + 0x1c], edi
push 0x218
lea eax, [esp + 0x568]
push ebx
push eax
call fcn.100d9c70
add esp, 0xc
cmp edi, ebx
jne 0x100221cd
mov eax, dword [esp + 0xbb0]
mov dword [esp + 0x564], eax
cmp eax, ebx
je 0x1002217e
cmp eax, 2
je 0x1002217e
cmp eax, 1
jne 0x100221cd
mov ecx, dword [esp + 0xdb4]
mov edx, dword [esp + 0xdb8]
mov dword [esp + 0x774], ecx
mov dword [esp + 0x778], edx
jmp 0x100221cd
xor eax, eax
mov cl, byte [esp + eax + 0xbb4]
mov byte [esp + eax + 0x568], cl
inc eax
cmp cl, bl
jne 0x10022180
lea edi, [esp + 0x568]
call fcn.10055b80
test al, al
je 0x100221c5
mov edi, dword [esp + 0x24]
mov dword [esp + 0x564], 2
call fcn.1001c6d0
mov dword [esp + 0x768], eax
mov dword [esp + 0x76c], edx
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x1c]
mov esi, dword [esi + 0x40]
push 0x42c
lea eax, [esp + 0x784]
push ebx
push eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x788], ebx
call fcn.100d9c70
add esp, 0xc
cmp dword [0x1015d9ec], ebx
je 0x1002221e
mov ecx, dword [0x1015d9ec]
push 0x101300dc
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x1002221e
lea edx, [esp + 0x77c]
push edx
push esi
call eax
mov esi, eax
jmp 0x10022223
mov esi, 0xc001000c
push 0x218
lea eax, [esp + 0x350]
push ebx
push eax
call fcn.100d9c70
add esp, 0xc
cmp esi, ebx
jne 0x100222c9
mov eax, dword [esp + 0x780]
mov dword [esp + 0x34c], eax
cmp eax, ebx
je 0x1002227b
cmp eax, 2
je 0x1002227b
cmp eax, 1
jne 0x100222c9
mov ecx, dword [esp + 0x984]
mov edx, dword [esp + 0x988]
mov dword [esp + 0x55c], ecx
mov dword [esp + 0x560], edx
jmp 0x100222c9
xor eax, eax
lea ecx, [ecx]
mov cl, byte [esp + eax + 0x784]
mov byte [esp + eax + 0x350], cl
inc eax
cmp cl, bl
jne 0x10022280
lea edi, [esp + 0x350]
call fcn.10055b80
test al, al
je 0x100222c5
mov edi, dword [esp + 0x20]
mov dword [esp + 0x34c], 2
call fcn.1001c750
mov dword [esp + 0x550], eax
mov dword [esp + 0x554], edx
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x1214], ebx
je 0x1002230f
neg esi
sbb esi, esi
lea ecx, [esp + 0x34c]
not esi
and esi, ecx
mov ecx, dword [esp + 0x30]
neg edi
sbb edi, edi
lea eax, [esp + 0x11c]
push eax
push esi
lea edx, [esp + 0x56c]
not edi
and edi, edx
push edi
lea eax, [esp + 0x1000]
push eax
push ecx
call dword [sym.imp.FlashtoollibEx.dll_flashtool_connect_brom]
jmp 0x1002234a
neg esi
sbb esi, esi
lea eax, [esp + 0x34c]
not esi
and esi, eax
mov eax, dword [esp + 0x30]
neg edi
sbb edi, edi
lea edx, [esp + 0x11c]
push edx
push esi
lea ecx, [esp + 0x56c]
not edi
and edi, ecx
push edi
lea edx, [esp + 0x1000]
push edx
push eax
call dword [sym.imp.FlashtoollibEx.dll__flashtool_connect_brom_with_handle_20]
mov dword [esp + 0x28], eax
mov dword [esp + 0xac], ebx
mov byte [esp + 0xfe8], bl
mov dword [esp + 0xfe9], ebx
mov dword [esp + 0xfed], ebx
mov byte [esp + 0xff1], bl
mov byte [esp + 0xfdc], bl
mov dword [esp + 0xfdd], ebx
mov dword [esp + 0xfe1], ebx
mov byte [esp + 0xfe5], bl
cmp eax, ebx
jne 0x100227e2
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
lea ecx, [esp + 0x1b8]
push ecx
push eax
call fcn.10039830
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x1002270a
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 3
mov dword [esp + 0x2c], ecx
call fcn.1005bc40
mov eax, dword [eax]
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x28]
push ecx
mov esi, eax
call fcn.1000a440
mov edx, dword [eax]
mov dword [esp + 0x1c], edx
mov dword [eax], ebx
mov byte [esp + 0x1204], 0x14
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x10022402
push eax
call fcn.10073330
add esp, 4
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x100226f5
lea eax, [esp + 0x28]
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], 0x1003fb10
mov dword [esp + 0xd4], 0x1003fb20
nop
push 0x1012b9e4
push str.1149
push str.__line:
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x60], esp
push 0x1c
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push str.._adaptor_cflashtool_api.cpp
mov byte [ecx + 4], bl
call fcn.10007180
lea esi, [esp + 0x128]
call fcn.1001a7c0
add esp, 0x1c
mov esi, eax
mov byte [esp + 0x1210], 0x15
push 3
push 0x1012ba0c
lea ecx, [esp + 0x50]
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.10007180
push esi
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0xf8]
push edx
mov byte [esp + 0x121c], 0x16
call fcn.1000a2c0
add esp, 0xc
push eax
lea eax, [esp + 0xc0]
push eax
mov byte [esp + 0x1218], 0x17
call fcn.1000a370
add esp, 0xc
push eax
lea ecx, [esp + 0x80]
push ecx
mov byte [esp + 0x1214], 0x18
call fcn.1000a370
add esp, 0xc
push eax
lea edx, [esp + 0x60]
push edx
mov byte [esp + 0x1210], 0x19
call fcn.1000a370
add esp, 0xc
mov ebp, eax
push str.Get_support_Modem_fail:_0x_x
lea eax, [esp + 0x26c]
push eax
mov byte [esp + 0x120c], 0x1a
call fcn.10009e20
lea ecx, [esp + 0xcc]
push ecx
mov byte [esp + 0x1208], 0x1b
call fcn.10011e10
add esp, 4
lea edx, [esp + 0x90]
mov ecx, eax
call fcn.10009f20
mov edi, eax
mov byte [esp + 0x1204], 0x1c
call fcn.1005bc40
mov eax, dword [eax]
lea edx, [esp + 0x1c]
push edx
push eax
lea eax, [esp + 0xe0]
push eax
call fcn.1000a4f0
add esp, 0xc
mov byte [esp + 0x1204], 0x1d
mov esi, dword [eax + 4]
mov eax, dword [edi + 0x14]
add esi, 4
cmp dword [edi + 0x18], 0x10
jb 0x10022582
mov edi, dword [edi + 4]
jmp 0x10022585
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087c0
mov eax, dword [ebp + 0x14]
mov edi, 0x10
cmp dword [ebp + 0x18], edi
jb 0x100225a0
mov ebp, dword [ebp + 4]
jmp 0x100225a3
add ebp, 4
push eax
push ebp
mov ecx, esi
call fcn.100087c0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x1c
call fcn.10006d40
cmp dword [esp + 0xa8], edi
jb 0x100225d9
mov ecx, dword [esp + 0x94]
push ecx
call fcn.100d41da
add esp, 4
mov ebp, 0xf
lea edi, [esp + 0x268]
mov dword [esp + 0xa8], ebp
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
call fcn.10003aa0
mov esi, 0x10
cmp dword [esp + 0x70], esi
jb 0x10022617
mov edx, dword [esp + 0x5c]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x70], ebp
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], esi
jb 0x10022639
mov eax, dword [esp + 0x78]
push eax
call fcn.100d41da
add esp, 4
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0xc8], esi
jb 0x10022664
mov ecx, dword [esp + 0xb4]
push ecx
call fcn.100d41da
add esp, 4
mov dword [esp + 0xc8], ebp
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0xfc], esi
jb 0x10022692
mov edx, dword [esp + 0xe8]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0xfc], ebp
mov dword [esp + 0xf8], ebx
mov byte [esp + 0xe8], bl
cmp dword [esp + 0x54], esi
jb 0x100226ba
mov eax, dword [esp + 0x40]
push eax
call fcn.100d41da
add esp, 4
mov byte [esp + 0x1204], 0x14
mov dword [esp + 0x54], ebp
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
cmp dword [esp + 0x118], esi
jb 0x100226e7
mov ecx, dword [esp + 0x104]
push ecx
call fcn.100d41da
add esp, 4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x10022430
mov ebp, esi
mov byte [esp + 0x1204], 0xb
cmp eax, ebx
je 0x1002270a
push eax
call fcn.10073330
add esp, 4
cmp dword [esp + 0x1214], ebx
je 0x10022810
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x1bc]
push edx
push 0xc
lea eax, [esp + 0x160]
push eax
push ebx
push ebx
push 1
push ecx
call dword [sym.imp.FlashtoollibEx.dll_flashtool_device_control]
mov dword [esp + 0x28], eax
cmp eax, ebx
jne 0x100227e2
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
lea edx, [esp + 0xac]
push edx
push ecx
call sym.Flashtoollib.dll_FlashTool_GetDLHandle
mov dword [esp + 0x28], eax
cmp eax, ebx
jne 0x100227e2
mov eax, dword [esp + 0xac]
lea edx, [esp + 0xfe8]
push edx
push eax
call sym.Flashtoollib.dll_DL_Get_PlatformName
mov dword [esp + 0x28], eax
cmp eax, ebx
jne 0x100227e2
mov edx, dword [esp + 0xac]
lea ecx, [esp + 0xfdc]
push ecx
push edx
call sym.Flashtoollib.dll_DL_Get_ChipVersion
mov dword [esp + 0x28], eax
cmp eax, ebx
jne 0x100227e2
mov edx, dword [esp + 0x158]
lea eax, [esp + 0xfdc]
push eax
lea ecx, [esp + 0xfec]
push ecx
mov ecx, dword [esp + 0x164]
sub esp, 0xc
mov eax, esp
mov dword [eax], edx
mov edx, dword [esp + 0x174]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
call dword [sym.imp.FlashtoollibEx.dll__flashtool_is_chiptype_match_20]
test al, al
jne 0x10022810
mov dword [esp + 0x28], 0xc003000f
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.FlashtoollibEx.dll_flashtool_destroy_session]
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0x328]
push ecx
mov dword [esp + 0x1208], 0xffffffff
call fcn.10054f30
mov eax, esi
jmp 0x10023320
mov edx, dword [esp + 0x34]
cmp dword [edx + 0x24], ebx
je 0x10022d9e
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 1
mov dword [esp + 0x20], eax
call fcn.1005bc40
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
mov esi, eax
call fcn.1000a440
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
mov dword [eax], ebx
mov byte [esp + 0x1204], 0x1e
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x1002286a
push eax
call fcn.10073330
add esp, 4
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x10022ab1
jmp 0x10022880
push 0x1012b9e4
push str.1187
push str.__line:
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x48], esp
push 0x1c
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push str.._adaptor_cflashtool_api.cpp
mov byte [ecx + 4], bl
call fcn.10007180
lea esi, [esp + 0x128]
call fcn.1001a7c0
add esp, 0x1c
mov esi, eax
mov byte [esp + 0x1210], 0x1f
push 3
push 0x1012ba0c
lea ecx, [esp + 0x50]
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.10007180
push esi
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0xc4]
push eax
mov byte [esp + 0x121c], 0x20
call fcn.1000a2c0
add esp, 0xc
push eax
lea ecx, [esp + 0x84]
push ecx
mov byte [esp + 0x1218], 0x21
call fcn.1000a370
add esp, 0xc
push eax
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x1214], 0x22
call fcn.1000a370
add esp, 0xc
push eax
lea eax, [esp + 0x98]
push eax
mov byte [esp + 0x1210], 0x23
call fcn.1000a370
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x24
call fcn.1005bc40
mov eax, dword [eax]
lea ecx, [esp + 0x1c]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a4f0
add esp, 0xc
mov byte [esp + 0x1204], 0x25
mov esi, dword [eax + 4]
push 0x16
add esi, 4
push str.callback_in_brom_stage
mov ecx, esi
call fcn.100087c0
mov eax, dword [edi + 0x14]
cmp dword [edi + 0x18], ebp
jb 0x1002299d
mov edi, dword [edi + 4]
jmp 0x100229a0
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087c0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x24
call fcn.10006d40
cmp dword [esp + 0xa8], ebp
jb 0x100229d6
mov eax, dword [esp + 0x94]
push eax
call fcn.100d41da
add esp, 4
mov esi, 0xf
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
cmp dword [esp + 0x70], ebp
jb 0x10022a03
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], ebp
jb 0x10022a25
mov edx, dword [esp + 0x78]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0xc8], ebp
jb 0x10022a50
mov eax, dword [esp + 0xb4]
push eax
call fcn.100d41da
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0x54], ebp
jb 0x10022a78
mov ecx, dword [esp + 0x40]
push ecx
call fcn.100d41da
add esp, 4
mov byte [esp + 0x1204], 0x1e
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
cmp dword [esp + 0x118], ebp
jb 0x10022aa5
mov edx, dword [esp + 0x104]
push edx
call fcn.100d41da
add esp, 4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x10022880
mov byte [esp + 0x1204], 0xb
cmp eax, ebx
je 0x10022aca
push eax
call fcn.10073330
add esp, 4
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.FlashtoollibEx.dll_flashtool_get_com_handle]
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x10022b03
lea edx, [esp + 0x328]
push edx
mov esi, eax
mov dword [esp + 0x1208], 0xffffffff
call fcn.10054f30
mov eax, esi
jmp 0x10023320
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 0x28]
mov edx, dword [esp + 0x38]
mov eax, dword [eax + 0x24]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [ecx]
push edx
call eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 1
cmp eax, ebx
jne 0x10022ef8
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], ecx
call fcn.1005bc40
mov eax, dword [eax]
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x28]
push ecx
mov esi, eax
call fcn.1000a440
mov edx, dword [eax]
mov dword [esp + 0x18], edx
mov dword [eax], ebx
lea ecx, [esp + 0x24]
mov byte [esp + 0x1204], 0x26
call fcn.10002f90
cmp dword [esp + 0x18], ebx
je 0x10022d8d
jmp 0x10022b80
push 0x1012b9e4
push str.1195
push str.__line:
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x48], esp
push str.._adaptor_cflashtool_api.cpp
call fcn.10006340
lea esi, [esp + 0x128]
call fcn.1001a7c0
add esp, 0x1c
mov esi, eax
push 0x1012ba0c
lea ecx, [esp + 0xf4]
mov byte [esp + 0x1214], 0x27
call fcn.10006340
push esi
push eax
lea eax, [esp + 0xc4]
push eax
mov byte [esp + 0x121c], 0x28
call fcn.1000a2c0
add esp, 0xc
push eax
lea ecx, [esp + 0x84]
push ecx
mov byte [esp + 0x1218], 0x29
call fcn.1000a370
add esp, 0xc
push eax
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x1214], 0x2a
call fcn.1000a370
add esp, 0xc
push eax
lea eax, [esp + 0x98]
push eax
mov byte [esp + 0x1210], 0x2b
call fcn.1000a370
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x2c
call fcn.1005bc40
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a4f0
add esp, 0xc
mov byte [esp + 0x1204], 0x2d
mov esi, dword [eax + 4]
push 0x1e
add esi, 4
push str.m_cb_in_brom_stage_run_success
mov ecx, esi
call fcn.100087c0
mov eax, edi
call fcn.1000a600
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x2c
call fcn.10006d40
cmp dword [esp + 0xa8], ebp
jb 0x10022ca5
mov eax, dword [esp + 0x94]
push eax
call fcn.100d41da
add esp, 4
mov esi, 0xf
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
cmp dword [esp + 0x70], ebp
jb 0x10022cd2
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], ebp
jb 0x10022cf4
mov edx, dword [esp + 0x78]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0xc8], ebp
jb 0x10022d1f
mov eax, dword [esp + 0xb4]
push eax
call fcn.100d41da
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0xfc], ebp
jb 0x10022d4d
mov ecx, dword [esp + 0xe8]
push ecx
call fcn.100d41da
add esp, 4
mov byte [esp + 0x1204], 0x26
mov dword [esp + 0xfc], esi
mov dword [esp + 0xf8], ebx
mov byte [esp + 0xe8], bl
cmp dword [esp + 0x118], ebp
jb 0x10022d83
mov edx, dword [esp + 0x104]
push edx
call fcn.100d41da
add esp, 4
cmp dword [esp + 0x18], ebx
jne 0x10022b80
lea ecx, [esp + 0x18]
mov byte [esp + 0x1204], 0xb
call fcn.10002f90
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], 1
mov dword [esp + 0x2c], ecx
call fcn.1005bc40
mov eax, dword [eax]
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x24]
push ecx
mov esi, eax
call fcn.1000a440
mov edx, dword [eax]
mov dword [esp + 0x30], edx
mov dword [eax], ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x1204], 0x38
call fcn.10002f90
cmp dword [esp + 0x30], ebx
je 0x100232f5
lea esp, [esp]
push 0x1012b9e4
push str.1201
push str.__line:
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x54], esp
push str.._adaptor_cflashtool_api.cpp
call fcn.10006340
lea esi, [esp + 0x128]
call fcn.1001a7c0
add esp, 0x1c
mov esi, eax
push 0x1012ba0c
lea ecx, [esp + 0x190]
mov byte [esp + 0x1214], 0x39
call fcn.10006340
push esi
push eax
lea eax, [esp + 0x178]
push eax
mov byte [esp + 0x121c], 0x3a
call fcn.1000a2c0
add esp, 0xc
push eax
lea ecx, [esp + 0x1ac]
push ecx
mov byte [esp + 0x1218], 0x3b
call fcn.1000a370
add esp, 0xc
push eax
lea edx, [esp + 0x23c]
push edx
mov byte [esp + 0x1214], 0x3c
call fcn.1000a370
add esp, 0xc
push eax
lea eax, [esp + 0x254]
push eax
mov byte [esp + 0x1210], 0x3d
call fcn.1000a370
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x3e
call fcn.1005bc40
mov eax, dword [eax]
lea ecx, [esp + 0x30]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a4f0
add esp, 0xc
mov byte [esp + 0x1204], 0x3f
mov esi, dword [eax + 4]
push 0x12
add esi, 4
push str.connect_brom_ex_OK
mov ecx, esi
call fcn.100087c0
mov eax, dword [edi + 0x14]
cmp dword [edi + 0x18], ebp
jb 0x100231aa
mov edi, dword [edi + 4]
jmp 0x100231ad
lea eax, [esp + 0x2c]
mov dword [esp + 0x20], eax
call fcn.1005bc40
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
mov esi, eax
call fcn.1000a440
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
mov dword [eax], ebx
lea ecx, [esp + 0x24]
mov byte [esp + 0x1204], 0x2e
call fcn.10002f90
cmp dword [esp + 0x18], ebx
je 0x10023177
lea edx, [esp + 0x28]
mov dword [esp + 0xcc], edx
mov dword [esp + 0xd0], 0x1003fb10
mov dword [esp + 0xd4], 0x1003fb20
lea esp, [esp]
push 0x1012b9e4
push str.1197
push str.__line:
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x48], esp
push str.._adaptor_cflashtool_api.cpp
call fcn.10006340
lea esi, [esp + 0x1c4]
call fcn.1001a7c0
add esp, 0x1c
mov esi, eax
push 0x1012ba0c
lea ecx, [esp + 0x174]
mov byte [esp + 0x1214], 0x2f
call fcn.10006340
push esi
push eax
lea eax, [esp + 0x194]
push eax
mov byte [esp + 0x121c], 0x30
call fcn.1000a2c0
add esp, 0xc
push eax
lea ecx, [esp + 0x110]
push ecx
mov byte [esp + 0x1218], 0x31
call fcn.1000a370
add esp, 0xc
push eax
lea edx, [esp + 0x80]
push edx
mov byte [esp + 0x1214], 0x32
call fcn.1000a370
add esp, 0xc
push eax
lea eax, [esp + 0x60]
push eax
mov byte [esp + 0x1210], 0x33
call fcn.1000a370
add esp, 0xc
mov edi, eax
push str.m_cb_in_brom_stage_fail__ret__0x_x
lea ecx, [esp + 0x26c]
push ecx
mov byte [esp + 0x120c], 0x34
call fcn.10009e20
lea edx, [esp + 0xcc]
push edx
mov byte [esp + 0x1208], 0x35
call fcn.10011e10
add esp, 4
lea edx, [esp + 0x90]
mov ecx, eax
call fcn.10009f20
mov ebp, eax
mov byte [esp + 0x1204], 0x36
call fcn.1005bc40
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a4f0
add esp, 0xc
mov byte [esp + 0x1204], 0x37
mov esi, dword [eax + 4]
add esi, 4
mov eax, ebp
call fcn.1000a600
mov esi, eax
mov eax, edi
call fcn.1000a600
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x36
call fcn.10006d40
cmp dword [esp + 0xa8], 0x10
jb 0x100230c3
mov eax, dword [esp + 0x94]
push eax
call fcn.100d41da
add esp, 4
mov esi, 0xf
lea edi, [esp + 0x268]
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
call fcn.10003aa0
mov edi, 0x10
cmp dword [esp + 0x70], edi
jb 0x10023101
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], edi
jb 0x10023123
mov edx, dword [esp + 0x78]
push edx
call fcn.100d41da
add esp, 4
lea ecx, [esp + 0x100]
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
call fcn.100063b0
lea ecx, [esp + 0x180]
call fcn.100063b0
lea ecx, [esp + 0x164]
call fcn.100063b0
lea ecx, [esp + 0x19c]
mov byte [esp + 0x1204], 0x2e
call fcn.100063b0
cmp dword [esp + 0x18], ebx
jne 0x10022f60
lea ecx, [esp + 0x18]
mov byte [esp + 0x1204], 0xb
call fcn.10002f90
lea eax, [esp + 0x328]
push eax
mov dword [esp + 0x1208], 0xffffffff
call fcn.10054f30
mov eax, 0xc0060006
jmp 0x10023320
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087c0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x3e
call fcn.10006d40
cmp dword [esp + 0x264], ebp
jb 0x100231e3
mov eax, dword [esp + 0x250]
push eax
call fcn.100d41da
add esp, 4
mov esi, 0xf
mov dword [esp + 0x264], esi
mov dword [esp + 0x260], ebx
mov byte [esp + 0x250], bl
cmp dword [esp + 0x248], ebp
jb 0x10023216
mov ecx, dword [esp + 0x234]
push ecx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x248], esi
mov dword [esp + 0x244], ebx
mov byte [esp + 0x234], bl
cmp dword [esp + 0x1b4], ebp
jb 0x10023244
mov edx, dword [esp + 0x1a0]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x1b4], esi
mov dword [esp + 0x1b0], ebx
mov byte [esp + 0x1a0], bl
cmp dword [esp + 0x17c], ebp
jb 0x10023272
mov eax, dword [esp + 0x168]
push eax
call fcn.100d41da
add esp, 4
mov dword [esp + 0x17c], esi
mov dword [esp + 0x178], ebx
mov byte [esp + 0x168], bl
cmp dword [esp + 0x198], ebp
jb 0x100232a0
mov ecx, dword [esp + 0x184]
push ecx
call fcn.100d41da
add esp, 4
mov byte [esp + 0x1204], 0x38
mov dword [esp + 0x198], esi
mov dword [esp + 0x194], ebx
mov byte [esp + 0x184], bl
cmp dword [esp + 0x118], ebp
jb 0x100232d6
mov edx, dword [esp + 0x104]
push edx
call fcn.100d41da
add esp, 4
mov dword [esp + 0x118], esi
mov dword [esp + 0x114], ebx
mov byte [esp + 0x104], bl
cmp dword [esp + 0x30], ebx
jne 0x10022df0
lea ecx, [esp + 0x30]
mov byte [esp + 0x1204], 0xb
call fcn.10002f90
lea eax, [esp + 0x328]
push eax
mov dword [esp + 0x1208], 0xffffffff
call fcn.10054f30
xor eax, eax
mov ecx, dword [esp + 0x11fc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x11e0]
xor ecx, esp
call fcn.100d3301
add esp, 0x11f4
ret 0xc