Function at 0x1001e820
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10195ff6
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1084
call fcn.10174d60
mov eax, dword [0x10279264]
xor eax, esp
mov dword [esp + 0x1080], eax
push ebx
push esi
push edi
mov eax, dword [0x10279264]
xor eax, esp
push eax
lea eax, [esp + 0x1098]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x48], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x40], edx
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, 0x10201619
xor cl, cl
mov eax, 0x3bd
lea esi, [esp + 0x50]
mov dword [esp + 0x70], ebx
call fcn.10111280
push edi
xor esi, esi
mov dword [esp + 0x10a4], esi
mov edx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_p_data_blocks_0x_08X_.
push edx
push eax
call fcn.10111350
add esp, 0x10
mov dword [esp + 0x10a0], 0xffffffff
cmp edi, esi
jne 0x1001e91e
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x3c6
lea esi, [esp + 0x50]
call fcn.10111280
mov dword [esp + 0x10a0], 1
mov ecx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_p_data_blocks_is_NULL_
push ecx
push eax
call fcn.10111350
add esp, 0xc
mov eax, 1
jmp 0x1001f1bd
movzx eax, word [edi]
xor edx, edx
cmp dx, ax
je 0x1001f178
mov ecx, 0xa
cmp cx, ax
jb 0x1001f178
cmp ax, 1
jbe 0x1001e94a
movzx ecx, ax
dec ecx
mov dword [esp + 0x2c], ecx
jmp 0x1001e953
movzx edx, ax
mov dword [esp + 0x2c], edx
mov ecx, edx
xor eax, eax
xor edx, edx
cmp ecx, 2
mov dword [esp + 0x44], esi
mov dword [esp + 0x30], eax
jl 0x1001e98d
add ecx, 0xfffffffe
shr ecx, 1
inc ecx
lea esi, [ecx + ecx]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x44]
lea eax, [edi + 0xc]
add edx, dword [eax]
add esi, dword [eax + 0x10]
add eax, 0x20
sub ecx, 1
jne 0x1001e978
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
cmp eax, ecx
jae 0x1001e99f
shl eax, 4
lea eax, [eax + edi + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x30], eax
add edx, esi
add dword [esp + 0x30], edx
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, 0x10201619
xor cl, cl
mov eax, 0x3eb
lea esi, [esp + 0x50]
call fcn.10111280
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push esi
push ecx
mov dword [esp + 0x10a8], 3
mov edx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_block_count__d___total_length__lu_.
push edx
push eax
call fcn.10111350
add esp, 0x14
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x74]
push edx
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x68]
push ecx
mov dword [esp + 0x10ac], 0xffffffff
mov eax, dword [ebx]
mov eax, dword [eax + 0x20]
push esi
push edx
mov ecx, ebx
mov dword [esp + 0x74], 0x400
call eax
test eax, eax
jne 0x1001ea68
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x3f1
lea esi, [esp + 0x50]
call fcn.10111280
mov dword [esp + 0x10a0], 4
mov ecx, dword [esp + 0x74]
mov edx, dword [0x103b321c]
push ecx
push str.BRom_MT6276::BRom_WriteBuf__:_GetCommPreference___fail____Err__u_.
push edx
push eax
call fcn.10111350
add esp, 0x10
mov eax, 5
jmp 0x1001f1bd
mov eax, dword [esp + 0x48]
xor esi, esi
cmp eax, esi
je 0x1001ea79
mov ecx, dword [esp + 0x40]
push ecx
call eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x34], esi
cmp dword [esp + 0x2c], esi
jbe 0x1001ee62
add edi, 0xc
mov edx, dword [edi - 4]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [esp + 0x40], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], ecx
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, 0x10201619
xor cl, cl
mov eax, 0x409
lea esi, [esp + 0x50]
call fcn.10111280
mov dword [esp + 0x10a0], 5
mov edx, dword [edi + 4]
mov ecx, dword [edi]
push edx
mov edx, dword [edi - 4]
push ecx
mov ecx, dword [edi - 8]
push edx
mov edx, dword [esp + 0x40]
push ecx
mov ecx, dword [0x103b321c]
push edx
push str.BRom_MT6276::BRom_WriteBuf__:_sending_m_blocks__d__m_baseaddr_0x_08X___m_data_0x_08X___m_data_len__lu___m_data_sig_len__lu__.
push ecx
push eax
call fcn.10111350
mov esi, dword [esp + 0x5c]
add esp, 0x20
push 0x2710
push 0
push 1
mov dword [esp + 0x10ac], 0xffffffff
mov edx, dword [ebx]
mov eax, dword [edx + 0x70]
push 0xd7
push esi
mov ecx, ebx
call eax
test eax, eax
jne 0x1001eea3
mov eax, dword [edi - 8]
mov edx, dword [ebx]
mov edx, dword [edx + 0x78]
push 1
push eax
push esi
mov ecx, ebx
call edx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1001eead
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebx]
mov edx, dword [eax + 0x78]
push 1
push ecx
push esi
mov ecx, ebx
call edx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1001eef8
mov ecx, dword [esp + 0x24]
mov eax, dword [ebx]
mov edx, dword [eax + 0x78]
push 1
push ecx
push esi
mov ecx, ebx
call edx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1001ef44
mov eax, dword [ebx]
mov edx, dword [eax + 0x68]
push 0x7530
lea ecx, [esp + 0x1c]
push ecx
push esi
mov ecx, ebx
call edx
xor ecx, ecx
mov dword [esp + 0x14], eax
cmp eax, ecx
jne 0x1001ef90
mov eax, 0x1000
cmp ax, word [esp + 0x18]
jbe 0x1001efdd
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], ecx
cmp dword [edi], ecx
jbe 0x1001ed89
jmp 0x1001ebc4
mov ecx, dword [esp + 0x24]
mov eax, dword [edi]
mov edx, dword [esp + 0x60]
sub eax, ecx
mov dword [esp + 0x1c], eax
cmp edx, eax
ja 0x1001ebd8
mov dword [esp + 0x1c], edx
mov esi, dword [esp + 0x1c]
xor eax, eax
shr esi, 1
je 0x1001ec2f
mov edx, dword [esp + 0x40]
add ecx, edx
jmp 0x1001ebf0
movzx edx, byte [ecx]
mov byte [esp + eax*2 + 0x8c], dl
mov dl, byte [ecx + 1]
movzx bx, byte [esp + eax*2 + 0x8c]
mov byte [esp + eax*2 + 0x8d], dl
movzx dx, dl
shl dx, 8
or dx, bx
movzx edx, dx
xor dword [esp + 0x28], edx
inc eax
add ecx, 2
cmp eax, esi
jb 0x1001ebf0
mov ebx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x24]
test byte [esp + 0x1c], 1
je 0x1001ec5c
mov edx, dword [esp + 0x40]
lea ecx, [ecx + eax*2]
mov cl, byte [ecx + edx]
movzx dx, cl
lea esi, [esp + eax*2 + 0x8c]
mov byte [esp + eax*2 + 0x8d], 0
movzx eax, dx
xor dword [esp + 0x28], eax
mov byte [esi], cl
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebx]
push 0
push ecx
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x94]
push edx
mov edx, dword [eax + 0x58]
push ecx
mov ecx, ebx
call edx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1001f028
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x48]
add dword [esp + 0x24], eax
add ecx, eax
cmp dword [esp + 0x64], 0
mov dword [esp + 0x48], ecx
je 0x1001ed79
mov edx, dword [esp + 0x70]
mov eax, edx
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
test eax, eax
jge 0x1001ecba
fadd dword [0x1024b9e8]
mov eax, ecx
fstp dword [esp + 0x1c]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x1001ecd2
fadd dword [0x1024b9e8]
mov esi, dword [esp + 0x30]
mov eax, esi
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x1001ecea
fadd dword [0x1024b9e8]
fdivp st(1)
fld dword [esp + 0x1c]
fnstcw word [esp + 0x14]
fld st(0)
movzx eax, word [esp + 0x14]
fmulp st(2)
or eax, 0xc00
fxch st(1)
mov dword [esp + 0x1c], eax
fldcw word [esp + 0x1c]
fistp qword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
fldcw word [esp + 0x14]
cmp edx, eax
jae 0x1001ed1e
mov eax, edx
mov edx, eax
sub edx, dword [esp + 0x44]
je 0x1001ed77
mov edx, dword [esp + 0x68]
push edx
push esi
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
mov dword [esp + 0x4c], eax
push ecx
test eax, eax
jge 0x1001ed43
fadd dword [0x1024b9e8]
fdivrp st(1)
fmul qword [0x1024b9e0]
fnstcw word [esp + 0x20]
movzx eax, word [esp + 0x20]
or eax, 0xc00
mov dword [esp + 0x28], eax
fldcw word [esp + 0x28]
fistp dword [esp + 0x28]
mov al, byte [esp + 0x28]
movzx ecx, al
push ecx
fldcw word [esp + 0x24]
call dword [esp + 0x74]
jmp 0x1001ed79
fstp st(0)
mov edx, dword [esp + 0x24]
cmp edx, dword [edi]
jb 0x1001ebc0
mov esi, dword [esp + 0x3c]
mov eax, dword [ebx]
mov edx, dword [eax + 0x68]
push 0x7530
lea ecx, [esp + 0x3c]
push ecx
push esi
mov ecx, ebx
mov dword [esp + 0x44], 0
call edx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1001f074
mov eax, dword [ebx]
mov edx, dword [eax + 0x68]
push 0x7530
lea ecx, [esp + 0x1c]
push ecx
push esi
mov ecx, ebx
call edx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1001f0be
mov eax, 0x1000
cmp ax, word [esp + 0x18]
jbe 0x1001f10b
push 0xc8
call sub.KERNEL32.dll_Sleep
mov cx, word [esp + 0x28]
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
lea esi, [esp + 0x50]
cmp cx, word [esp + 0x3c]
jne 0x1001f136
mov edx, 0x10201619
xor cl, cl
mov eax, 0x48d
call fcn.10111280
movzx ecx, word [esp + 0x28]
mov dword [esp + 0x10a0], 0x10
movzx edx, word [esp + 0x38]
push edx
mov edx, dword [0x103b321c]
push ecx
push str.BRom_MT6276::BRom_WriteBuf__:_checksum_ok___checksum_0x_04X___brom_checksum_0x_04X_.
push edx
push eax
call fcn.10111350
mov eax, dword [esp + 0x48]
inc eax
add esp, 0x14
add edi, 0x10
mov dword [esp + 0x10a0], 0xffffffff
mov dword [esp + 0x34], eax
cmp eax, dword [esp + 0x2c]
jb 0x1001ea92
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, 0x10201619
xor cl, cl
mov eax, 0x492
lea esi, [esp + 0x7c]
call fcn.10111280
mov dword [esp + 0x10a0], 0x11
mov edx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_all_blocks_are_sent__DONE_
push edx
push eax
call fcn.10111350
add esp, 0xc
xor eax, eax
jmp 0x1001f1bd
mov eax, 6
jmp 0x1001f1bd
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x411
lea esi, [esp + 0x50]
call fcn.10111280
mov ecx, dword [esp + 0x14]
push ecx
mov dword [esp + 0x10a4], 6
mov edx, dword [edi - 8]
mov ecx, dword [0x103b321c]
push edx
push str.BRom_MT6276::BRom_WriteBuf__:_Write32DataWithEcho_0x_08X_:_send_base_address_fail___Err__d_.
push ecx
push eax
call fcn.10111350
mov eax, 7
jmp 0x1001f1ba
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x417
lea esi, [esp + 0x50]
call fcn.10111280
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push edx
push ecx
mov dword [esp + 0x10a8], 7
mov edx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_Write32DataWithEcho__lu_:_send_data_len_fail__Err__d_.
push edx
push eax
call fcn.10111350
mov eax, 8
jmp 0x1001f1ba
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x41d
lea esi, [esp + 0x50]
call fcn.10111280
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x10a8], 8
mov ecx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_Write32DataWithEcho__lu_:_send_data_sig_len_fail__Err__d_.
push ecx
push eax
call fcn.10111350
mov eax, 9
jmp 0x1001f1ba
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x423
lea esi, [esp + 0x50]
call fcn.10111280
mov edx, dword [esp + 0x14]
mov dword [esp + 0x10a0], 9
movzx ecx, word [esp + 0x18]
push edx
mov edx, dword [0x103b321c]
push ecx
push str.BRom_MT6276::BRom_WriteBuf__:_Read16Data__lu_:_get_status_fail___Err__d_.
push edx
push eax
call fcn.10111350
mov eax, 0xa
jmp 0x1001f1ba
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x428
lea esi, [esp + 0x50]
call fcn.10111280
mov dword [esp + 0x10a0], 0xa
movzx ecx, word [esp + 0x18]
mov edx, dword [0x103b321c]
push ecx
push str.BRom_MT6276::BRom_WriteBuf__:_Read16Data__:_Status_returns_error__0x_04X__
push edx
push eax
call fcn.10111350
movzx eax, word [esp + 0x28]
add esp, 0x10
jmp 0x1001f1bd
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x45d
lea esi, [esp + 0x50]
call fcn.10111280
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x10a8], 0xb
mov ecx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_WriteData___fail___offset__lu___Err__d_.
push ecx
push eax
call fcn.10111350
mov eax, 0xb
jmp 0x1001f1ba
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x476
lea esi, [esp + 0x50]
call fcn.10111280
mov edx, dword [esp + 0x14]
push edx
mov dword [esp + 0x10a4], 0xc
mov ecx, dword [0x103b321c]
push str.BRom_MT6276::BRom_WriteBuf__:_Read16Data___get_chksum_fail___Err__d_.
push ecx
push eax
call fcn.10111350
add esp, 0x10
mov eax, 0xc
jmp 0x1001f1bd
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x47c
lea esi, [esp + 0x50]
call fcn.10111280
mov edx, dword [esp + 0x14]
mov dword [esp + 0x10a0], 0xd
movzx ecx, word [esp + 0x18]
push edx
mov edx, dword [0x103b321c]
push ecx
push str.BRom_MT6276::BRom_WriteBuf__:_Read16Data__lu_:_get_status_fail___Err__d_.
push edx
push eax
call fcn.10111350
mov eax, 0xd
jmp 0x1001f1ba
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x481
lea esi, [esp + 0x50]
call fcn.10111280
mov dword [esp + 0x10a0], 0xe
jmp 0x1001f003
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x489
call fcn.10111280
movzx edx, word [esp + 0x28]
mov dword [esp + 0x10a0], 0xf
movzx ecx, word [esp + 0x38]
push ecx
mov ecx, dword [0x103b321c]
push edx
push str.BRom_MT6276::BRom_WriteBuf__:_checksum_error___checksum_0x_04X____brom_checksum_0x_04X_.
push ecx
push eax
call fcn.10111350
mov eax, 0x7e4
jmp 0x1001f1ba
push str.FlashToolLib_sv5_common_generic_src_brom_mt6276.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x3cb
lea esi, [esp + 0x50]
call fcn.10111280
mov dword [esp + 0x10a0], 2
movzx ecx, word [edi]
mov edx, dword [0x103b321c]
push ecx
push edi
push str.BRom_MT6276::BRom_WriteBuf__:_invalid_block_count__p_data_blocks_0x_08X___m_block_count__d_.
push edx
push eax
call fcn.10111350
mov eax, 2
add esp, 0x14
mov ecx, dword [esp + 0x1098]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1080]
xor ecx, esp
call fcn.1016cb16
mov esp, ebp
pop ebp
ret 0x18