Function at 0x402cc0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4939e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [0x4bf204]
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], eax
lea ecx, [esi + 4]
mov byte [ebp - 4], 1
call fcn.00421b90
push eax
lea ecx, [ebp - 0x14]
call fcn.0046b468
mov eax, dword [0x4bf204]
mov dword [ebp - 0x1c], eax
push str.SerialPort
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x1648]
mov eax, dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.BaudRate
lea ecx, [ebp - 0x10]
mov dword [esi + 0x1648], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x164c]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.ParityBit
lea ecx, [ebp - 0x10]
mov dword [esi + 0x164c], eax
call fcn.0046b583
movsx ecx, byte [esi + 0x165c]
push ecx
lea edx, [ebp - 0x1c]
push 0x4bc5d0
push edx
call fcn.00463999
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x1c]
add esp, 0xc
mov dword [ebp - 0x20], eax
push ecx
push 0x104
push 0x104
lea ecx, [ebp - 0x18]
call fcn.0046b82a
mov edx, dword [ebp - 0x20]
push eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edx
push str.AccessPort
call ebx
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0046b879
mov eax, dword [ebp - 0x18]
push str.DataBit
lea ecx, [ebp - 0x10]
mov al, byte [eax]
mov byte [esi + 0x165c], al
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x1650]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.StopBit
lea ecx, [ebp - 0x10]
mov dword [esi + 0x1650], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x1654]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.FlowControl
lea ecx, [ebp - 0x10]
mov dword [esi + 0x1654], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x1594]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.BufferSize
lea ecx, [ebp - 0x10]
mov dword [esi + 0x1594], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x1658]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.SendCycle
lea ecx, [ebp - 0x10]
mov dword [esi + 0x1658], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x1644]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.BytesPerLine
lea ecx, [ebp - 0x10]
mov dword [esi + 0x1644], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x4d8]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.CopyHexDumpMode
lea ecx, [ebp - 0x10]
mov dword [esi + 0x4d8], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x4d4]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
mov dword [esi + 0x4d4], eax
push str.SelectCharMode
lea ecx, [ebp - 0x10]
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x4e4]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.MaxLogSize_MB
lea ecx, [ebp - 0x10]
mov dword [esi + 0x4e4], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0xb4]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.TextColor
lea ecx, [ebp - 0x10]
mov dword [esi + 0xb4], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0xa0]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.BgColor
lea ecx, [ebp - 0x10]
mov dword [esi + 0xa0], eax
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0xa4]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
push str.SendFile
lea ecx, [ebp - 0x10]
mov dword [esi + 0xa4], eax
call fcn.0046b583
lea eax, [esi + 0x162c]
lea ecx, [ebp - 0x1c]
push eax
call fcn.0046b533
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
push eax
mov dword [ebp - 0x20], ecx
push 0x104
push 0x104
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x24], edx
call fcn.0046b82a
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
push eax
push ecx
push edx
push str.AccessPort
call ebx
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0046b879
lea eax, [ebp - 0x18]
lea ecx, [esi + 0x162c]
push eax
call fcn.0046b533
push str.PredefDataFile
lea ecx, [ebp - 0x10]
call fcn.0046b583
lea eax, [esi + 0x54]
lea ecx, [ebp - 0x1c]
push eax
call fcn.0046b533
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
push eax
mov dword [ebp - 0x24], ecx
push 0x104
push 0x104
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x20], edx
call fcn.0046b82a
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
push eax
push ecx
push edx
push str.AccessPort
call ebx
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0046b879
lea eax, [ebp - 0x18]
lea ecx, [esi + 0x54]
push eax
call fcn.0046b533
push str.AutoAckDataFile
lea ecx, [ebp - 0x10]
call fcn.0046b583
lea eax, [esi + 0x78]
lea ecx, [ebp - 0x1c]
push eax
call fcn.0046b533
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
push eax
mov dword [ebp - 0x24], ecx
push 0x104
push 0x104
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x20], edx
call fcn.0046b82a
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
push eax
push ecx
push edx
push str.AccessPort
call ebx
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0046b879
lea eax, [ebp - 0x18]
lea ecx, [esi + 0x78]
push eax
call fcn.0046b533
push str.SysParameter
lea ecx, [ebp - 0x10]
call fcn.0046b583
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x15e8]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push eax
push str.AccessPort
call edi
mov ecx, eax
mov edx, eax
and ecx, 1
mov dword [esi + 0x15e8], eax
shr edx, 4
mov dword [esi + 0x15fc], ecx
and edx, 1
mov ecx, eax
mov dword [esi + 0x1600], edx
shr ecx, 8
mov edx, eax
and ecx, 1
shr edx, 0xc
and edx, 1
mov dword [esi + 0x1604], ecx
mov dword [esi + 0x1608], edx
mov ecx, eax
mov edx, eax
shr ecx, 0x10
shr edx, 0x14
and ecx, 1
and edx, 1
mov dword [esi + 0x1614], ecx
mov dword [esi + 0x1618], edx
mov ecx, eax
mov edx, eax
shr ecx, 0x1c
shr edx, 1
and ecx, 1
and edx, 1
mov dword [esi + 0x161c], ecx
mov dword [esi + 0x1620], edx
mov ecx, eax
mov edx, eax
shr ecx, 2
shr edx, 5
and ecx, 1
and edx, 1
mov dword [esi + 0x1624], ecx
mov dword [esi + 0x4dc], edx
mov ecx, eax
mov edx, eax
shr ecx, 6
shr edx, 7
and ecx, 1
and edx, 1
mov dword [esi + 0x4e0], ecx
mov dword [esi + 0x4c0], edx
mov ecx, eax
mov edx, eax
shr ecx, 0xd
shr edx, 0x11
and ecx, 1
and edx, 1
mov dword [esi + 0x4bc], ecx
mov dword [esi + 0x4c8], edx
mov ecx, eax
mov edx, eax
shr ecx, 0xe
shr edx, 0xf
shr eax, 0x12
and ecx, 1
and edx, 1
and eax, 1
mov dword [esi + 0xac], ecx
mov dword [esi + 0xb0], edx
mov dword [esi + 0x5c], eax
je 0x4031db
mov dword [esi + 0x64], 0
mov ecx, dword [esi + 0x164c]
mov eax, 0x3e800
cmp ecx, eax
jbe 0x4031f0
mov dword [esi + 0x164c], eax
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov ecx, dword [esi + 0x164c]
mov dword [eax + 4], ecx
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov dl, byte [esi + 0x1650]
mov byte [eax + 0x12], dl
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov cl, byte [esi + 0x1654]
mov bl, 2
mov byte [eax + 0x14], cl
movsx eax, byte [esi + 0x165c]
add eax, 0xffffffbb
cmp eax, 0x2e
ja case.0x40325e.74
xor edx, edx
mov dl, byte [eax + 0x403344]
jmp dword [edx*4 + 0x40332c]
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov byte [eax + 0x13], 0
jmp case.0x40325e.74
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov byte [eax + 0x13], 1
jmp case.0x40325e.74
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov byte [eax + 0x13], bl
jmp case.0x40325e.74
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov byte [eax + 0x13], 3
jmp case.0x40325e.74
call fcn.00402c70
mov ecx, eax
add ecx, 0x1670
call fcn.004123a0
mov byte [eax + 0x13], 4
mov ecx, esi
call fcn.00403ac0
mov ecx, esi
call fcn.00403380
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.0046b3fa
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.0046b3fa
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call fcn.0046b3fa
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
call fcn.0046b3fa
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret