Function at 0x4069d0
Capabilities:
Hide graphical window
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, 0x754
mov eax, dword [0x44000c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
push esi
push edi
mov dword [ebp - 0x734], eax
jmp 0x406a13
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x416120
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov edi, dword [ebp - 0x734]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x5d3990
push 0x67
push edi
mov dword [0x5d39f4], eax
call esi
push 0x64
push 0x5d3928
push 0x6d
push edi
call esi
mov esi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x82
push edi
mov dword [ebp - 0x40], 0x30
mov dword [ebp - 0x3c], 3
mov dword [ebp - 0x38], 0x406f60
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 0x82
push dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 6
mov dword [ebp - 0x1c], 0x6d
mov dword [ebp - 0x18], 0x5d3928
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 0x5d3990
push 0x5d3928
push 0
mov dword [0x5d398c], edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x5d3924], eax
test eax, eax
je 0x406f3a
push dword [ebx + 0x14]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x5d3924]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..DataServer.ini
push 0x20
push 0x5d3904
push 0x4379a2
push str.CustomerName
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x24
push 0x5d38e0
push 0x4379a2
push str.CustomerHardwareId
push str.DataServerInfo
call esi
push 0
push 0x437800
push 0x437808
lea eax, [ebp - 0x180]
push str.__s__s___QueueSize_:__d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x180]
push eax
push dword [0x5d3924]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push dword [0x5d3924]
mov ecx, 0x5d1d88
call fcn.00417580
lea eax, [ebp - 0x730]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x406e6c
push str..DataServer.ini
push 0x20
lea eax, [ebp - 0x30]
xorps xmm0, xmm0
push eax
push 0x4379a2
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 0x4379a2
push str.DataServerUSER
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
lea eax, [ebp - 0x60]
push eax
push 0x4379a2
push str.DataServerPASS
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
push 0x440a54
push str.BankEx
push str.BankExTable
push str.Config
call esi
push str..DataServer.ini
push 0x20
push 0x440a74
push str.Credits
push str.BankExColumn
push str.Config
call esi
push str..DataServer.ini
push 0x20
push 0x440a94
push str.AccountID
push str.BankExAccount
push str.Config
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.WriteLogs
movzx eax, ax
push str.Config
mov dword [ebp - 0x734], eax
call esi
push str..Query.txt
push 0x400
mov esi, eax
lea eax, [ebp - 0x580]
push eax
push 0x4379a2
push str.RankingsQuery1
push str.Query
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x580]
mov dword [ebp - 0x5a0], 0
push eax
lea ecx, [ebp - 0x5a0]
mov dword [ebp - 0x590], 0
mov dword [ebp - 0x58c], 0xf
call fcn.00401f70
mov ecx, dword [0x5d3a18]
cmp ecx, 0x10
jb 0x406d47
mov eax, dword [0x5d3a04]
inc ecx
cmp ecx, 0x1000
jb 0x406d3d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406f4f
mov eax, edx
push ecx
push eax
call fcn.00419a5a
add esp, 8
movaps xmm1, xmmword [ebp - 0x5a0]
mov ecx, 0x5d3a04
cmp dword [ebp - 0x58c], 0x10
movq xmm0, qword [ebp - 0x590]
movd eax, xmm1
movups xmmword [0x5d3a04], xmm1
cmovae ecx, eax
movq qword [0x5d3a14], xmm0
push ecx
push 1
call fcn.00419050
add esp, 8
lea eax, [ebp - 0x60]
mov ecx, 0x440e30
push esi
push eax
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004164b0
test al, al
jne 0x406db2
push str.Could_not_connect_to_database
push 1
call fcn.00419050
add esp, 8
jmp 0x406e82
push dword [ebp - 0x734]
mov ecx, 0x5d2800
call fcn.00417c90
test al, al
jne 0x406e16
mov eax, dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeHandle]
test eax, eax
je 0x406de4
push eax
push 3
call esi
mov dword [0x440e3c], 0
mov eax, dword [0x440e38]
test eax, eax
je 0x406dfc
push eax
push 2
call esi
mov dword [0x440e38], 0
mov eax, dword [0x440e34]
test eax, eax
je 0x406e82
push eax
push 1
call esi
mov dword [0x440e34], 0
jmp 0x406e82
push ecx
call fcn.004016a0
push ecx
call fcn.00402130
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x3e8
push 0x64
push dword [0x5d3924]
call esi
call fcn.004137c0
push str.UPDATE_MEMB_STAT_SET_ConnectStat__0
push 0x440e30
call fcn.00416550
add esp, 8
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x406e88
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.00419050
add esp, 0xc
mov esi, dword [sym.imp.USER32.dll_SetTimer]
call fcn.00417910
push 0
push 0x7d0
push 0x65
push dword [0x5d3924]
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 - 0x734], eax
lea eax, [ebp - 0x750]
push 0
push eax
call esi
test eax, eax
je 0x406f16
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
nop dword [eax]
lea eax, [ebp - 0x750]
push eax
push dword [ebp - 0x734]
push dword [ebp - 0x750]
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x406f03
lea eax, [ebp - 0x750]
push eax
call edi
lea eax, [ebp - 0x750]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea eax, [ebp - 0x750]
push eax
call esi
test eax, eax
jne 0x406ed0
push dword [0x5d39f4]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x406f34
mov eax, dword [ebp - 0x748]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004197fb
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
call fcn.0041ce2c
int3