Function at 0x40baf0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
mov eax, dword [0x458330]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 0x7b0], 0
push 0x797
push 0
lea eax, [ebp - 0x7af]
push eax
call fcn.00435470
add esp, 0xc
mov byte [ebp - 0x14], 0
xor ecx, ecx
mov dword [ebp - 0x13], ecx
mov dword [ebp - 0xf], ecx
mov dword [ebp - 0xb], ecx
mov word [ebp - 7], cx
mov byte [ebp - 5], cl
mov byte [ebp - 0x83c], 0
xor edx, edx
mov dword [ebp - 0x83b], edx
mov dword [ebp - 0x837], edx
mov word [ebp - 0x833], dx
mov byte [ebp - 0x830], 0
push 0x7f
push 0
lea eax, [ebp - 0x82f]
push eax
call fcn.00435470
add esp, 0xc
push 0x798
push 8
lea ecx, [ebp - 0x7b0]
push ecx
call fcn.00405450
add esp, 0xc
push 0x10
push 0x10
lea ecx, [ebp - 0x14]
call fcn.00408ff0
push 0xa
mov edx, dword [ebp + 0x10]
add edx, 3
push edx
lea eax, [ebp - 0x83c]
push eax
call fcn.004360a0
add esp, 0xc
push 0xa
lea ecx, [ebp - 0x83c]
push ecx
lea edx, [ebp - 0x7ac]
push edx
call fcn.004360a0
add esp, 0xc
push 0xa
lea eax, [ebp - 0x83c]
push eax
lea ecx, [ebp - 0x11]
push ecx
call fcn.004360a0
add esp, 0xc
mov edx, dword [ebp + 0x10]
mov ax, word [edx + 0xe]
mov word [ebp - 6], ax
mov ecx, dword [ebp + 0x10]
mov dx, word [ecx + 0xe]
mov word [ebp - 0x7a2], dx
lea eax, [ebp - 0x83c]
push eax
push str.SELECT_AccountID_FROM_warehouse_WHERE_AccountID_s
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
push ecx
call fcn.00407950
add esp, 0xc
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407bb0
movsx edx, ax
cmp edx, 0x64
je 0x40bc29
cmp dword [ebp - 0x18], 0
jne 0x40bc8b
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
lea eax, [ebp - 0x83c]
push eax
push str.INSERT_INTO_warehouse__AccountID__Money__EndUseDate__DbVersion__VALUES___s_0__getdate____3_
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
push ecx
call fcn.00407950
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407bb0
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
movzx edx, byte [ebp - 0x13]
push edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00406820
jmp 0x40bd90
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
lea edx, [ebp - 0x83c]
push edx
push str.SELECT_Money__DbVersion__pw_FROM_warehouse_WHERE_AccountID_s
mov eax, dword [ebp + 8]
add eax, 0x7dc0
push eax
call fcn.00407950
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407bb0
push str.Money
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov dword [ebp - 0x7a0], eax
push str.DbVersion
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov byte [ebp - 0x1c], al
push 0x449bf0
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov word [ebp - 0x1a], ax
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
lea ecx, [ebp - 0x83c]
push ecx
push str.SELECT_Items_FROM_warehouse_WHERE_AccountID_s
lea edx, [ebp - 0x830]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x79c]
push eax
lea ecx, [ebp - 0x830]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407f00
test eax, eax
jg 0x40bd6a
push 0x780
push 0xffffffffffffffff
lea edx, [ebp - 0x79c]
push edx
call fcn.00435470
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
push 0x798
lea eax, [ebp - 0x7b0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00406820
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00435f91
mov esp, ebp
pop ebp
ret