Function at 0x40be20
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45ba43
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCR71.dll_strlen
add esp, 4
cmp eax, 8
jae 0x40be56
xor eax, eax
jmp 0x40bfd9
lea ecx, [ebp - 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_3]
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 2
jne 0x40be92
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
push str.INSERT_INTO_tUserInOutLog__sUserID__sUserName__bSex__sCardInNum__sCardOutNum__sCardType__dtCardRegTime__sIDCode__sIDNo__sIDUnit__sNationCode__dtLogTime__sComputerIP__sComputerName__sComputerNo__sComputerMac__bAction__bHasSent___dtOfflineTime__iStatus__sAccount__bHasSent1__n_t_t_t_t_tSELECT_tUser.sUserID_sUserName__bSex__sCardInNum__sCardOutNum__sCardType__dtRegTime__sIDCode__sIDNo__sIDUnit__sNationCode__dtLoginTime__tComputer.sComputerIP__tComputer.sComputerName__tComputer.sComputerNo__tComputer.sComputerMac__0__0___GETDATE____2__sAccount__0_n_t_tFROM__tComputer_tUser_n_t_tWHERE_tComputer.sUserIDtUser.sUserID_n_t_t_tAND_tComputer.sUserID_.30s
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
add esp, 0xc
lea edx, [ebp - 0x10]
push edx
mov ecx, dword [ebp - 0x18]
call fcn.00402790
mov eax, dword [ebp + 0x10]
cmp dword [eax], 3
jne 0x40bef8
mov ecx, dword [ebp + 0xc]
add ecx, 0x30
push ecx
push str.IF_NOT_EXISTS__SELECT_sKey_FROM_tComputer_WHERE_sKey___.15s__n
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x50
push ecx
mov edx, dword [ebp + 0xc]
add edx, 0x70
push edx
mov eax, dword [ebp + 0xc]
add eax, 0x40
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x30
push ecx
mov edx, dword [ebp + 0xc]
add edx, 0x30
push edx
push str.INSERT_INTO_tComputer_sKey_sComputerIP__sComputerMac__sComputerNo__sComputerName_sUserID__dtActiveTime__bHasSent_bHasSent1_sAccount_lVlanId_sGroupName__n_t_t_t_t_t_t_tVALUES__.30s__.39s__.12s__s__.20s__.30s_getdate___0_0___d_
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MFC71.DLL_ATL::CStringT::AppendFormat]
add esp, 0x20
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.00402790
mov edx, dword [ebp + 0xc]
push edx
push str.IF_NOT_EXISTS__SELECT_sUserID_FROM_tUser_WHERE_sUserID___.30s__n
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
add esp, 0xc
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 0x40
push ecx
mov edx, dword [ebp + 0xc]
add edx, 0x70
push edx
mov eax, dword [ebp + 0xc]
add eax, 0x50
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x30
push ecx
mov edx, dword [ebp + 0xc]
add edx, 0x88
push edx
mov eax, dword [ebp + 0xc]
add eax, 0x84
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0xc0
push ecx
mov edx, dword [ebp + 0xc]
push edx
push str.INSERT_INTO_tUser_sUserID__sUserName_bSex__sIDCode__sIDNo__bUserStatus__dtLoginTime__sComputerIP__sComputerName__sComputerNo__sComputerMac__dtRegTime__lDeptID_bCurrentStatus__bHasSent_bHasSent1__n_t_t_t_t_t_t_tVALUES__.30s__.30s_0__.3s__.18s_1_GetDate____.15s__.30s__s__.12s_GETDATE____d_1_0_0_
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MFC71.DLL_ATL::CStringT::AppendFormat]
add esp, 0x2c
mov ecx, dword [ebp + 0xc]
push ecx
push str.__n_ELSE__n__UPDATE_tUser_SET_dtLoginTime__GETDATE___bHasSent_0_bHasSent10__WHERE_sUserID__.30s
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.MFC71.DLL_ATL::CStringT::AppendFormat]
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.00402790
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0xc]
add edx, 0x40
push edx
mov eax, dword [ebp + 0xc]
add eax, 0x70
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x50
push ecx
mov edx, dword [ebp + 0xc]
add edx, 0x30
push edx
push str.INSERT_INTO_tUserInOutLog__sUserID__sUserName__bSex__sCardInNum__sCardOutNum__sCardType__dtCardRegTime__sIDCode__sIDNo__sIDUnit__sNationCode__dtLogTime__sComputerIP__sComputerName__sComputerNo__sComputerMac__bAction__bHasSent___dtOfflineTime__iStatus__sAccount__bHasSent1__n_t_t_t_t__SELECT_sUserID_sUserName__bSex__sCardInNum__sCardOutNum__sCardType__dtRegTime__sIDCode__sIDNo__sIDUnit__sNationCode__dtLoginTime___.15s___.20s___.20s___.12s__0__0___GETDATE____1_____0_n_tFROM__tUser_n_tWHERE_sUserID_.30s
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
add esp, 0x1c
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.00402790
mov dword [ebp - 0x14], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc