Function at 0x414a70
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7b4
mov eax, dword [0x41d018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
movzx eax, word [edi + 4]
mov ecx, dword [edi + 6]
mov edx, dword [edi + 0xa]
lea esi, [edi + 6]
mov word [ebp - 0x79a], ax
movzx eax, word [esi + 8]
mov dword [ebp - 0x798], ecx
mov cl, byte [esi + 0xa]
mov word [ebp - 0x790], ax
mov eax, dword [edi + 0x14]
mov byte [ebp - 0x78e], cl
mov dword [ebp - 0x7a0], 0x59c07c2
mov byte [ebp - 0x79c], 0
mov dword [ebp - 0x794], edx
mov ecx, 0x41ee38
test eax, eax
jne 0x414c39
push esi
push str.SELECT_AccountID_FROM_warehouse_WHERE_AccountID_s
call fcn.00412310
add esp, 8
test al, al
je 0x414bcf
mov edx, dword [0x41ee44]
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x414bcf
mov eax, dword [0x41ee44]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push eax
call edi
mov ecx, dword [0x41ee44]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push ecx
call ebx
push esi
push str.SELECT_Items_Money_pw_FROM_warehouse_WHERE_AccountID_s
mov ecx, 0x41ee38
call fcn.00412310
add esp, 8
test al, al
je 0x414b98
mov edx, dword [0x41ee44]
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x414b98
mov ecx, 0x780
lea edx, [ebp - 0x78d]
mov eax, str.Items
call fcn.004125c0
mov eax, str.Money
call fcn.00412520
mov dword [ebp - 0xc], eax
mov eax, 0x41a4bc
call fcn.00412520
mov word [ebp - 8], ax
call fcn.004124b0
lea eax, [ebp - 0x7a0]
mov ebx, 0x79c
jmp 0x414e32
mov eax, dword [0x41ee44]
push eax
call edi
mov ecx, dword [0x41ee44]
push 2
push ecx
call ebx
push 0x780
lea edx, [ebp - 0x78d]
push 0xff
push edx
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
mov word [ebp - 8], ax
jmp 0x414d53
mov ecx, dword [0x41ee44]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push ecx
call ebx
mov edx, dword [0x41ee44]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push esi
push str.INSERT_INTO_warehouse__AccountID_Money_EndUseDate_DbVersion__VALUES___s_0_getdate___3_
mov ecx, 0x41ee38
call fcn.00412310
mov eax, dword [0x41ee44]
add esp, 8
push eax
call ebx
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push esi
push 0x780
push 0x780
push str.UPDATE_warehouse_SET_ItemsCONVERT_varbinary__d__REPLICATE_char_0xFF___d___WHERE_AccountID_s
mov ecx, 0x41ee38
call fcn.00412310
add esp, 0x10
jmp 0x414dd6
push eax
push esi
push str.SELECT_AccountID_FROM_ExtWarehouse_WHERE_AccountID_s_AND_Number_d
call fcn.00412310
add esp, 0xc
test al, al
je 0x414d6a
mov edx, dword [0x41ee44]
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x414d6a
mov eax, dword [0x41ee44]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push eax
call ebx
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov edx, dword [edi + 0x14]
push edx
push esi
push str.SELECT_Items_Money_FROM_ExtWarehouse_WHERE_AccountID_s_AND_Number_d
mov ecx, 0x41ee38
call fcn.00412310
add esp, 0xc
test al, al
je 0x414d23
mov eax, dword [0x41ee44]
mov edi, dword [sym.imp.ODBC32.dll_SQLFetch]
push eax
call edi
cmp ax, 0x64
je 0x414d23
mov ecx, 0x780
lea edx, [ebp - 0x78d]
mov eax, str.Items
call fcn.004125c0
mov eax, str.Money
call fcn.00412520
mov dword [ebp - 0xc], eax
call fcn.004124b0
push esi
push str.SELECT_pw_FROM_warehouse_WHERE_AccountID_s
mov ecx, 0x41ee38
call fcn.00412310
add esp, 8
test al, al
je 0x414d08
mov ecx, dword [0x41ee44]
push ecx
call edi
cmp ax, 0x64
jne 0x414b75
call fcn.004124b0
xor edx, edx
mov word [ebp - 8], dx
lea eax, [ebp - 0x7a0]
mov ebx, 0x79c
jmp 0x414e32
mov eax, dword [0x41ee44]
push eax
call ebx
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x780
lea edx, [ebp - 0x78d]
push 0xff
push edx
call sub.MSVCR100.dll_memset
add esp, 0xc
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x7a0]
mov ebx, 0x79c
jmp 0x414e32
mov edx, dword [0x41ee44]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push edx
call ebx
mov eax, dword [0x41ee44]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ecx, dword [edi + 0x14]
push ecx
push esi
push str.INSERT_INTO_ExtWarehouse__AccountID_Money_Number__VALUES___s_0__d_
mov ecx, 0x41ee38
call fcn.00412310
mov edx, dword [0x41ee44]
add esp, 0xc
push edx
call ebx
mov eax, dword [0x41ee44]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ecx, dword [edi + 0x14]
push ecx
push esi
push 0x780
push 0x780
push str.UPDATE_ExtWarehouse_SET_ItemsCONVERT_varbinary__d__REPLICATE_char_0xFF___d___WHERE_AccountID_s_AND_Number_d
mov ecx, 0x41ee38
call fcn.00412310
add esp, 0x14
mov edx, dword [0x41ee44]
push edx
call ebx
mov eax, dword [0x41ee44]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
movzx ecx, word [edi + 4]
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov word [ebp - 0x7b0], cx
movzx ecx, word [esi + 8]
mov dword [ebp - 0x7ae], edx
mov dl, byte [esi + 0xa]
mov dword [ebp - 0x7aa], eax
lea eax, [ebp - 0x7b4]
mov word [ebp - 0x7a6], cx
mov dword [ebp - 0x7b4], 0x10512c1
mov byte [ebp - 0x7a4], dl
mov ebx, 0x12
mov ecx, dword [ebp + 8]
push eax
push ecx
call fcn.00413de0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415636
mov esp, ebp
pop ebp
ret 4