Function at 0x42d240
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
cmp esi, 0xffffffff
jne 0x42d3db
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 0x42d2f0
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x42d2a0
push 0x2bb
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
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 0x42d2d0
mov byte [edx], 0
push dword [ecx]
push 0x2bb
push str.D:_ragnarokbr_rathena_srccharint_guild.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x2bb
push str.D:_ragnarokbr_rathena_srccharint_guild.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x42d3a0
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x42d3a0
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x42d38c
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 0x42d37b
cmp dword [esi + 0x3e4], 0
je 0x42d37b
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x42d36c
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x42d36c
mov eax, dword [esi + 0x3e4]
mov eax, dword [eax]
push eax
call fcn.0046d2ec
add esp, 4
mov esi, eax
jmp 0x42d3a2
xor eax, eax
push eax
call fcn.0046d2ec
add esp, 4
mov esi, eax
jmp 0x42d3a2
mov eax, dword [esp + 0x10]
push eax
call fcn.0046d2ec
add esp, 4
mov esi, eax
jmp 0x42d3a2
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 0x42d3db
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x42d3db
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 0x42d3e8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, esi
lea ecx, [esp + 0x18]
call fcn.0042afe0
mov edi, dword [esp + 0x18]
test edi, edi
je 0x42d469
movsx edx, word [edi + 8]
xor eax, eax
test edx, edx
jle 0x42d414
lea ecx, [edi + 0x5c]
cmp dword [ecx], ebx
je 0x42d414
inc eax
add ecx, 0x48
cmp eax, edx
jl 0x42d408
cmp eax, edx
jge 0x42d432
lea ecx, [eax + eax*8]
xor eax, eax
mov word [edi + ecx*8 + 0x78], ax
mov eax, dword [esp + 0x18]
mov byte [eax + ecx*8 + 0x98], 1
mov edi, dword [esp + 0x18]
movsx esi, word [edi + 8]
xor ecx, ecx
test esi, esi
jle 0x42d458
lea edx, [edi + 0x78]
nop
cmp word [edx], 0
lea eax, [ecx + 1]
lea edx, [edx + 0x48]
cmove eax, ecx
mov ecx, eax
sub esi, 1
jne 0x42d440
test ecx, ecx
jne 0x42d464
mov eax, 0x8000
or word [edi + 0x2c70], ax
mov edi, 1
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x42d492
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x42d492
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x42d492
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret