Function at 0x10018450
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov bl, byte [ebp + 8]
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [ebp - 0x10], esi
mov eax, dword [esi + 0x130]
mov byte [esi + eax + 0x134], bl
mov ecx, dword [esi + 0x130]
mov eax, dword [esi + 0x12c]
inc ecx
mov dword [esi + 0x130], ecx
cmp eax, 8
ja case.0x10018496.8
jmp dword [eax*4 + 0x10018924]
cmp ecx, 4
jae case.0x10018496.1
cmp bl, byte [ecx + 0x1006fc77]
mov eax, 0xfffffff8
mov edx, 0xfffffff1
cmove eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10033290
mov esp, ebp
pop ebp
ret 4
cmp bl, 0x31
jne 0x10018909
mov dword [esi + 0x12c], 2
mov edi, 0xfffffff1
jmp 0x1001890e
mov dl, byte [esi + 0x10160]
dec dl
movzx eax, bl
movzx ecx, dl
shl ecx, 3
shl ax, cl
or ax, word [esi + 0x118]
movzx eax, ax
mov byte [esi + 0x10160], dl
mov ecx, eax
mov word [esi + 0x118], ax
test dl, dl
jne 0x100184db
mov byte [esi + 0x10160], 2
cmp ecx, 0xb
jb 0x10018909
mov dword [esi + 0x12c], 3
mov edi, 0xfffffff1
jmp 0x1001890e
mov dx, word [esi + 0x10162]
mov edi, 0xfffffff1
dec dx
movzx eax, bl
mov word [esi + 0x10162], dx
lea ecx, [edx*8]
shl eax, cl
or dword [esi + 0x120], eax
test dx, dx
jne 0x1001890e
mov eax, 4
mov word [esi + 0x10162], ax
mov dword [esi + 0x12c], eax
jmp 0x1001890e
mov dx, word [esi + 0x10164]
mov edi, 0xfffffff1
dec dx
movzx eax, bl
mov word [esi + 0x10164], dx
lea ecx, [edx*8]
shl eax, cl
or dword [esi + 0x11c], eax
test dx, dx
jne 0x1001890e
mov eax, 4
mov dword [esi + 0x12c], 5
mov word [esi + 0x10164], ax
jmp 0x1001890e
cmp bl, 1
ja 0x10018909
mov byte [esi + 0x124], bl
mov edi, 0xfffffff1
mov dword [esi + 0x12c], 6
jmp 0x1001890e
mov ax, word [esi + 0x10166]
movzx ecx, word [esi + 0x118]
inc ax
mov word [esi + 0x10166], ax
sub ecx, 0xb
movzx eax, ax
cmp eax, ecx
jne 0x1001890e
lea eax, [esi + 0x143]
mov dword [esi + 0x12c], 7
mov dword [esi + 0x128], eax
xor eax, eax
mov word [esi + 0x10166], ax
lea edi, [eax - 0xf]
jmp 0x1001890e
mov dl, byte [esi + 0x10168]
dec dl
movzx eax, bl
movzx ecx, dl
shl ecx, 3
shl ax, cl
or ax, word [esi + 0x126]
movzx ecx, ax
mov byte [esi + 0x10168], dl
mov dword [ebp - 8], ecx
mov word [esi + 0x126], cx
test dl, dl
jne 0x100184db
movzx ebx, word [esi + 0x118]
lea eax, [esi + 0x13a]
xor edx, edx
mov byte [esi + 0x10168], 2
sub ebx, 2
je 0x100186b7
mov esi, eax
nop
movzx eax, byte [esi]
lea esi, [esi + 1]
movzx ecx, dx
shr ecx, 8
xor ecx, eax
shl edx, 8
xor dx, word [ecx*2 + 0x1006fc80]
movzx edx, dx
sub ebx, 1
jne 0x10018690
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
lea ebx, [esi + 0x134]
mov dword [ebp - 0x14], ebx
cmp cx, dx
jne 0x100186d1
mov ecx, esi
call fcn.10018280
jmp 0x100188af
movzx eax, cx
push eax
movzx eax, dx
push eax
push str.ERROR:_Calculated_CRC__04X__tPacketCRC__04X__n
call fcn.10006b50
movzx eax, word [esi + 0x118]
add esp, 0xc
mov dword [ebp - 0xc], eax
push eax
push str.Dumping_Packet__len___d_:
call fcn.10006b50
push str._SOH_
call fcn.10006b50
movzx eax, byte [ebx + 1]
add esp, 0xc
push eax
push 0x10070360
call fcn.10006b50
movzx eax, byte [ebx + 2]
push eax
push 0x10070360
call fcn.10006b50
movzx eax, byte [ebx + 3]
push eax
push 0x10070360
call fcn.10006b50
movzx eax, byte [ebx + 5]
push eax
movzx eax, byte [ebx + 4]
push eax
push str.__02X_02X_
call fcn.10006b50
movzx eax, byte [ebx + 9]
add esp, 0x24
push eax
movzx eax, byte [ebx + 8]
push eax
movzx eax, byte [ebx + 7]
push eax
movzx eax, byte [ebx + 6]
push eax
push str.__02X_02X_02X_02X_
call fcn.10006b50
movzx eax, byte [ebx + 0xd]
add esp, 0x14
push eax
movzx eax, byte [ebx + 0xc]
push eax
movzx eax, byte [ebx + 0xb]
push eax
movzx eax, byte [ebx + 0xa]
push eax
push str.__02X_02X_02X_02X_
call fcn.10006b50
movzx eax, byte [ebx + 0xe]
add esp, 0x14
push eax
push str.__02X_
call fcn.10006b50
push 0x10070398
lea eax, [ebp - 8]
push 0x1007039c
push eax
call fcn.1003b59d
add esp, 0x14
test eax, eax
jne 0x1001885f
push str.___n
push dword [ebp - 8]
call fcn.10006940
mov eax, dword [ebp - 0xc]
mov edi, 0xf
add eax, 0xfffffffe
add esp, 8
xor ebx, ebx
cmp eax, edi
jbe 0x10018819
mov esi, dword [ebp - 0x14]
nop
movzx eax, byte [esi + edi]
push eax
push str._02X
push dword [ebp - 8]
call fcn.10006940
inc ebx
add esp, 0xc
test bl, 0x1f
jne 0x1001880b
push 0x10070394
push dword [ebp - 8]
call fcn.10006940
add esp, 8
mov eax, dword [ebp - 0xc]
inc edi
add eax, 0xfffffffe
cmp edi, eax
jb 0x100187e0
mov esi, dword [ebp - 0x10]
push 0x10070390
push dword [ebp - 8]
call fcn.10006940
push dword [ebp - 8]
call fcn.1003b709
movzx eax, byte [edi + esi + 0x135]
lea ebx, [esi + 0x134]
add esp, 0xc
push eax
movzx eax, byte [edi + ebx]
push eax
push str.__02X_02X_
call fcn.10006b50
add esp, 0xc
push 0x10070394
call fcn.10006b50
add esp, 4
mov eax, dword [esi + 0x18]
test eax, eax
je 0x10018878
push 0xffffffffffffffff
push 0
push 0
push 0
push 0
push dword [esi + 0x1013c]
call eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1001888b
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [esi + 0x1013c]
call eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x100188aa
push 0
push 0
push 3
push dword [esi + 0x1013c]
call eax
test eax, eax
je 0x100188aa
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edi, 0xfffffff8
xor eax, eax
push 0x10005
push eax
push ebx
mov word [esi + 0x118], ax
mov dword [esi + 0x11c], eax
mov dword [esi + 0x120], eax
mov byte [esi + 0x124], al
mov word [esi + 0x126], ax
mov dword [esi + 0x128], eax
mov dword [esi + 0x12c], eax
mov dword [esi + 0x130], eax
call fcn.10037990
add esp, 0xc
jmp 0x1001890e
xor eax, eax
mov dword [esi + 0x12c], edi
mov dword [esi + 0x130], edi
mov word [esi + 0x118], ax
mov edi, 0xfffffff8
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10033290
mov esp, ebp
pop ebp
ret 4