Function at 0x46ccd6
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4823b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x158
mov dword [ebp - 0x164], ecx
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString_2
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x164]
cmp dword [eax + 0x14], 0xffffffff
je 0x46cd72
mov ecx, dword [ebp - 0x164]
call fcn.0046d1f7
mov ecx, dword [ebp - 0x164]
call fcn.0046de3d
push 0xf
mov ecx, dword [ebp - 0x164]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
push 0x81
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCommMask]
mov edx, dword [ebp - 0x164]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x164]
mov dword [ecx + 0x14], 0xffffffff
push 0x49aef0
push 0xff
lea edx, [ebp - 0x120]
push edx
push str.Com1
push str.CommPortType
push str.COMM_PORT
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x120]
push eax
mov ecx, 0x49e22c
call sub.MFC42.DLL_CString::operator_1
push 0
push 0x40000080
push 3
push 0
push 0
push 0xc0000000
mov ecx, 0x49e22c
call fcn.00402af0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x164]
mov dword [ecx + 0x14], eax
mov edx, dword [ebp - 0x164]
cmp dword [edx + 0x14], 0xffffffff
jne 0x46ce9f
mov dword [ebp - 0x144], 0
jmp 0x46ce00
mov eax, dword [ebp - 0x144]
add eax, 1
mov dword [ebp - 0x144], eax
cmp dword [ebp - 0x144], 0xa
jge 0x46ce9f
mov ecx, dword [ebp - 0x144]
add ecx, 1
push ecx
push str.Com_d
push 0x49e22c
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push 0
push 0x40000080
push 3
push 0
push 0
push 0xc0000000
mov ecx, 0x49e22c
call fcn.00402af0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, dword [ebp - 0x164]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0x164]
cmp dword [eax + 0x14], 0xffffffff
je 0x46ce9a
mov ecx, dword [0x49e22c]
push ecx
lea edx, [ebp - 0x120]
push edx
push 0x49af30
lea eax, [ebp - 0x140]
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
push 0
push 0
lea ecx, [ebp - 0x140]
call fcn.00402af0
push eax
call sub.MFC42.DLL_AfxMessageBox_1
jmp 0x46ce9f
jmp 0x46cdf1
mov ecx, dword [ebp - 0x164]
cmp dword [ecx + 0x14], 0xffffffff
jne 0x46cedd
push 0
push 0
push 0x49af54
call sub.MFC42.DLL_AfxMessageBox_1
mov byte [ebp - 0x148], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x148]
jmp 0x46d163
push 0x81
mov edx, dword [ebp - 0x164]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommMask]
test eax, eax
jne 0x46cf45
push 0
push 0
push str.SetCommMask
call sub.MFC42.DLL_AfxMessageBox_1
mov ecx, dword [ebp - 0x164]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x164]
mov dword [eax + 0x14], 0xffffffff
mov byte [ebp - 0x14c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x14c]
jmp 0x46d163
push 0x400
push 0x1000
mov ecx, dword [ebp - 0x164]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetupComm]
test eax, eax
jne 0x46cfb2
push 0
push 0
push str.SetupComm
call sub.MFC42.DLL_AfxMessageBox_1
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x164]
mov dword [edx + 0x14], 0xffffffff
mov byte [ebp - 0x150], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x150]
jmp 0x46d163
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0x3e8
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x164]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x46d02e
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x164]
mov dword [edx + 0x14], 0xffffffff
mov byte [ebp - 0x154], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x154]
jmp 0x46d163
push 0xf
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov dword [ebp - 0x13c], 0x1c
lea edx, [ebp - 0x13c]
push edx
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x46d0a6
mov edx, dword [ebp - 0x164]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x164]
mov dword [ecx + 0x14], 0xffffffff
mov byte [ebp - 0x158], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x158]
jmp 0x46d163
mov edx, dword [ebp + 8]
mov dword [ebp - 0x138], edx
cmp dword [ebp + 0xc], 0
jne 0x46d0c5
mov eax, dword [ebp - 0x134]
and al, 0xfd
mov dword [ebp - 0x134], eax
jmp 0x46d0d4
mov ecx, dword [ebp - 0x134]
or ecx, 2
mov dword [ebp - 0x134], ecx
mov byte [ebp - 0x12a], 8
mov dl, byte [ebp + 0xc]
mov byte [ebp - 0x129], dl
mov byte [ebp - 0x128], 0
lea eax, [ebp - 0x13c]
push eax
mov ecx, dword [ebp - 0x164]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x46d144
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x164]
mov dword [edx + 0x14], 0xffffffff
mov byte [ebp - 0x15c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x15c]
jmp 0x46d163
mov byte [ebp - 0x160], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x160]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc