Function at 0x41bff0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x1c0
mov eax, dword [0x4de8bc]
xor eax, esp
mov dword [esp + 0x1bc], eax
mov eax, dword [esp + 0x1c4]
push ebp
push edi
push eax
lea eax, [esp + 0x148]
push str.._s
xor ebp, ebp
push eax
mov dword [esp + 0x2c], ebp
call fcn.0042f6b4
add esp, 0xc
push ebp
push ebp
push 3
push ebp
push ebp
push 0xc0000000
lea ecx, [esp + 0x15c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x41c071
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x48]
push str.Failed_to_open_port__err_d_n
push edx
call fcn.0042f6b4
lea eax, [esp + 0x50]
push eax
call fcn.0041bfb0
add esp, 0x10
jmp 0x41c231
xor eax, eax
mov ecx, 0x1f4
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
push esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
mov eax, 0xa
push ecx
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [esp + 0x10]
push edx
push str.ATPDANET_r
call esi
push eax
push str.ATPDANET_r
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c201
push str.ATPDANET_r
call esi
cmp eax, dword [esp + 0xc]
jne 0x41c201
push 0
lea eax, [esp + 0x10]
push eax
push str.ATPDANET_r
mov dword [esp + 0x18], ebp
call esi
push eax
lea ecx, [esp + 0x34]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov eax, dword [esp + 0xc]
je 0x41c1f2
test eax, eax
je 0x41c1f2
push str.ATPDANET_r
call esi
mov esi, dword [esp + 0xc]
cmp esi, eax
jne 0x41c1e3
cmp esi, 4
mov eax, esi
mov ecx, str.ATPDANET_r
lea edx, [esp + 0x28]
jb 0x41c164
lea ecx, [ecx]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x41c168
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x41c150
test eax, eax
je 0x41c1c5
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x41c1b7
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x41c1c5
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x41c1b7
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x41c1c5
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x41c1b7
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x41c1c5
movzx esi, byte [edx]
movzx edx, byte [ecx]
sub esi, edx
je 0x41c1c5
test esi, esi
mov eax, 1
jg 0x41c1c7
or eax, 0xffffffff
jmp 0x41c1c7
xor eax, eax
test eax, eax
jne 0x41c1df
push str.PdaNet_port_found_n
call fcn.0041bfb0
add esp, 4
mov ebp, 1
jmp 0x41c229
mov ebp, dword [esp + 0x24]
push str.Non_pdanet_data_read_n
call fcn.0041bfb0
add esp, 4
jmp 0x41c229
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_read_comport__err_d__readlen_d_n
jmp 0x41c212
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_write_comport__err_d._wlen_d_n
lea eax, [esp + 0x54]
push eax
call fcn.0042f6b4
lea ecx, [esp + 0x58]
push ecx
call fcn.0041bfb0
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov ecx, dword [esp + 0x1c4]
pop edi
mov eax, ebp
pop ebp
xor ecx, esp
call fcn.0042e636
add esp, 0x1c0
ret