Function at 0x42cf90
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48795d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4a701c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
cmp esi, 0xffffffff
jne 0x42d16b
push ebx
push 0x4aaab4
push str.SELECT_guild_id_FROM___s__WHERE_char_id_d
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x10
cmp eax, esi
jne 0x42d081
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x42d01b
push 0x288
push str.D:_ragnarokbr_rathena_srccharint_guild.cpp
push str.at__s:_lu___self_is_NULL_n
call fcn.004427f0
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x42d056
mov byte [edx], 0
push dword [ecx]
push 0x288
push str.D:_ragnarokbr_rathena_srccharint_guild.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x288
push str.D:_ragnarokbr_rathena_srccharint_guild.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x42d130
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x42d130
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x42d11c
push dword [esi + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov dword [esi + 0x3e8], eax
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x42d10c
cmp dword [esi + 0x3e4], 0
je 0x42d10c
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x42d0fd
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x42d0fd
mov eax, dword [esi + 0x3e4]
mov eax, dword [eax]
push eax
call fcn.0046d2ec
add esp, 4
mov esi, eax
jmp 0x42d132
xor eax, eax
push eax
call fcn.0046d2ec
add esp, 4
mov esi, eax
jmp 0x42d132
mov eax, dword [ebp - 0x10]
push eax
call fcn.0046d2ec
add esp, 4
mov esi, eax
jmp 0x42d132
lea eax, [esi + 0x10]
mov dword [esi + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
xor esi, esi
mov edi, dword [0x4ad1b4]
test edi, edi
je 0x42d16b
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x42d16b
push eax
call dword [sym.imp.libmysql.dll_mysql_free_result]
mov dword [edi + 0x3e0], 0
mov dword [edi + 0x3e4], 0
mov dword [edi + 0x3e8], 0
test esi, esi
jne 0x42d183
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, esi
lea ecx, [ebp - 0x1c]
call fcn.0042afe0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x1c]
test edx, edx
jne 0x42d1ae
push esi
push ebx
push str.Character__ds_guild__d_not_found__n
call fcn.00442810
add esp, 0xc
xor edi, edi
jmp 0x42d203
movzx eax, word [edx + 0x2c70]
test ax, ax
jns 0x42d1c9
and eax, 0x7fff
mov word [edx + 0x2c70], ax
mov edx, dword [ebp - 0x1c]
movsx esi, word [edx + 8]
xor eax, eax
test esi, esi
jle 0x42d1e2
lea ecx, [edx + 0x5c]
cmp dword [ecx], ebx
je 0x42d1e2
inc eax
add ecx, 0x48
cmp eax, esi
jl 0x42d1d6
cmp eax, esi
jge 0x42d1fe
lea ecx, [eax + eax*8]
mov eax, 1
mov word [edx + ecx*8 + 0x78], ax
mov eax, dword [ebp - 0x1c]
mov byte [eax + ecx*8 + 0x98], 1
mov edi, 1
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x42d22b
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x42d22b
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x42d22b
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret