Function at 0x427c95
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
and dword [ebp - 8], 0
and dword [ebp - 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
mov eax, dword [eax + 8]
push esi
push edi
mov byte [ebp - 1], 0
mov dword [ebp - 0xc], eax
call fcn.00427c4e
push str.Rx_Data:
mov esi, eax
mov edi, edx
call fcn.00428dc8
pop ecx
add esi, 5
push 0
mov dword [ebp - 0x1c], esi
pop esi
adc edi, esi
mov dword [ebp - 0x18], edi
call fcn.00427c4e
cmp edx, edi
jg 0x427dca
jge 0x427dc1
mov edi, dword [ebp + 8]
push edi
call fcn.004284ef
pop ecx
test eax, eax
je 0x427db1
push esi
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp + 0xf]
push eax
push dword [edi]
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
or edi, 0xffffffff
cmp dword [ebp - 0x14], edi
je 0x427de6
movzx eax, byte [ebp + 0xf]
push eax
push str._02x
call fcn.00428dc8
pop ecx
pop ecx
cmp dword [ebp - 8], esi
jne 0x427d47
cmp byte [ebp + 0xf], 0x10
jne 0x427e05
mov dword [ebp - 8], 1
jmp 0x427db1
xor ecx, ecx
inc ecx
cmp dword [ebp - 8], ecx
jne 0x427d61
movzx eax, byte [ebp + 0xf]
mov ecx, dword [ebx]
mov word [ecx], ax
mov dword [ebp - 8], 2
jmp 0x427db1
mov al, byte [ebp + 0xf]
cmp al, 0x10
jne 0x427d75
cmp dword [ebp - 0x10], esi
je 0x427d72
mov dword [ebp - 0x10], esi
jmp 0x427db1
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 8], 2
jne 0x427d88
mov ecx, dword [ebx]
movzx eax, al
mov dword [ecx + 4], eax
mov dword [ebp - 8], edi
jmp 0x427db1
cmp al, 3
jne 0x427d95
cmp dword [ebp - 0x10], esi
jne 0x427e2d
mov ecx, dword [ebx]
mov edx, dword [ebp - 0xc]
sub edx, dword [ecx + 8]
cmp edx, 0x400
jge 0x427f0b
mov ecx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov byte [ecx], al
call fcn.00427c4e
cmp edx, dword [ebp - 0x18]
jl 0x427cea
jg 0x427dca
cmp eax, dword [ebp - 0x1c]
jb 0x427cea
push str.GPS_Packet_Read:_Timeout.__No_data_received.
call fcn.00428d3e
mov dword [0x445cc8], 0xfffffffc
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push str.read
call dword [sym.imp.MSVCR100.dll_perror]
mov dword [esp], str.GPS_Packet_Read:_Read_error
call fcn.00428d3e
mov dword [0x445cc8], edi
jmp 0x427dde
mov esi, dword [sym.imp.MSVCR100.dll___iob_func]
push str.GPS_Packet_Read:_No_DLE.__Data_received__but_probably_not_a_garmin_packet._n
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0xc
jmp 0x427ddf
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xc]
mov edi, dword [eax + 8]
mov esi, dword [eax + 4]
mov edx, ecx
sub edx, edi
sub edx, 2
cmp edx, esi
je 0x427e56
push str.GPS_Packet_Read:_Bad_count
call fcn.00428d3e
or dword [0x445cc8], 0xffffffff
jmp 0x427dde
mov cl, byte [ecx - 2]
mov byte [ebp - 2], cl
mov ecx, edi
test esi, esi
je 0x427e6b
mov dl, byte [ecx]
sub byte [ebp - 1], dl
inc ecx
dec esi
jne 0x427e62
mov cl, byte [ebp - 1]
sub cl, byte [eax]
sub cl, byte [eax + 4]
cmp cl, byte [ebp - 2]
je 0x427e7f
push str.CHECKSUM:_Read_error_n
jmp 0x427e48
movzx ecx, byte [edi]
push ecx
mov cx, word [eax]
lea edx, [ebp - 0x14]
call fcn.00426178
xor esi, esi
pop ecx
mov dword [ebp - 0x10], eax
cmp dword [0x445cc4], esi
je 0x427ee4
push 0x432574
call fcn.00428dc8
mov eax, dword [ebx]
pop ecx
cmp dword [eax + 4], esi
jbe 0x427ed9
mov eax, dword [eax + 8]
movsx edi, byte [esi + eax]
push edi
call dword [sym.imp.MSVCR100.dll_isalnum]
pop ecx
test eax, eax
jne 0x427ec4
push 0x2e
pop edi
push edi
push 0x4355c8
call fcn.00428dc8
mov eax, dword [ebx]
inc esi
pop ecx
pop ecx
cmp esi, dword [eax + 4]
jb 0x427eae
push 0x432574
call fcn.00428dc8
pop ecx
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x427ef0
mov eax, 0x42b2c4
push eax
push dword [ebp - 0x10]
push str.___8s_s__n
call fcn.00428dc8
mov eax, dword [ebx]
mov eax, dword [eax + 4]
add esp, 0xc
jmp 0x427de1
push str.GPS_Serial_Packet_Read:_Bad_payload_size_no_ETX_found
jmp 0x427df8