Function at 0x4028d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x524ae8
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push edi
mov eax, dword [0x56fae0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.004036e5
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x402911
push 0x80004005
call fcn.00401120
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
lea eax, [esi + 0x158]
mov dword [ebp - 4], ebx
cmp byte [eax], 0x34
jne 0x40298e
cmp byte [esi + 0x159], 0x4a
jne 0x40298e
cmp byte [esi + 0x15a], 0x83
jne 0x40298e
cmp byte [esi + 0x15b], 0x81
jne 0x40298e
mov byte [esi + 0x818c], bl
mov ecx, 0x8020
xor byte [eax], 0xcb
inc eax
dec ecx
jne 0x402954
movzx ecx, byte [esi + 0x167]
movzx edx, byte [esi + 0x166]
movzx eax, byte [esi + 0x165]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 0x164]
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, edx
mov dword [esi + 0x8188], ecx
jmp 0x402995
mov byte [esi + 0x818c], 1
cmp byte [esi + 0x818c], bl
jne 0x402bdf
cmp byte [esi + 0x8187], 0xff
jne 0x402a0f
push 0x70000010
push str.Error_code:0x_08X__Cant_update_it_
lea eax, [ebp - 0x10]
push eax
call fcn.00401bc0
add esp, 0xc
mov ebx, esi
call fcn.00402e20
mov edi, dword [ebp - 0x10]
push 0x10
push str.ERROR
push edi
mov ecx, esi
call fcn.0040e688
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4029fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [esi + 0x168]
cmp cl, byte [esi + 0x8178]
jne 0x402bcc
mov dl, byte [esi + 0x16c]
cmp dl, byte [esi + 0x817c]
jne 0x402bcc
mov al, byte [esi + 0x16d]
cmp al, byte [esi + 0x817d]
jne 0x402bcc
mov cl, byte [esi + 0x16e]
cmp cl, byte [esi + 0x817e]
jne 0x402bcc
mov dl, byte [esi + 0x16f]
cmp dl, byte [esi + 0x817f]
jne 0x402bcc
mov al, byte [esi + 0x170]
cmp al, byte [esi + 0x8180]
jne 0x402bcc
mov cl, byte [esi + 0x171]
cmp cl, byte [esi + 0x8181]
jne 0x402bcc
mov dl, byte [esi + 0x172]
cmp dl, byte [esi + 0x8182]
jne 0x402bcc
mov al, byte [esi + 0x173]
cmp al, byte [esi + 0x8183]
jne 0x402bcc
mov cl, byte [esi + 0x16a]
cmp cl, byte [esi + 0x817a]
jne 0x402b86
mov dl, byte [esi + 0x16b]
cmp dl, byte [esi + 0x817b]
jne 0x402b86
mov al, byte [esi + 0x8179]
cmp byte [esi + 0x169], al
jne 0x402bb0
mov cl, byte [esi + 0x15d]
cmp al, cl
jbe 0x402b43
movzx ecx, cl
movzx edx, al
push ecx
push edx
lea eax, [ebp - 0x10]
push str.Are_you_want_to_have_a_downgrade__nfrom_ver_0x_02X__down_to_ver_0x_02X___n
push eax
call fcn.00401bc0
mov edi, dword [ebp - 0x10]
add esp, 0x10
push 0x24
push str.UPDATE
push edi
mov ecx, esi
call fcn.0040e688
cmp eax, 7
jne 0x402b43
mov ebx, esi
call fcn.00402e20
lea ecx, [ebp - 0x10]
call fcn.00401490
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [esi + 0x8179]
cmp al, byte [esi + 0x15d]
jne 0x402bdf
movzx ecx, al
push ecx
lea edx, [ebp - 0x10]
push str.Dont_need_to_update__the_device_version_0x_02X__is_the_newest_
push edx
call fcn.00401bc0
add esp, 0xc
lea ecx, [ebp - 0x10]
call fcn.00401490
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
push str.Its_a_different_product__the_firmware_is_not_matched__nCant_update_it_
push eax
call fcn.00401bc0
add esp, 8
mov ebx, esi
call fcn.00402e20
mov ecx, dword [ebp - 0x10]
push 0x10
push str.ERROR
push ecx
mov ecx, esi
call fcn.0040e688
lea ecx, [ebp - 0x10]
call fcn.00401490
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x70000012
push str.Error_code:0x_08X__Cant_update_it_
lea edx, [ebp - 0x10]
push edx
jmp 0x4029b8
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402c02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret