Function at 0x40c560
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
mov eax, dword [0x454350]
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.00433530
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.00433530
add esp, 0xc
push 0x798
push 8
lea ecx, [ebp - 0x7b0]
push ecx
call fcn.00406330
add esp, 0xc
push 0x10
push 0x10
lea ecx, [ebp - 0x14]
call fcn.00409d80
push 0xa
mov edx, dword [ebp + 0x10]
add edx, 3
push edx
lea eax, [ebp - 0x83c]
push eax
call fcn.00434160
add esp, 0xc
push 0xa
lea ecx, [ebp - 0x83c]
push ecx
lea edx, [ebp - 0x7ac]
push edx
call fcn.00434160
add esp, 0xc
push 0xa
lea eax, [ebp - 0x83c]
push eax
lea ecx, [ebp - 0x11]
push ecx
call fcn.00434160
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, 0x7d80
push ecx
call fcn.00408880
add esp, 0xc
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408ad0
movsx edx, ax
cmp edx, 0x64
je 0x40c699
cmp dword [ebp - 0x18], 0
jne 0x40c6fb
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408a80
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, 0x7d80
push ecx
call fcn.00408880
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408ad0
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408a80
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.00407670
jmp 0x40c800
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408a80
lea edx, [ebp - 0x83c]
push edx
push str.SELECT_Money__DbVersion__pw_FROM_warehouse_WHERE_AccountID_s
mov eax, dword [ebp + 8]
add eax, 0x7d80
push eax
call fcn.00408880
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408ad0
push str.Money
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408c10
mov dword [ebp - 0x7a0], eax
push str.DbVersion
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408c10
mov byte [ebp - 0x1c], al
push 0x447b7c
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408c10
mov word [ebp - 0x1a], ax
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408a80
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, 0x7d80
call fcn.00408e20
test eax, eax
jg 0x40c7da
push 0x780
push 0xffffffffffffffff
lea edx, [ebp - 0x79c]
push edx
call fcn.00433530
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7d80
call fcn.00408a80
push 0x798
lea eax, [ebp - 0x7b0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00407670
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00434051
mov esp, ebp
pop ebp
ret