Function at 0x409020
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3834
call fcn.00437750
mov eax, dword [0x458330]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 0x3618], 0
push 0x270f
push 0
lea eax, [ebp - 0x3617]
push eax
call fcn.00435470
add esp, 0xc
mov byte [ebp - 0x3624], 0
xor ecx, ecx
mov dword [ebp - 0x3623], ecx
mov dword [ebp - 0x361f], ecx
mov word [ebp - 0x361b], cx
mov byte [ebp - 0xf08], 0
push 0x36
push 0
lea edx, [ebp - 0xf07]
push edx
call fcn.00435470
add esp, 0xc
mov dword [ebp - 0xecc], 0
mov dword [ebp - 0x362c], 0x1c
lea eax, [ebp - 0x3618]
mov dword [ebp - 0x3628], eax
lea ecx, [ebp - 0x35fc]
mov dword [ebp - 0xed0], ecx
push 0xa
mov edx, dword [ebp + 0x10]
add edx, 3
push edx
lea eax, [ebp - 0x3624]
push eax
call fcn.004360a0
add esp, 0xc
mov ecx, dword [ebp - 0x3628]
mov edx, dword [ebp + 0x10]
mov ax, word [edx + 0xe]
mov word [ecx + 4], ax
lea ecx, [ebp - 0x3624]
push ecx
mov edx, dword [ebp - 0x3628]
add edx, 0xd
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x3624]
push eax
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
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
movsx edx, ax
cmp edx, 0x64
jne 0x409164
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
lea eax, [ebp - 0x3624]
push eax
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
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
lea edx, [ebp - 0x3624]
push edx
push str.SELECT__FROM_AccountCharacter_WHERE_Id_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.MoveCnt
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov ecx, dword [ebp - 0x3628]
mov byte [ecx + 0x18], al
push str.ExpandedWarehouse
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov edx, dword [ebp - 0x3628]
mov byte [edx + 0x19], al
lea eax, [ebp - 0xf08]
push eax
push str.GameID1
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407ca0
lea ecx, [ebp - 0xefd]
push ecx
push str.GameID2
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407ca0
lea edx, [ebp - 0xef2]
push edx
push str.GameID3
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407ca0
lea eax, [ebp - 0xee7]
push eax
push str.GameID4
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407ca0
lea ecx, [ebp - 0xedc]
push ecx
push str.GameID5
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407ca0
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
mov dword [ebp - 0x3630], 0
jmp 0x409280
mov edx, dword [ebp - 0x3630]
add edx, 1
mov dword [ebp - 0x3630], edx
cmp dword [ebp - 0x3630], 5
jge 0x409698
mov eax, dword [ebp - 0x3630]
imul eax, eax, 0xb
movsx ecx, byte [ebp + eax - 0xf08]
test ecx, ecx
je 0x409693
mov edx, dword [ebp - 0x3630]
imul edx, edx, 0xb
lea eax, [ebp + edx - 0xf08]
push eax
call fcn.00436510
add esp, 4
cmp eax, 4
jb 0x409693
mov ecx, dword [ebp - 0x3630]
imul ecx, ecx, 0xb
lea edx, [ebp + ecx - 0xf08]
push edx
push str.SELECT_cLevel__Class__CtlCode__DbVersion_FROM_vCharacterPreview_WHERE_Name_s
mov eax, dword [ebp + 8]
add eax, 0x7dc0
push eax
call fcn.00407950
add esp, 0xc
cmp eax, 1
jne 0x409685
mov ecx, dword [ebp - 0x362c]
lea edx, [ebp + ecx - 0x3618]
mov dword [ebp - 0xed0], edx
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407bb0
push str.cLevel
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov ecx, dword [ebp - 0xed0]
mov word [ecx + 0xc], ax
push str.Class
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov edx, dword [ebp - 0xed0]
mov byte [edx + 0xe], al
mov eax, dword [ebp - 0xed0]
movzx ecx, word [eax + 0xc]
cmp ecx, 0xdc
jl 0x40937c
mov edx, dword [ebp - 0x3628]
movzx eax, byte [edx + 0xc]
test eax, eax
jne 0x40937c
mov ecx, dword [ebp - 0x3628]
mov byte [ecx + 0xc], 1
mov edx, dword [ebp - 0xed0]
movzx eax, word [edx + 0xc]
cmp eax, 0xfa
jl 0x4093b4
mov ecx, dword [ebp - 0x3628]
movzx edx, byte [ecx + 0xc]
test edx, edx
je 0x4093aa
mov eax, dword [ebp - 0x3628]
movzx ecx, byte [eax + 0xc]
cmp ecx, 1
jne 0x4093b4
mov edx, dword [ebp - 0x3628]
mov byte [edx + 0xc], 2
push str.CtlCode
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov ecx, dword [ebp - 0xed0]
mov byte [ecx + 0xf], al
push str.DbVersion
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov edx, dword [ebp - 0xed0]
mov byte [edx + 0x40], al
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
mov eax, dword [ebp - 0x3630]
imul eax, eax, 0xb
lea ecx, [ebp + eax - 0xf08]
push ecx
push str.SELECT_Inventory_FROM_Character_WHERE_Name_s
lea edx, [ebp - 0x3830]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0xec8]
push eax
lea ecx, [ebp - 0x3830]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407f00
cmp eax, 0x30
jae 0x409457
push 0xec0
push 0xffffffffffffffff
lea edx, [ebp - 0xec8]
push edx
call fcn.00435470
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
mov eax, dword [ebp - 0xed0]
movzx ecx, byte [eax + 0x40]
cmp ecx, 3
jl 0x4095d3
push 0x30
push 0xffffffffffffffff
mov edx, dword [ebp - 0xed0]
add edx, 0x10
push edx
call fcn.00435470
add esp, 0xc
mov dword [ebp - 0x3834], 0
jmp 0x4094a9
mov eax, dword [ebp - 0x3834]
add eax, 1
mov dword [ebp - 0x3834], eax
cmp dword [ebp - 0x3834], 0xc
jge 0x4095d3
mov ecx, dword [ebp - 0x3834]
shl ecx, 4
movzx edx, byte [ebp + ecx - 0xec8]
cmp edx, 0xff
jne 0x40954e
mov eax, dword [ebp - 0x3834]
shl eax, 4
movzx ecx, byte [ebp + eax - 0xec1]
and ecx, 0x80
je 0x40954e
mov edx, dword [ebp - 0x3834]
shl edx, 4
movzx eax, byte [ebp + edx - 0xebe]
and eax, 0xf0
cmp eax, 0xf0
jne 0x40954e
mov ecx, dword [ebp - 0x3834]
mov edx, dword [ebp - 0xed0]
mov byte [edx + ecx*4 + 0x10], 0xff
mov eax, dword [ebp - 0x3834]
mov ecx, dword [ebp - 0xed0]
mov byte [ecx + eax*4 + 0x11], 0xff
mov edx, dword [ebp - 0x3834]
mov eax, dword [ebp - 0xed0]
mov byte [eax + edx*4 + 0x12], 0xff
mov ecx, dword [ebp - 0x3834]
mov edx, dword [ebp - 0xed0]
mov byte [edx + ecx*4 + 0x13], 0xff
jmp 0x4095ce
mov eax, dword [ebp - 0x3834]
shl eax, 4
mov ecx, dword [ebp - 0x3834]
mov edx, dword [ebp - 0xed0]
mov al, byte [ebp + eax - 0xec8]
mov byte [edx + ecx*4 + 0x10], al
mov ecx, dword [ebp - 0x3834]
shl ecx, 4
mov edx, dword [ebp - 0x3834]
mov eax, dword [ebp - 0xed0]
mov cl, byte [ebp + ecx - 0xec7]
mov byte [eax + edx*4 + 0x11], cl
mov edx, dword [ebp - 0x3834]
shl edx, 4
mov eax, dword [ebp - 0x3834]
mov ecx, dword [ebp - 0xed0]
mov dl, byte [ebp + edx - 0xec1]
mov byte [ecx + eax*4 + 0x12], dl
mov eax, dword [ebp - 0x3834]
shl eax, 4
mov ecx, dword [ebp - 0x3834]
mov edx, dword [ebp - 0xed0]
mov al, byte [ebp + eax - 0xebf]
mov byte [edx + ecx*4 + 0x13], al
jmp 0x40949a
mov ecx, dword [ebp - 0x3630]
imul ecx, ecx, 0xb
lea edx, [ebp + ecx - 0xf08]
push edx
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_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
movsx ecx, ax
cmp ecx, 0x64
je 0x40962e
push str.G_Status
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov edx, dword [ebp - 0xed0]
mov byte [edx + 0x41], al
jmp 0x409638
mov eax, dword [ebp - 0xed0]
mov byte [eax + 0x41], 0xff
mov ecx, dword [ebp - 0xed0]
mov dl, byte [ebp - 0x3630]
mov byte [ecx], dl
mov eax, dword [ebp - 0x3630]
imul eax, eax, 0xb
lea ecx, [ebp + eax - 0xf08]
push ecx
mov edx, dword [ebp - 0xed0]
add edx, 1
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0xecc]
add eax, 1
mov dword [ebp - 0xecc], eax
mov ecx, dword [ebp - 0x362c]
add ecx, 0x42
mov dword [ebp - 0x362c], ecx
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
jmp 0x409271
mov edx, dword [ebp - 0xecc]
imul edx, edx, 0x42
add edx, 0x1c
push edx
push 0x91
mov eax, dword [ebp - 0x3628]
push eax
call fcn.00405450
add esp, 0xc
mov ecx, dword [ebp - 0x3628]
mov dl, byte [ebp - 0xecc]
mov byte [ecx + 6], dl
mov eax, dword [ebp - 0xecc]
imul eax, eax, 0x42
add eax, 0x1c
push eax
lea ecx, [ebp - 0x3618]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp + 8]
call fcn.00406820
lea eax, [ebp - 0x3624]
push eax
mov ecx, dword [ebp + 0x10]
movsx edx, word [ecx + 0xe]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00434870
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00435f91
mov esp, ebp
pop ebp
ret