Function at 0x406a50
Capabilities:
Initialize winsock library
Read .ini file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x446040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
push esi
push edi
mov dword [ebp - 0x314], eax
jmp 0x406a93
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x41a940
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov edi, dword [ebp - 0x314]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x511890
push 0x67
push edi
mov dword [0x51188c], eax
call esi
push 0x64
push 0x511828
push 0x6d
push edi
call esi
mov esi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x6b
push edi
mov dword [ebp - 0x40], 0x30
mov dword [ebp - 0x3c], 3
mov dword [ebp - 0x38], 0x406e90
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], edi
call esi
push 0x7f00
push 0
mov dword [ebp - 0x28], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0x6c
push dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 6
mov dword [ebp - 0x1c], 0x6d
mov dword [ebp - 0x18], 0x511828
call esi
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExA]
push 0
push edi
push 0
push 0
push 0x258
push 0x258
push 0
push closesocket
push 0xcf0000
push 0x511890
push 0x511828
push 0
mov dword [0x511824], edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x511820], eax
test eax, eax
je 0x406b95
push dword [ebx + 0x14]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x511820]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, 1
test eax, eax
je 0x406e7a
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..DataServer.ini
push 0x20
push 0x511800
push 0x43d40e
push str.CustomerName
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x24
push 0x5117dc
push 0x43d40e
push str.CustomerHardwareId
push str.DataServerInfo
call esi
push 0
push str.LOUIS_MS_EMULATOR
push 0x43d2d4
lea eax, [ebp - 0x180]
push str.__s___s_DataServer__QueueSize_:__d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x180]
push eax
push dword [0x511820]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push dword [0x511820]
mov ecx, 0x50fda8
call fcn.0041b830
lea eax, [ebp - 0x310]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x406da3
push str..DataServer.ini
push 0x20
lea eax, [ebp - 0x30]
xorps xmm0, xmm0
push eax
push 0x43d40e
push str.DataServerODBC
push str.DataServerInfo
movaps xmmword [ebp - 0x30], xmm0
movaps xmmword [ebp - 0x20], xmm0
movaps xmmword [ebp - 0x80], xmm0
movaps xmmword [ebp - 0x70], xmm0
movaps xmmword [ebp - 0x60], xmm0
movaps xmmword [ebp - 0x50], xmm0
call esi
push str..DataServer.ini
push 0x20
lea eax, [ebp - 0x80]
push eax
push 0x43d40e
push str.DataServerUSER
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
lea eax, [ebp - 0x60]
push eax
push 0x43d40e
push str.DataServerPASS
push str.DataServerInfo
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..DataServer.ini
push 0xda98
push str.DataServerPort
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0
push str.AdvancedLog
movzx eax, ax
push str.DataServerInfo
mov dword [ebp - 0x314], eax
call esi
mov dword [0x5117d8], eax
mov ecx, 0x446e50
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.0041ac80
test al, al
jne 0x406d15
push str.Could_not_connect_to_database
push 1
call fcn.0041d010
add esp, 8
jmp 0x406db9
push dword [ebp - 0x314]
mov ecx, 0x510778
call fcn.0041bda0
test al, al
jne 0x406d79
mov eax, dword [0x446e5c]
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeHandle]
test eax, eax
je 0x406d47
push eax
push 3
call esi
mov dword [0x446e5c], 0
mov eax, dword [0x446e58]
test eax, eax
je 0x406d5f
push eax
push 2
call esi
mov dword [0x446e58], 0
mov eax, dword [0x446e54]
test eax, eax
je 0x406db9
push eax
push 1
call esi
mov dword [0x446e54], 0
jmp 0x406db9
push ecx
call fcn.00401620
push ecx
call fcn.004020a0
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x3e8
push 0x64
push dword [0x511820]
call esi
call fcn.004189f0
jmp 0x406dbf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.0041d010
add esp, 0xc
mov esi, dword [sym.imp.USER32.dll_SetTimer]
call fcn.0041b980
call fcn.0041bae0
push 0
push 0x7d0
push 0x65
push dword [0x511820]
call esi
push 0x6d
push edi
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
mov dword [ebp - 0x314], eax
lea eax, [ebp - 0x330]
push 0
push eax
call esi
test eax, eax
je 0x406e56
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
nop dword [eax + eax]
lea eax, [ebp - 0x330]
push eax
push dword [ebp - 0x314]
push dword [ebp - 0x330]
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x406e43
lea eax, [ebp - 0x330]
push eax
call edi
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea eax, [ebp - 0x330]
push eax
call esi
test eax, eax
jne 0x406e10
push dword [0x51188c]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x406e74
mov eax, dword [ebp - 0x328]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0041dc7d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10