Function at 0x418420
Capabilities:
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x46ccdc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf4
push ebx
push esi
push edi
mov esi, ecx
mov dword [esp + 0x108], 0
call fcn.00449a21
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [esp + 0xc], ebx
lea ecx, [esp + 0x6c]
mov byte [esp + 0x108], 1
call fcn.0044a260
push 0
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x88]
mov byte [esp + 0x114], 2
call fcn.0040b350
push 0
lea ecx, [esp + 0x94]
mov byte [esp + 0x10c], 3
call fcn.004255d0
mov byte [esp + 0x108], 4
call fcn.004618f9
mov edi, dword [eax + 4]
mov ecx, edi
call fcn.0041a760
test eax, eax
je 0x418577
lea ecx, [esp + 0x90]
call fcn.00445200
lea ecx, [esp + 0x90]
mov byte [esp + 0x108], 3
call fcn.00444acf
mov eax, dword [esp + 0x8c]
add eax, 0xfffffff0
mov byte [esp + 0x108], 2
mov dword [esp + 0x7c], vtable.CFileException.0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41850f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x6c]
mov byte [esp + 0x108], 1
call fcn.0044a29f
lea eax, [ebx - 0x10]
mov byte [esp + 0x108], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418542
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x110]
add eax, 0xfffffff0
mov dword [esp + 0x108], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418a6c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x418a6c
push ebp
mov ebp, dword [esp + 0x114]
lea eax, [esp + 0x80]
push eax
push 0
push ebp
lea ecx, [esp + 0x7c]
call fcn.0044a55d
test eax, eax
jne 0x41862a
push eax
push eax
push str.File_Open_Error
call fcn.0045501c
lea ecx, [esp + 0x94]
mov byte [esp + 0x10c], 3
call fcn.00444acf
mov eax, dword [esp + 0x90]
add eax, 0xfffffff0
mov byte [esp + 0x10c], 2
mov dword [esp + 0x80], vtable.CFileException.0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4185ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x70]
mov byte [esp + 0x10c], 1
call fcn.0044a29f
lea eax, [ebx - 0x10]
mov byte [esp + 0x10c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418622
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [ebp - 0x10]
jmp 0x418a49
mov ecx, edi
call fcn.004194d0
mov ecx, esi
call fcn.004163f0
push 0
push 0x1000
push 1
lea eax, [esp + 0x7c]
push eax
lea ecx, [esp + 0x24]
call fcn.0044eb74
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
lea edx, [eax + 2]
cmp edx, ecx
mov byte [esp + 0x10c], 5
jbe 0x41867d
sub eax, ecx
add eax, 2
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov bx, word [eax]
add eax, 2
lea edx, [eax + 2]
cmp edx, ecx
mov dword [esp + 0x3c], eax
jbe 0x4186a5
sub eax, ecx
add eax, 2
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov dx, word [eax]
movzx edx, dx
add eax, 2
test edx, edx
mov dword [esp + 0x3c], eax
jle 0x41870e
mov ebp, edx
lea edx, [eax + 4]
cmp edx, ecx
jbe 0x4186d2
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
mov dword [edi + 0xec], eax
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x18]
add eax, 4
push edx
mov dword [esp + 0x44], eax
call fcn.0040b1c0
mov ecx, dword [esp + 0x10]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x88]
dec ebp
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
jne 0x4186b8
lea edx, [eax + 4]
cmp edx, ecx
jbe 0x41872c
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov edx, dword [eax]
add eax, 4
mov dword [esi + 0x358], edx
lea edx, [eax + 4]
cmp edx, ecx
mov dword [esp + 0x3c], eax
jbe 0x418759
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov edx, dword [eax]
add eax, 4
mov dword [esi + 0x12c], edx
lea edx, [eax + 4]
cmp edx, ecx
mov dword [esp + 0x3c], eax
jbe 0x418786
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov ebp, dword [eax]
add eax, 4
lea edx, [eax + 4]
cmp edx, ecx
mov dword [esp + 0x3c], eax
jbe 0x4187ad
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov edx, dword [eax]
add eax, 4
cmp bx, 2
mov dword [esi + 0x134], edx
mov dword [esp + 0x3c], eax
jne 0x4187ef
lea edx, [eax + 4]
cmp edx, ecx
jbe 0x4187e0
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov edx, dword [eax]
add eax, 4
mov dword [esi + 0x138], edx
mov dword [esp + 0x3c], eax
lea edx, [eax + 4]
cmp edx, ecx
jbe 0x41880d
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
mov edx, dword [eax]
add eax, 4
mov dword [esi + 0x130], edx
lea edx, [eax + 4]
cmp edx, ecx
mov dword [esp + 0x3c], eax
jbe 0x418836
sub eax, ecx
add eax, 4
push eax
lea ecx, [esp + 0x18]
call fcn.0044e71c
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax]
lea edi, [esi + 0x374]
push edi
lea edx, [esp + 0x18]
add eax, 4
push edx
mov dword [esi + 0x370], ecx
mov dword [esp + 0x44], eax
call fcn.0040b1c0
push 0x1c
lea eax, [esi + 0x33c]
push eax
lea ecx, [esp + 0x1c]
call fcn.0044e605
test ebp, ebp
je 0x41899d
mov eax, dword [esi + 0x134]
test eax, eax
mov ebx, 0x402
mov ebp, 0x401
je 0x4188eb
mov eax, dword [edi]
push eax
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esi + 0x520], eax
je 0x4188dd
mov dx, word [esi + 0x12c]
mov ecx, dword [esi + 0x1c]
mov word [esp + 0x68], dx
lea edx, [esp + 0x5c]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esi + 0x358]
push edx
push eax
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x74], ecx
call sub.modbusm.dll__ConnectTCP_8
cmp eax, 0xffffffff
mov dword [esi + 0xd4], eax
jne 0x4188eb
push 0
push 0
push str.modbus_TCP_Connection_Failed
jmp 0x4188e6
push 0
push 0
push str.Invalid_IP_Address
call fcn.0045501c
mov eax, dword [esi + 0x138]
test eax, eax
je 0x41896d
mov edi, dword [edi]
push edi
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esi + 0x520], eax
je 0x41895d
mov ecx, dword [esi + 0x1c]
mov dx, word [esi + 0x12c]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esi + 0x358]
mov dword [esp + 0x6c], ecx
xor ecx, ecx
mov cx, word [esi + 0x378]
mov word [esp + 0x68], dx
lea edx, [esp + 0x5c]
push edx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebp
push ecx
push eax
call sub.modbusm.dll__ConnectTelNet_12
cmp eax, 0xffffffff
mov dword [esi + 0xd4], eax
jne 0x41899d
push 0
push 0
push str.modbus_TCP_Connection_Failed
call fcn.0045501c
jmp 0x41899d
push 0
push 0
push str.Invalid_IP_Address
call fcn.0045501c
jmp 0x41899d
mov eax, dword [esi + 0x130]
test eax, eax
mov ecx, esi
je 0x418980
call fcn.00416b50
jmp 0x41899d
call fcn.00416020
cmp eax, 0xffffffff
mov dword [esi + 0xd4], eax
je 0x41899d
mov edx, dword [esi + 0x1c]
push 0
push ebx
push edx
push eax
call sub.modbusm.dll__HookRspNotification_16
lea ecx, [esp + 0x14]
call fcn.0044ea70
lea ecx, [esp + 0x70]
call fcn.0044a1fe
lea ecx, [esp + 0x14]
mov byte [esp + 0x10c], 4
call fcn.0044ec59
lea ecx, [esp + 0x94]
mov byte [esp + 0x10c], 3
call fcn.00444acf
mov eax, dword [esp + 0x90]
add eax, 0xfffffff0
mov byte [esp + 0x10c], 2
mov dword [esp + 0x80], vtable.CFileException.0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418a08
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x70]
mov byte [esp + 0x10c], 1
call fcn.0044a29f
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x10c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418a3f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x114]
add eax, 0xfffffff0
mov dword [esp + 0x10c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418a6b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop ebp
mov ecx, dword [esp + 0x100]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x100
ret 4