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

Disassembly:
push 0xffffffffffffffff
push 0x1011e2af
mov eax, dword fs:[0]
push eax
mov eax, 0x210e4
call fcn.100dd860
mov eax, dword [0x10159df0]
xor eax, esp
mov dword [esp + 0x210e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10159df0]
xor eax, esp
push eax
lea eax, [esp + 0x210f8]
mov dword fs:[0], eax
mov eax, dword [esp + 0x21108]
sub esp, 0x1c
mov dword [esp + 0x60], esp
mov dword [esp + 0x40], eax
mov eax, esp
push 0x1012d9f4
push 0x1012e5c0
push str.__line:
sub esp, 0x1c
mov dword [esp + 0x5c], esp
mov dword [esp + 0x64], ecx
mov ecx, 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 + 0x68], edx
mov edi, 1
mov byte [ecx + 4], bl
mov dword [esp + 0x64], eax
call fcn.10007180
lea esi, [esp + 0xe0]
call fcn.1001a820
add esp, 0x1c
mov esi, eax
mov dword [esp + 0x21128], ebx
push 3
push 0x1012da1c
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], ebp
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
call fcn.10007180
push esi
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x94]
push ecx
mov byte [esp + 0x21134], 1
call fcn.1000a2e0
add esp, 0xc
push eax
lea edx, [esp + 0xac]
push edx
mov byte [esp + 0x21130], 2
call fcn.1000a390
add esp, 0xc
push eax
lea eax, [esp + 0x70]
push eax
mov byte [esp + 0x2112c], 3
call fcn.1000a390
add esp, 0xc
push eax
mov eax, dword [esp + 0x3c]
push eax
mov byte [esp + 0x21128], 4
call fcn.1000a390
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x50], esp
mov byte [esp + 0x21138], 5
push 0x27
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push str.cflashtool_api::FlashTool_RomGetInfoAll
mov byte [ecx + 4], bl
call fcn.10007180
mov ecx, edi
lea ebx, [esp + 0xf0]
mov byte [esp + 0x21138], 4
call fcn.10055ee0
mov esi, 0x10
cmp dword [esp + 0x60], esi
jb 0x10021710
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.100d541a
add esp, 4
xor edi, edi
mov dword [esp + 0x60], ebp
mov dword [esp + 0x5c], edi
mov byte [esp + 0x4c], 0
cmp dword [esp + 0x98], esi
jb 0x10021738
mov edx, dword [esp + 0x84]
push edx
call fcn.100d541a
add esp, 4
mov dword [esp + 0x98], ebp
mov dword [esp + 0x94], edi
mov byte [esp + 0x84], 0
cmp dword [esp + 0x7c], esi
jb 0x10021761
mov eax, dword [esp + 0x68]
push eax
call fcn.100d541a
add esp, 4
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x78], edi
mov byte [esp + 0x68], 0
cmp dword [esp + 0x40], esi
jb 0x10021781
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.100d541a
add esp, 4
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], edi
mov byte [esp + 0x2c], 0
mov byte [esp + 0x21100], 0xb
cmp dword [esp + 0xb4], esi
jb 0x100217af
mov edx, dword [esp + 0xa0]
push edx
call fcn.100d541a
add esp, 4
push 0x1ff
lea eax, [esp + 0x20ef9]
push edi
push eax
mov dword [esp + 0xc0], ebp
mov dword [esp + 0xbc], edi
mov byte [esp + 0xac], 0
mov byte [esp + 0x20f00], 0
call fcn.100daea0
mov eax, dword [0x1015f9ec]
add esp, 0xc
cmp eax, edi
je 0x1002180d
push 0x10132254
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x1002180d
mov ebx, dword [esp + 0x20]
lea ecx, [esp + 0x20ef4]
push ecx
push ebx
call eax
jmp 0x10021811
mov ebx, dword [esp + 0x20]
mov edi, ebx
call fcn.1001c660
mov esi, eax
xor eax, eax
mov ebp, edx
mov dword [esp + 0xdc], eax
jmp 0x10021830
mov cl, byte [esp + eax + 0x20ef4]
mov byte [esp + eax + 0xe0], cl
inc eax
test cl, cl
jne 0x10021830
lea edi, [esp + 0x20ef4]
call fcn.10056dd0
test al, al
je 0x1002186c
mov dword [esp + 0xdc], 2
mov dword [esp + 0x2e0], esi
mov dword [esp + 0x2e4], ebp
cmp dword [esp + 0x2110c], 0
lea ecx, [esp + 0x14]
setne dl
movzx eax, dl
push eax
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0xcefc]
push edx
lea eax, [esp + 0xe8]
push eax
push ecx
call dword [sym.imp.FlashtoollibEx.dll_get_revised_scatter_partitions]
mov esi, eax
test esi, esi
je 0x100218c0
lea edx, [esp + 0xb8]
push edx
mov dword [esp + 0x21104], 0xffffffff
call fcn.10056180
mov eax, esi
jmp 0x10021a75
xor ebp, ebp
cmp dword [esp + 0x14], ebp
jbe 0x10021998
mov edi, dword [esp + 0x1c]
lea esi, [esp + 0xcf34]
add edi, 0x50
lea ebx, [ebx]
push 0x3f
lea eax, [esi - 0x40]
push eax
lea ecx, [edi - 0x50]
push ecx
call fcn.100d56b0
add esp, 0xc
push 0xff
lea edx, [edi + 0x10]
push esi
push edx
call fcn.100d56b0
mov eax, dword [esi + 0x200]
mov ecx, dword [esi + 0x204]
mov edx, dword [esi + 0x208]
mov dword [edi], eax
mov eax, dword [esi + 0x20c]
mov dword [edi + 4], ecx
mov ecx, dword [esi + 0x214]
mov dword [edi + 0x138], edx
mov edx, dword [esi + 0x218]
mov dword [edi + 0x13c], eax
mov eax, dword [esi + 0x220]
mov dword [edi + 0x130], ecx
mov ecx, dword [esi + 0x21c]
mov dword [edi + 0x12c], edx
mov edx, dword [esi + 0x224]
mov dword [edi + 0x120], eax
mov eax, dword [esi + 0x234]
mov dword [edi + 0x124], ecx
mov ecx, dword [esi + 0x238]
mov dword [edi + 0x128], edx
mov dword [edi + 0x11c], eax
mov dword [edi + 0x140], ecx
inc ebp
add esp, 0xc
add esi, 0x280
add edi, 0x198
cmp ebp, dword [esp + 0x14]
jb 0x100218e0
push 0x80
lea edx, [esp + 0x2f8]
push edx
push ebx
call sym.Flashtoollib.dll_DL_Rom_GetInfoAll
mov esi, eax
test esi, esi
je 0x100219d0
lea eax, [esp + 0xb8]
push eax
mov dword [esp + 0x21104], 0xffffffff
call fcn.10056180
mov eax, esi
jmp 0x10021a75
xor ebx, ebx
cmp dword [esp + 0x14], ebx
jbe 0x10021a5b
mov edi, dword [esp + 0x1c]
xor ebp, ebp
lea esi, [esp + 0x2f4]
lea esp, [esp]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100219f5
sub eax, edx
push eax
push esi
push edi
call fcn.100d555b
add esp, 0xc
test eax, eax
jne 0x10021a2a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10021a12
sub eax, edx
push eax
push esi
push edi
call fcn.100d555b
add esp, 0xc
test eax, eax
je 0x10021a3b
inc ebp
add esi, 0x198
cmp ebp, 0x80
jb 0x100219f0
jmp 0x10021a4e
imul ebp, ebp, 0x198
mov ecx, dword [esp + ebp + 0x464]
mov dword [edi + 0x170], ecx
inc ebx
add edi, 0x198
cmp ebx, dword [esp + 0x14]
jb 0x100219e0
lea edx, [esp + 0xb8]
push edx
mov dword [esp + 0x21104], 0xffffffff
call fcn.10056180
xor eax, eax
mov ecx, dword [esp + 0x210f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x210e0]
xor ecx, esp
call fcn.100d4541
add esp, 0x210f0
ret 8