Function at 0x40d6f0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x552f01
mov eax, dword fs:[0]
push eax
sub esp, 0x78
push ebx
push esi
push edi
mov eax, dword [0x5ba318]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
call fcn.00440353
xor ebx, ebx
lea ecx, [esi + 0x17c]
mov dword [ebp - 4], ebx
mov dword [esi], vtable.CMainFrame.0
call fcn.00451ea6
lea ecx, [esi + 0x238]
mov byte [ebp - 4], 1
call fcn.0044d80b
lea ecx, [esi + 0x314]
mov byte [ebp - 4], 2
call fcn.0044d80b
mov byte [ebp - 4], 3
call fcn.0043cc81
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d774
push 0x80004005
call fcn.004013d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x41c], eax
mov byte [ebp - 4], 4
call fcn.0043cc81
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d7a4
push 0x80004005
call fcn.004013d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x420], eax
mov byte [ebp - 4], 5
call fcn.0043cc81
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d7d4
push 0x80004005
call fcn.004013d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x424], eax
mov byte [ebp - 4], 6
call fcn.0043cc81
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d804
push 0x80004005
call fcn.004013d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x428], eax
mov byte [ebp - 4], 7
call fcn.0043cc81
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d834
push 0x80004005
call fcn.004013d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x430], eax
lea ecx, [esi + 0x5e8]
mov byte [ebp - 4], 8
call fcn.00448edf
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
mov dword [esi + 0x604], ebx
mov dword [esi + 0x608], ebx
call fcn.0044a9a7
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xa
call fcn.0043c264
mov dword [ebp - 0x28], vtable.CFileException.0
call fcn.0043cc81
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40d89a
push 0x80004005
call fcn.004013d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], 0xffffffff
call fcn.00401580
mov byte [ebp - 4], 0xc
call fcn.0043cba2
mov eax, dword [eax + 4]
mov dword [eax + 0xb8], esi
lea ecx, [esi + 0x17c]
mov dword [eax + 0xbc], ecx
mov eax, 1
xor ecx, ecx
mov edx, 0x1f6
push 0xfa
mov dword [esi + 0x114], 0xffffffff
mov dword [esi + 0x3f0], ebx
mov dword [esi + 0x5fc], ebx
mov word [esi + 0x418], cx
mov dword [esi + 0x42c], eax
mov dword [esi + 0x170], ebx
mov dword [esi + 0x174], ebx
mov dword [esi + 0x178], ebx
mov word [esi + 0x434], dx
mov dword [esi + 0x600], ebx
mov dword [esi + 0x16c], eax
mov dword [esi + 0x410], 0x7d0
mov dword [esi + 0x414], 0xfa
call sub.modbusm.dll__SetPollDelay_4
mov dword [esi + 0x438], ebx
mov dword [esi + 0x3f4], 0x4b00
mov byte [esi + 0x3f8], bl
mov word [esi + 0x3f9], 0x800
mov dword [esi + 0x3fc], ebx
mov dword [esi + 0x400], ebx
mov dword [esi + 0x404], ebx
mov dword [esi + 0x408], ebx
mov byte [esi + 0x40c], bl
mov dword [esi + 0x118], 0xfffffff3
mov dword [esi + 0x11c], ebx
mov dword [esi + 0x120], ebx
mov dword [esi + 0x124], ebx
mov dword [esi + 0x128], 0x190
mov dword [esi + 0x12c], ebx
mov dword [esi + 0x130], 0x31010201
mov eax, dword [str.Courier]
mov dword [esi + 0x134], eax
mov ecx, dword [0x56734c]
push 4
mov dword [esi + 0x138], ecx
push str.1.08
lea ecx, [esi + 0x424]
mov dword [esi + 0x154], ebx
mov dword [esi + 0x158], 0xc0c0c0
mov dword [esi + 0x15c], 0xff
mov dword [esi + 0x160], ebx
mov dword [esi + 0x164], ebx
mov dword [esi + 0x168], 2
call fcn.004016b0
push 4
push str.1.09
lea ecx, [esi + 0x428]
call fcn.004016b0
call fcn.0043cba2
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x68]
cmp eax, ebx
jne 0x40da3c
xor edi, edi
jmp 0x40da4a
mov edi, eax
lea edx, [edi + 1]
mov cl, byte [edi]
inc edi
cmp cl, bl
jne 0x40da41
sub edi, edx
push edi
push eax
lea ecx, [esi + 0x41c]
call fcn.004016b0
mov eax, dword [esi + 0x41c]
push 0x5c
push eax
call fcn.0053a66f
add esp, 8
cmp eax, ebx
jne 0x40da71
or eax, 0xffffffff
jmp 0x40da77
sub eax, dword [esi + 0x41c]
inc eax
push eax
lea edx, [ebp - 0x10]
push edx
lea ecx, [esi + 0x41c]
call fcn.0040c5e0
push eax
lea ecx, [esi + 0x420]
mov byte [ebp - 4], 0xd
call fcn.00403590
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dabb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0xb
push str.ms32frm.cfg
lea ecx, [esi + 0x420]
call fcn.004082a0
mov edi, dword [esi + 0x420]
lea ecx, [ebp - 0x28]
push ecx
push ebx
push edi
lea ecx, [ebp - 0x3c]
call fcn.0044afb0
test eax, eax
je 0x40db30
push ebx
push 0x1000
push 1
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp - 0x84]
call fcn.00449d6e
lea eax, [ebp - 0x84]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xe
call fcn.0040c770
lea ecx, [ebp - 0x84]
call fcn.00449bb6
lea ecx, [ebp - 0x3c]
call fcn.0044a942
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0xc
call fcn.00449d2c
lea edi, [esi + 0x44c]
push edi
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
cmp eax, ebx
je 0x40db57
xor ecx, ecx
mov word [edi], cx
mov dword [esi + 0x174], ebx
mov dword [esi + 0x178], ebx
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x28], vtable.CFileException.0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40db81
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0044ab99
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret