Function at 0x406c70
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, 0x334
mov eax, dword [0x422008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
push esi
push edi
mov dword [ebp - 0x314], eax
jmp 0x406cb3
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x414ab0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov edi, dword [ebp - 0x314]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x4ec648
push 0x67
push edi
mov dword [0x4ec644], eax
call esi
push 0x64
push 0x4ec5e0
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], 0x4070e0
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], 0x4ec5e0
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 SQLBindCol
push 0xcf0000
push 0x4ec648
push 0x4ec5e0
push 0
mov dword [0x4ec5dc], edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x4ec5d8], eax
test eax, eax
je 0x4070ca
push dword [ebx + 0x14]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x4ec5d8]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..DataServer.ini
push 0x20
push 0x4ec5b8
push 0x41bb6e
push str.CustomerName
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x24
push 0x4ec594
push 0x41bb6e
push str.CustomerHardwareId
push str.DataServerInfo
call esi
push 0
push 0x41b9e8
push 0x41b9f8
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 [0x4ec5d8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push dword [0x4ec5d8]
mov ecx, 0x4eb360
call fcn.00415900
lea eax, [ebp - 0x310]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x406ffa
push str..DataServer.ini
push 0x20
lea eax, [ebp - 0x30]
xorps xmm0, xmm0
push eax
push 0x41bb6e
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 0x41bb6e
push str.DataServerUSER
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
lea eax, [ebp - 0x60]
push eax
push 0x41bb6e
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 esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..DataServer.ini
push 0x20
push 0x42203c
push str.CustomJewelBank
push str.JewelsBankTable
push str.JewelsBank
mov dword [0x4ec590], eax
call esi
push str..DataServer.ini
push 0x20
push 0x42207c
push str.AccountID
push str.JewelsBankAccount
push str.JewelsBank
call esi
lea eax, [ebp - 0x60]
mov ecx, 0x422408
push eax
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00414e20
test al, al
jne 0x406f6c
push str.Could_not_connect_to_database
push 1
call fcn.004170d0
add esp, 8
jmp 0x407010
push dword [ebp - 0x314]
mov ecx, 0x4ebd30
call fcn.00415e60
test al, al
jne 0x406fd0
mov eax, dword [0x422414]
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeHandle]
test eax, eax
je 0x406f9e
push eax
push 3
call esi
mov dword [0x422414], 0
mov eax, dword [0x422410]
test eax, eax
je 0x406fb6
push eax
push 2
call esi
mov dword [0x422410], 0
mov eax, dword [0x42240c]
test eax, eax
je 0x407010
push eax
push 1
call esi
mov dword [0x42240c], 0
jmp 0x407010
push ecx
call fcn.00401620
push ecx
call fcn.004020c0
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x3e8
push 0x64
push dword [0x4ec5d8]
call esi
call fcn.00412d30
jmp 0x407016
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.004170d0
add esp, 0xc
mov esi, dword [sym.imp.USER32.dll_SetTimer]
call fcn.00415a50
call fcn.00415ba0
push 0
push 0x7d0
push 0x65
push dword [0x4ec5d8]
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 0x4070a6
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
nop
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 0x407093
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 0x407060
push dword [0x4ec644]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x4070c4
mov eax, dword [ebp - 0x328]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00417e1d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10