Function at 0x401550
Capabilities:
Reference sql statements

Disassembly:
jmp 0x411620
push 0xffffffffffffffff
push 0x43bd60
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
xor ebx, ebx
lea ecx, [esp + 0x10]
mov dword [esp + 0x28], ebx
call sub.MFC42.DLL_CString::CString
mov al, byte [esp + 0x48]
mov byte [esp + 0x28], 1
cmp al, bl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
je 0x411691
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
push eax
push ecx
push ebx
push 1
lea eax, [esp + 0x28]
push edx
push eax
call fcn.00401771
add esp, 0x18
test al, al
je 0x4116b8
jmp 0x41184e
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x34]
push ecx
push edx
push ebx
push 2
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.00401771
add esp, 0x18
test al, al
jne 0x41184e
mov ax, word [esp + 0x40]
cmp ax, bx
jg 0x4116db
push str.Energia
lea edx, [esp + 0x14]
push 0x44765c
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x4116f6
movsx eax, ax
push eax
push str.Energia
lea ecx, [esp + 0x18]
push str._s_d
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov ebp, dword [esp + 0x38]
cmp ebp, ebx
je 0x4117b3
mov ecx, dword [esp + 0x3c]
cmp ecx, ebx
je 0x4117b3
mov al, byte [esp + 0x4c]
mov edi, str._DESC
cmp al, bl
jne 0x411720
mov edi, 0x44e400
lea edx, [esp + 0x48]
push 0x449134
push edx
call sub.MFC42.DLL_COleDateTime::Format
mov esi, eax
lea eax, [esp + 0x4c]
push 0x449134
push eax
mov ecx, ebp
mov byte [esp + 0x30], 2
call sub.MFC42.DLL_COleDateTime::Format
mov ecx, dword [esi]
mov edx, dword [eax]
mov eax, dword [esp + 0x10]
push edi
push ecx
push edx
push eax
lea ecx, [esp + 0x24]
push str.SELECT__FROM__s_WHERE_DataHora_BETWEEN__s_AND__s_ORDER_BY_DataHora_s
push ecx
mov byte [esp + 0x40], 3
call sub.MFC42.DLL_CString::Format
add esp, 0x18
lea ecx, [esp + 0x4c]
mov byte [esp + 0x28], 2
call fcn.0043641e
lea ecx, [esp + 0x48]
mov byte [esp + 0x28], 1
call fcn.0043641e
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.004017d5
add esp, 0xc
cmp al, bl
jne 0x411844
jmp 0x411803
mov al, byte [esp + 0x4c]
cmp al, bl
mov eax, str._DESC
jne 0x4117c5
mov eax, 0x44e400
push eax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push str.SELECT__FROM__s_ORDER_BY_DataHora_s
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x50], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.004017d5
add esp, 0xc
cmp al, bl
jne 0x411844
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
mov dword [edx], eax
mov byte [esp + 0x28], bl
call fcn.0043641e
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.0043641e
mov eax, esi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
mov dword [ecx], edx
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], bl
call fcn.0043641e
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.0043641e
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x1c
ret