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

Disassembly:
push 0xffffffffffffffff
push 0x1011d72b
mov eax, dword fs:[0]
push eax
mov eax, 0x11e8
call fcn.100dcec0
mov eax, dword [0x10158df0]
xor eax, esp
mov dword [esp + 0x11e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10158df0]
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 0x1012c9e4
push str.1054
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.1001a820
add esp, 0x1c
mov esi, eax
mov dword [esp + 0x122c], ebx
push 3
push 0x1012ca0c
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.1000a2e0
add esp, 0xc
push eax
lea eax, [esp + 0x1ec]
push eax
mov byte [esp + 0x1234], 2
call fcn.1000a390
add esp, 0xc
push eax
lea ecx, [esp + 0x23c]
push ecx
mov byte [esp + 0x1230], 3
call fcn.1000a390
add esp, 0xc
push eax
mov byte [esp + 0x1228], 4
mov eax, dword [esp + 0x40]
push eax
call fcn.1000a390
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.10055540
mov ebp, 0x10
cmp dword [esp + 0x22c], ebp
jb 0x10022193
mov edx, dword [esp + 0x218]
push edx
call fcn.100d4a7a
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 0x100221c8
mov eax, dword [esp + 0x1c4]
push eax
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x1d8], esi
mov dword [esp + 0x1d4], ebx
mov byte [esp + 0x1c4], bl
cmp dword [esp + 0x210], ebp
jb 0x100221f6
mov ecx, dword [esp + 0x1fc]
push ecx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x210], esi
mov dword [esp + 0x20c], ebx
mov byte [esp + 0x1fc], bl
cmp dword [esp + 0x154], ebp
jb 0x10022224
mov edx, dword [esp + 0x140]
push edx
call fcn.100d4a7a
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 0x1002225a
mov eax, dword [esp + 0x1e0]
push eax
call fcn.100d4a7a
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.100da500
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx]
add esp, 0xc
sub eax, ebx
mov dword [esp + 0x28], ebx
je 0x100225a1
sub eax, 1
je 0x100222ba
sub eax, 1
jne 0x100225bb
mov edx, dword [ecx + 4]
push edx
push 0x1012d67c
jmp 0x100225ab
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], ecx
call fcn.1005c4f0
mov eax, dword [eax]
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x20]
push ecx
mov esi, eax
call fcn.1000a460
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 0x10022307
push eax
call fcn.10073c20
add esp, 4
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x10022566
jmp 0x10022320
push 0x1012c9e4
push str.1068
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.1001a820
add esp, 0x1c
mov esi, eax
mov byte [esp + 0x1210], 0xd
push 3
push 0x1012ca0c
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.1000a2e0
add esp, 0xc
push eax
lea edx, [esp + 0x84]
push edx
mov byte [esp + 0x1218], 0xf
call fcn.1000a390
add esp, 0xc
push eax
lea eax, [esp + 0xbc]
push eax
mov byte [esp + 0x1214], 0x10
call fcn.1000a390
add esp, 0xc
push eax
lea ecx, [esp + 0xec]
push ecx
mov byte [esp + 0x1210], 0x11
call fcn.1000a390
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x12
call fcn.1005c4f0
mov eax, dword [eax]
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0xd4]
push eax
call fcn.1000a530
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.100087d0
mov eax, dword [edi + 0x14]
cmp dword [edi + 0x18], ebp
jb 0x1002243d
mov edi, dword [edi + 4]
jmp 0x10022440
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087d0
lea ecx, [esp + 0xcc]
mov byte [esp + 0x1204], 0x12
call fcn.10006d40
cmp dword [esp + 0xfc], ebp
jb 0x10022476
mov ecx, dword [esp + 0xe8]
push ecx
call fcn.100d4a7a
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 0x100224a9
mov edx, dword [esp + 0xb4]
push edx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0x8c], ebp
jb 0x100224d4
mov eax, dword [esp + 0x78]
push eax
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0x70], ebp
jb 0x100224f9
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x54], ebp
jb 0x10022518
mov edx, dword [esp + 0x40]
push edx
call fcn.100d4a7a
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 0x10022545
mov eax, dword [esp + 0x94]
push eax
call fcn.100d4a7a
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 0x10022320
mov byte [esp + 0x1204], 0xb
cmp eax, ebx
je 0x1002257f
push eax
call fcn.10073c20
add esp, 4
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x328]
push ecx
mov dword [esp + 0x1208], 0xffffffff
call fcn.100557e0
mov eax, 0xc0030007
jmp 0x100238f0
movzx edx, word [ecx + 4]
push edx
push str.COM_d
lea eax, [esp + 0xffc]
push eax
call fcn.100d3c0d
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [esp + 0x1214], ebx
je 0x100225fa
mov eax, dword [0x1015e9ec]
cmp eax, ebx
je 0x100225fa
push 0x101312e8
push eax
call edi
cmp eax, ebx
je 0x100225fa
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 0x100225fe
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 0x10022635
lea ecx, [esp + 0x328]
push ecx
mov dword [esp + 0x1208], 0xffffffff
call fcn.100557e0
mov eax, 0xc001000a
jmp 0x100238f0
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], 0x10021fd0
mov dword [esp + 0x144], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0xbb8], ebx
call fcn.100da500
mov eax, dword [0x1015e9ec]
add esp, 0xc
cmp eax, ebx
je 0x100226ed
push 0x1013111c
push eax
call edi
cmp eax, ebx
je 0x100226ed
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0xbac]
push ecx
push edx
call eax
mov edi, eax
mov dword [esp + 0x1c], eax
jmp 0x100226f6
mov edi, 0xc001000c
mov dword [esp + 0x1c], edi
push 0x218
lea eax, [esp + 0x568]
push ebx
push eax
call fcn.100da500
add esp, 0xc
cmp edi, ebx
jne 0x1002279d
mov eax, dword [esp + 0xbb0]
mov dword [esp + 0x564], eax
cmp eax, ebx
je 0x1002274e
cmp eax, 2
je 0x1002274e
cmp eax, 1
jne 0x1002279d
mov ecx, dword [esp + 0xdb4]
mov edx, dword [esp + 0xdb8]
mov dword [esp + 0x774], ecx
mov dword [esp + 0x778], edx
jmp 0x1002279d
xor eax, eax
mov cl, byte [esp + eax + 0xbb4]
mov byte [esp + eax + 0x568], cl
inc eax
cmp cl, bl
jne 0x10022750
lea edi, [esp + 0x568]
call fcn.10056430
test al, al
je 0x10022795
mov edi, dword [esp + 0x24]
mov dword [esp + 0x564], 2
call fcn.1001c730
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.100da500
add esp, 0xc
cmp dword [0x1015e9ec], ebx
je 0x100227ee
mov ecx, dword [0x1015e9ec]
push 0x10131198
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x100227ee
lea edx, [esp + 0x77c]
push edx
push esi
call eax
mov esi, eax
jmp 0x100227f3
mov esi, 0xc001000c
push 0x218
lea eax, [esp + 0x350]
push ebx
push eax
call fcn.100da500
add esp, 0xc
cmp esi, ebx
jne 0x10022899
mov eax, dword [esp + 0x780]
mov dword [esp + 0x34c], eax
cmp eax, ebx
je 0x1002284b
cmp eax, 2
je 0x1002284b
cmp eax, 1
jne 0x10022899
mov ecx, dword [esp + 0x984]
mov edx, dword [esp + 0x988]
mov dword [esp + 0x55c], ecx
mov dword [esp + 0x560], edx
jmp 0x10022899
xor eax, eax
lea ecx, [ecx]
mov cl, byte [esp + eax + 0x784]
mov byte [esp + eax + 0x350], cl
inc eax
cmp cl, bl
jne 0x10022850
lea edi, [esp + 0x350]
call fcn.10056430
test al, al
je 0x10022895
mov edi, dword [esp + 0x20]
mov dword [esp + 0x34c], 2
call fcn.1001c7b0
mov dword [esp + 0x550], eax
mov dword [esp + 0x554], edx
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x1214], ebx
je 0x100228df
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 0x1002291a
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 0x10022db2
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
lea ecx, [esp + 0x1b8]
push ecx
push eax
call fcn.10039e30
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x10022cda
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 3
mov dword [esp + 0x2c], ecx
call fcn.1005c4f0
mov eax, dword [eax]
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x28]
push ecx
mov esi, eax
call fcn.1000a460
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 0x100229d2
push eax
call fcn.10073c20
add esp, 4
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x10022cc5
lea eax, [esp + 0x28]
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], 0x10040110
mov dword [esp + 0xd4], 0x10040120
nop
push 0x1012c9e4
push str.1175
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.1001a820
add esp, 0x1c
mov esi, eax
mov byte [esp + 0x1210], 0x15
push 3
push 0x1012ca0c
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.1000a2e0
add esp, 0xc
push eax
lea eax, [esp + 0xc0]
push eax
mov byte [esp + 0x1218], 0x17
call fcn.1000a390
add esp, 0xc
push eax
lea ecx, [esp + 0x80]
push ecx
mov byte [esp + 0x1214], 0x18
call fcn.1000a390
add esp, 0xc
push eax
lea edx, [esp + 0x60]
push edx
mov byte [esp + 0x1210], 0x19
call fcn.1000a390
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.10009e40
lea ecx, [esp + 0xcc]
push ecx
mov byte [esp + 0x1208], 0x1b
call fcn.10011e90
add esp, 4
lea edx, [esp + 0x90]
mov ecx, eax
call fcn.10009f40
mov edi, eax
mov byte [esp + 0x1204], 0x1c
call fcn.1005c4f0
mov eax, dword [eax]
lea edx, [esp + 0x1c]
push edx
push eax
lea eax, [esp + 0xe0]
push eax
call fcn.1000a530
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 0x10022b52
mov edi, dword [edi + 4]
jmp 0x10022b55
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087d0
mov eax, dword [ebp + 0x14]
mov edi, 0x10
cmp dword [ebp + 0x18], edi
jb 0x10022b70
mov ebp, dword [ebp + 4]
jmp 0x10022b73
add ebp, 4
push eax
push ebp
mov ecx, esi
call fcn.100087d0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x1c
call fcn.10006d40
cmp dword [esp + 0xa8], edi
jb 0x10022ba9
mov ecx, dword [esp + 0x94]
push ecx
call fcn.100d4a7a
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 0x10022be7
mov edx, dword [esp + 0x5c]
push edx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x70], ebp
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], esi
jb 0x10022c09
mov eax, dword [esp + 0x78]
push eax
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0xc8], esi
jb 0x10022c34
mov ecx, dword [esp + 0xb4]
push ecx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0xc8], ebp
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0xfc], esi
jb 0x10022c62
mov edx, dword [esp + 0xe8]
push edx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0xfc], ebp
mov dword [esp + 0xf8], ebx
mov byte [esp + 0xe8], bl
cmp dword [esp + 0x54], esi
jb 0x10022c8a
mov eax, dword [esp + 0x40]
push eax
call fcn.100d4a7a
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 0x10022cb7
mov ecx, dword [esp + 0x104]
push ecx
call fcn.100d4a7a
add esp, 4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x10022a00
mov ebp, esi
mov byte [esp + 0x1204], 0xb
cmp eax, ebx
je 0x10022cda
push eax
call fcn.10073c20
add esp, 4
cmp dword [esp + 0x1214], ebx
je 0x10022de0
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 0x10022db2
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 0x10022db2
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 0x10022db2
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 0x10022db2
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 0x10022de0
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.100557e0
mov eax, esi
jmp 0x100238f0
mov edx, dword [esp + 0x34]
cmp dword [edx + 0x24], ebx
je 0x1002336e
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 1
mov dword [esp + 0x20], eax
call fcn.1005c4f0
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
mov esi, eax
call fcn.1000a460
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 0x10022e3a
push eax
call fcn.10073c20
add esp, 4
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x10023081
jmp 0x10022e50
push 0x1012c9e4
push str.1213
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.1001a820
add esp, 0x1c
mov esi, eax
mov byte [esp + 0x1210], 0x1f
push 3
push 0x1012ca0c
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.1000a2e0
add esp, 0xc
push eax
lea ecx, [esp + 0x84]
push ecx
mov byte [esp + 0x1218], 0x21
call fcn.1000a390
add esp, 0xc
push eax
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x1214], 0x22
call fcn.1000a390
add esp, 0xc
push eax
lea eax, [esp + 0x98]
push eax
mov byte [esp + 0x1210], 0x23
call fcn.1000a390
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x24
call fcn.1005c4f0
mov eax, dword [eax]
lea ecx, [esp + 0x1c]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a530
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.100087d0
mov eax, dword [edi + 0x14]
cmp dword [edi + 0x18], ebp
jb 0x10022f6d
mov edi, dword [edi + 4]
jmp 0x10022f70
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087d0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x24
call fcn.10006d40
cmp dword [esp + 0xa8], ebp
jb 0x10022fa6
mov eax, dword [esp + 0x94]
push eax
call fcn.100d4a7a
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 0x10022fd3
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], ebp
jb 0x10022ff5
mov edx, dword [esp + 0x78]
push edx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0xc8], ebp
jb 0x10023020
mov eax, dword [esp + 0xb4]
push eax
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0x54], ebp
jb 0x10023048
mov ecx, dword [esp + 0x40]
push ecx
call fcn.100d4a7a
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 0x10023075
mov edx, dword [esp + 0x104]
push edx
call fcn.100d4a7a
add esp, 4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x10022e50
mov byte [esp + 0x1204], 0xb
cmp eax, ebx
je 0x1002309a
push eax
call fcn.10073c20
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 0x100230d3
lea edx, [esp + 0x328]
push edx
mov esi, eax
mov dword [esp + 0x1208], 0xffffffff
call fcn.100557e0
mov eax, esi
jmp 0x100238f0
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 0x100234c8
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], ecx
call fcn.1005c4f0
mov eax, dword [eax]
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x28]
push ecx
mov esi, eax
call fcn.1000a460
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 0x1002335d
jmp 0x10023150
push 0x1012c9e4
push str.1221
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.1001a820
add esp, 0x1c
mov esi, eax
push 0x1012ca0c
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.1000a2e0
add esp, 0xc
push eax
lea ecx, [esp + 0x84]
push ecx
mov byte [esp + 0x1218], 0x29
call fcn.1000a390
add esp, 0xc
push eax
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x1214], 0x2a
call fcn.1000a390
add esp, 0xc
push eax
lea eax, [esp + 0x98]
push eax
mov byte [esp + 0x1210], 0x2b
call fcn.1000a390
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x2c
call fcn.1005c4f0
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a530
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.100087d0
mov eax, edi
call fcn.1000a640
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x2c
call fcn.10006d40
cmp dword [esp + 0xa8], ebp
jb 0x10023275
mov eax, dword [esp + 0x94]
push eax
call fcn.100d4a7a
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 0x100232a2
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], ebp
jb 0x100232c4
mov edx, dword [esp + 0x78]
push edx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp dword [esp + 0xc8], ebp
jb 0x100232ef
mov eax, dword [esp + 0xb4]
push eax
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], ebx
mov byte [esp + 0xb4], bl
cmp dword [esp + 0xfc], ebp
jb 0x1002331d
mov ecx, dword [esp + 0xe8]
push ecx
call fcn.100d4a7a
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 0x10023353
mov edx, dword [esp + 0x104]
push edx
call fcn.100d4a7a
add esp, 4
cmp dword [esp + 0x18], ebx
jne 0x10023150
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.1005c4f0
mov eax, dword [eax]
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x24]
push ecx
mov esi, eax
call fcn.1000a460
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 0x100238c5
lea esp, [esp]
push 0x1012c9e4
push str.1227
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.1001a820
add esp, 0x1c
mov esi, eax
push 0x1012ca0c
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.1000a2e0
add esp, 0xc
push eax
lea ecx, [esp + 0x1ac]
push ecx
mov byte [esp + 0x1218], 0x3b
call fcn.1000a390
add esp, 0xc
push eax
lea edx, [esp + 0x23c]
push edx
mov byte [esp + 0x1214], 0x3c
call fcn.1000a390
add esp, 0xc
push eax
lea eax, [esp + 0x254]
push eax
mov byte [esp + 0x1210], 0x3d
call fcn.1000a390
add esp, 0xc
mov edi, eax
mov byte [esp + 0x1204], 0x3e
call fcn.1005c4f0
mov eax, dword [eax]
lea ecx, [esp + 0x30]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a530
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.100087d0
mov eax, dword [edi + 0x14]
cmp dword [edi + 0x18], ebp
jb 0x1002377a
mov edi, dword [edi + 4]
jmp 0x1002377d
lea eax, [esp + 0x2c]
mov dword [esp + 0x20], eax
call fcn.1005c4f0
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
mov esi, eax
call fcn.1000a460
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 0x10023747
lea edx, [esp + 0x28]
mov dword [esp + 0xcc], edx
mov dword [esp + 0xd0], 0x10040110
mov dword [esp + 0xd4], 0x10040120
lea esp, [esp]
push 0x1012c9e4
push str.1223
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.1001a820
add esp, 0x1c
mov esi, eax
push 0x1012ca0c
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.1000a2e0
add esp, 0xc
push eax
lea ecx, [esp + 0x110]
push ecx
mov byte [esp + 0x1218], 0x31
call fcn.1000a390
add esp, 0xc
push eax
lea edx, [esp + 0x80]
push edx
mov byte [esp + 0x1214], 0x32
call fcn.1000a390
add esp, 0xc
push eax
lea eax, [esp + 0x60]
push eax
mov byte [esp + 0x1210], 0x33
call fcn.1000a390
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.10009e40
lea edx, [esp + 0xcc]
push edx
mov byte [esp + 0x1208], 0x35
call fcn.10011e90
add esp, 4
lea edx, [esp + 0x90]
mov ecx, eax
call fcn.10009f40
mov ebp, eax
mov byte [esp + 0x1204], 0x36
call fcn.1005c4f0
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0xe0]
push edx
call fcn.1000a530
add esp, 0xc
mov byte [esp + 0x1204], 0x37
mov esi, dword [eax + 4]
add esi, 4
mov eax, ebp
call fcn.1000a640
mov esi, eax
mov eax, edi
call fcn.1000a640
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x36
call fcn.10006d40
cmp dword [esp + 0xa8], 0x10
jb 0x10023693
mov eax, dword [esp + 0x94]
push eax
call fcn.100d4a7a
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 0x100236d1
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x8c], edi
jb 0x100236f3
mov edx, dword [esp + 0x78]
push edx
call fcn.100d4a7a
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 0x10023530
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.100557e0
mov eax, 0xc0060006
jmp 0x100238f0
add edi, 4
push eax
push edi
mov ecx, esi
call fcn.100087d0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1204], 0x3e
call fcn.10006d40
cmp dword [esp + 0x264], ebp
jb 0x100237b3
mov eax, dword [esp + 0x250]
push eax
call fcn.100d4a7a
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 0x100237e6
mov ecx, dword [esp + 0x234]
push ecx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x248], esi
mov dword [esp + 0x244], ebx
mov byte [esp + 0x234], bl
cmp dword [esp + 0x1b4], ebp
jb 0x10023814
mov edx, dword [esp + 0x1a0]
push edx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x1b4], esi
mov dword [esp + 0x1b0], ebx
mov byte [esp + 0x1a0], bl
cmp dword [esp + 0x17c], ebp
jb 0x10023842
mov eax, dword [esp + 0x168]
push eax
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x17c], esi
mov dword [esp + 0x178], ebx
mov byte [esp + 0x168], bl
cmp dword [esp + 0x198], ebp
jb 0x10023870
mov ecx, dword [esp + 0x184]
push ecx
call fcn.100d4a7a
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 0x100238a6
mov edx, dword [esp + 0x104]
push edx
call fcn.100d4a7a
add esp, 4
mov dword [esp + 0x118], esi
mov dword [esp + 0x114], ebx
mov byte [esp + 0x104], bl
cmp dword [esp + 0x30], ebx
jne 0x100233c0
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.100557e0
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.100d3ba1
add esp, 0x11f4
ret 0xc