Function at 0x40ecd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov dword [ebp - 0x210], 0x14
cmp dword [0x445b98], 0
je 0x40ed5a
mov edi, dword [0x445708]
lea esi, [ebp - 0x20c]
mov ebx, 0x1ff
mov eax, edi
call fcn.00405880
cmp eax, 0xffffffff
je 0x40ed42
mov byte [esi], al
inc esi
cmp eax, 0xd
je 0x40ed2a
cmp eax, 0xa
je 0x40ed42
dec ebx
test ebx, ebx
jg 0x40ed0a
jmp 0x40ed42
mov eax, edi
call fcn.00405880
cmp eax, 0xa
je 0x40ed42
cmp eax, 0xffffffff
je 0x40ed42
push edi
push eax
call dword [edi + 0x50]
pop ecx
pop ecx
mov byte [esi], 0
movsx eax, byte [ebp - 0x20c]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x20c]
and eax, ecx
jmp 0x40ed7e
push 0x7d0
push 0x200
push dword [0x445b9c]
lea edi, [ebp - 0x20c]
call fcn.004292e5
add esp, 0xc
test eax, eax
jne 0x40eda7
mov eax, edi
xor ebx, ebx
cmp eax, ebx
jne 0x40edd2
cmp dword [0x4456fc], ebx
jne 0x40edb1
mov eax, dword [ebp - 0x210]
dec dword [ebp - 0x210]
test eax, eax
jne 0x40ecf0
push str.MAGPROTO:_No_data_received_from_GPS._n
jmp 0x40edac
push str.MAGPROTO:_Read_error_n
call fcn.00402619
cmp dword [0x445b98], ebx
je 0x40edc3
mov dword [0x444f14], 1
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042978e
leave
ret
cmp byte [ebp - 0x20c], 0x24
je 0x40ede2
push str.MAGPROTO:_line_doesnt_start_with__._n
jmp 0x40edac
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.MSVCR100.dll_strlen]
mov esi, eax
pop ecx
cmp esi, 5
jge 0x40ee0f
cmp dword [0x446424], 1
jle 0x40edc3
push esi
push str.SHORT_READ__d_n
call fcn.0040263f
pop ecx
pop ecx
jmp 0x40edc3
mov edi, dword [sym.imp.MSVCR100.dll_isprint]
mov dword [0x4456f8], ebx
jmp 0x40ee1e
dec esi
movsx eax, byte [ebp + esi - 0x20c]
push eax
call edi
pop ecx
test eax, eax
je 0x40ee1d
push 0x10
push ebx
mov ebx, dword [sym.imp.MSVCR100.dll_strtoul]
lea eax, [ebp + esi - 0x20d]
push eax
call ebx
lea ecx, [esi - 3]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x20b]
test ecx, ecx
je 0x40ee62
movsx edi, byte [eax]
xor edx, edi
inc eax
dec ecx
jne 0x40ee59
cmp dword [ebp - 0x210], edx
je 0x40eeb9
cmp dword [0x446424], 1
jle 0x40eea6
lea ecx, [esi - 5]
xor edx, edx
lea eax, [ebp - 0x20b]
test ecx, ecx
je 0x40ee8b
movsx esi, byte [eax]
xor edx, esi
inc eax
dec ecx
jne 0x40ee82
lea eax, [ebp - 0x20c]
push eax
push edx
push dword [ebp - 0x210]
push str.RXERR__02x__02x:__s_n
call fcn.0040263f
add esp, 0x10
cmp dword [0x4456fc], 0
jne 0x40eeb9
push str.MAGPROTO:_bad_communication.__Check_bit_rate._n
jmp 0x40edac
cmp dword [0x446424], 1
jle 0x40eed5
lea eax, [ebp - 0x20c]
push eax
push str.READ:__s_n
call fcn.0040263f
pop ecx
pop ecx
mov edi, dword [sym.imp.MSVCR100.dll_strncmp]
push 9
lea eax, [ebp - 0x20c]
push str._PMGNCSM_
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40ef15
push 0x10
push eax
lea eax, [ebp - 0x203]
push eax
call ebx
add esp, 0xc
mov dword [0x444efc], eax
mov dword [0x445714], 1
jmp 0x40edc3
push 7
lea eax, [ebp - 0x20c]
push str._PMGNWPL_
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40ef8d
lea ebx, [ebp - 0x20c]
call fcn.0040fb56
mov esi, eax
mov eax, dword [0x445704]
inc eax
cmp dword [0x446430], 0
mov dword [0x445704], eax
je 0x40ef54
push eax
call fcn.0041cbd6
pop ecx
mov eax, dword [0x4456e8]
test eax, eax
je 0x40ef67
cmp eax, 1
je 0x40ef86
cmp eax, 4
jmp 0x40ef6f
mov eax, dword [ebp + 8]
dec eax
dec eax
je 0x40ef86
dec eax
jne 0x40ef8d
mov eax, dword [0x444f0c]
mov ecx, dword [eax]
mov dword [esi], ecx
mov dword [esi + 4], eax
mov ecx, dword [eax]
mov dword [ecx + 4], esi
mov dword [eax], esi
jmp 0x40ef8d
mov ecx, esi
call fcn.0041c8df
push 7
lea eax, [ebp - 0x20c]
push str._PMGNTRK_
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40f00b
lea ecx, [ebp - 0x20c]
call fcn.0040f618
cmp dword [0x445710], 0
mov ebx, eax
jne 0x40effe
push dword [0x4456f4]
call fcn.0041bc52
pop ecx
mov esi, eax
call fcn.00418180
push esi
mov dword [0x445710], eax
call fcn.0041b375
pop ecx
mov ecx, dword [0x445710]
push 0x2e
push eax
mov dword [ecx + 0x10], eax
call dword [sym.imp.MSVCR100.dll_strrchr]
pop ecx
pop ecx
test eax, eax
je 0x40eff4
mov byte [eax], 0
mov eax, dword [0x445710]
call fcn.00418216
mov ecx, dword [0x445710]
mov eax, ebx
call fcn.004182e1
push 7
lea eax, [ebp - 0x20c]
push str._PMGNRTE_
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40f02d
lea ecx, [ebp - 0x20c]
call fcn.0040f79e
push 9
lea eax, [ebp - 0x20c]
push str._PMGNVER_
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40f051
lea eax, [ebp - 0x20c]
push eax
call fcn.0040ebb8
pop ecx
xor esi, esi
mov dword [0x4456f8], esi
cmp dword [0x44570c], esi
jne 0x40f09b
push 0xf
lea eax, [ebp - 0x20c]
push str._PMGNCMD_UNABLE
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x40f09b
push str.Unable_to_send_n
call fcn.0040263f
xor eax, eax
inc eax
pop ecx
mov dword [0x444f14], eax
mov dword [0x4456f8], eax
mov dword [0x44570c], esi
jmp 0x40edc3
push 0xc
lea eax, [ebp - 0x20c]
push str._PMGNCMD_END
push eax
call edi
add esp, 0xc
test eax, eax
je 0x40edb9
cmp dword [0x445b98], esi
je 0x40f0d0
mov eax, dword [0x445708]
push eax
call dword [eax + 0x34]
pop ecx
test eax, eax
jne 0x40edb9
cmp dword [0x445714], esi
je 0x40edc3
push dword [ebp - 0x210]
call fcn.0040eaf8
jmp 0x40ee0c