Function at 0x45bbf0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4a19e0
mov eax, dword fs:[0]
push eax
mov eax, 0x7160
mov dword fs:[0], esp
call fcn.0047f090
mov eax, dword [0x4d2084]
xor eax, esp
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x716c], eax
xor ebx, ebx
lea eax, [esp + 0x15c]
mov ebp, ecx
push str.SELECT_ID_Name_Level_Enounce_Bulletin_Icon_CaptainID_Score_FROM_T_union
push eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x158], ebx
mov dword [esp + 0x15c], ebx
mov dword [esp + 0x160], ebx
mov byte [esp + 0x164], bl
call fcn.0047f034
add esp, 8
push 1
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x164]
push edx
mov ecx, 0x4d8c60
call fcn.00404b50
test al, al
je 0x45bebb
mov eax, dword [esp + 0x14]
push eax
call sub.LIBMYSQL.dll_mysql_num_rows
lea ecx, [esp + 0xbc]
mov esi, eax
call fcn.0045b140
cmp esi, ebx
mov dword [esp + 0x7178], ebx
jle 0x45be73
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x14]
push ecx
call sub.LIBMYSQL.dll_mysql_fetch_row
mov esi, eax
mov edx, dword [esi]
push edx
call fcn.0047f135
mov dword [esp + 0xc0], eax
mov ecx, dword [esi + 4]
mov eax, ecx
add esp, 4
lea edi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x45bcd0
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0xcc]
call fcn.004018c0
mov eax, dword [esi + 8]
push eax
call fcn.0047f135
mov byte [esp + 0xc4], al
mov ecx, dword [esi + 0xc]
mov eax, ecx
add esp, 4
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x45bd02
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0xe8]
call fcn.004018c0
mov ecx, dword [esi + 0x10]
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x45bd21
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x104]
call fcn.004018c0
mov ecx, dword [esi + 0x14]
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x45bd40
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x130]
call fcn.004018c0
mov ecx, dword [esi + 0x18]
push ecx
call fcn.0047f135
mov dword [esp + 0x148], eax
mov edx, dword [esi + 0x1c]
push edx
call fcn.0047f135
push 0x94
mov dword [esp + 0x154], eax
call fcn.0047c990
mov esi, eax
add esp, 0xc
mov dword [esp + 0x1c], esi
cmp esi, ebx
mov byte [esp + 0x7178], 1
je 0x45be0b
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x50], esp
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x104]
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], bl
call fcn.004017d0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x68], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x104]
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push edx
mov byte [esp + 0x71bc], 2
mov byte [ecx + 4], bl
call fcn.004017d0
mov eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0xf4]
push eax
push ecx
push ebp
mov ecx, esi
mov byte [esp + 0x71bc], 1
call fcn.0045b260
mov esi, eax
jmp 0x45be0d
xor esi, esi
lea edx, [esp + 0xbc]
push edx
mov ecx, esi
mov byte [esp + 0x717c], bl
mov dword [esp + 0x20], esi
call fcn.0045cbc0
mov edx, dword [ebp + 4]
cmp edx, ebx
jne 0x45be32
xor ecx, ecx
jmp 0x45be3a
mov ecx, dword [ebp + 8]
sub ecx, edx
sar ecx, 2
cmp edx, ebx
je 0x45be57
mov eax, dword [ebp + 0xc]
sub eax, edx
sar eax, 2
cmp ecx, eax
jae 0x45be57
mov eax, dword [ebp + 8]
mov dword [eax], esi
add eax, 4
mov dword [ebp + 8], eax
jmp 0x45be69
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x1c]
push ecx
push 1
push eax
mov ecx, ebp
call fcn.0045a8b0
dec dword [esp + 0x10]
jne 0x45bca6
mov edx, dword [esp + 0x14]
push edx
call sub.LIBMYSQL.dll_mysql_free_result
lea eax, [esp + 0x15c]
push str.SELECT_T_union_citizen.userID__T_union_citizen.official__T_union_citizen.name__T_union_citizen.nickname__T_union_citizen.UnionID__user.Level_FROM_T_union_citizen_user_WHERE_user.IDT_union_citizen.userID
push eax
call fcn.0047f034
add esp, 8
push 1
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x164]
push edx
mov ecx, 0x4d8c60
call fcn.00404b50
test al, al
jne 0x45bec2
lea ecx, [esp + 0xbc]
call fcn.0045b1c0
xor al, al
jmp 0x45c2c4
mov eax, dword [esp + 0x14]
push eax
call sub.LIBMYSQL.dll_mysql_num_rows
cmp eax, ebx
jle 0x45c046
mov dword [esp + 0x10], eax
jmp 0x45bee0
mov ecx, dword [esp + 0x14]
push ecx
call sub.LIBMYSQL.dll_mysql_fetch_row
lea ecx, [esp + 0x70]
mov esi, eax
call fcn.0045a0e0
mov byte [esp + 0x7c], bl
mov edx, dword [esi]
push edx
mov byte [esp + 0x717c], 3
call fcn.0047f135
mov dword [esp + 0x74], eax
mov eax, dword [esi + 4]
push eax
call fcn.0047f135
mov dword [esp + 0x80], eax
mov edx, dword [esi + 8]
add esp, 8
cmp edx, ebx
je 0x45bf47
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x45bf30
sub eax, edi
push eax
push edx
lea ecx, [esp + 0x88]
call fcn.004018c0
mov edx, dword [esi + 0xc]
cmp edx, ebx
je 0x45bf6a
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x45bf53
sub eax, edi
push eax
push edx
lea ecx, [esp + 0xa4]
call fcn.004018c0
mov ecx, dword [esi + 0x10]
push ecx
call fcn.0047f135
mov edx, dword [esi + 0x14]
push edx
mov edi, eax
call fcn.0047f135
add esp, 8
cmp edi, ebx
mov word [esp + 0xb8], ax
je 0x45bfc8
mov edx, dword [ebp + 4]
cmp edx, ebx
jne 0x45bf98
xor ecx, ecx
jmp 0x45bfa0
mov ecx, dword [ebp + 8]
sub ecx, edx
sar ecx, 2
xor eax, eax
cmp ecx, ebx
jle 0x45bfc8
mov esi, dword [edx + eax*4]
cmp dword [esi], edi
je 0x45bfb4
inc eax
cmp eax, ecx
jl 0x45bfa6
jmp 0x45bfc8
mov eax, dword [edx + eax*4]
cmp eax, ebx
je 0x45bfc8
lea ecx, [esp + 0x70]
push ecx
lea ecx, [eax + 0x5c]
call fcn.0045baf0
mov eax, dword [esp + 0xb4]
mov edi, 0x10
cmp eax, edi
mov byte [esp + 0x7178], bl
jb 0x45bfef
mov edx, dword [esp + 0xa0]
push edx
call fcn.0047e60d
add esp, 4
cmp dword [esp + 0x98], edi
mov esi, 0xf
mov dword [esp + 0xb4], esi
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], bl
jb 0x45c022
mov eax, dword [esp + 0x84]
push eax
call fcn.0047e60d
add esp, 4
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x98], esi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
mov dword [esp + 0x10], eax
jne 0x45bee0
mov ecx, dword [esp + 0x14]
push ecx
call sub.LIBMYSQL.dll_mysql_free_result
xor ebp, ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x7178], 4
xor edi, edi
jmp 0x45c070
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 4]
cmp ecx, ebx
jne 0x45c07f
xor eax, eax
jmp 0x45c087
mov eax, dword [edx + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jge 0x45c145
mov esi, dword [ecx + edi*4]
mov dword [esp + 0x3960], ebx
mov dword [esp + 0x3964], ebx
mov dword [esp + 0x3968], ebx
mov byte [esp + 0x396c], bl
mov edx, dword [esi + 0x88]
push edx
lea eax, [esp + 0x3970]
push str.SELECT_ID_FROM__user__WHERE_ID_d_AND_deleted0
push eax
call fcn.0047f034
add esp, 0xc
push 1
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x3974]
push edx
mov ecx, 0x4d8c60
call fcn.00404b50
test al, al
je 0x45c13f
mov eax, dword [esp + 0x1c]
push eax
call sub.LIBMYSQL.dll_mysql_num_rows
test eax, eax
jne 0x45c13f
cmp ebp, ebx
mov esi, dword [esi]
mov dword [esp + 0x10], esi
je 0x45c126
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov eax, edx
sub eax, ebp
sub ecx, ebp
sar eax, 2
sar ecx, 2
cmp eax, ecx
jae 0x45c126
mov dword [edx], esi
add edx, 4
mov dword [esp + 0x28], edx
inc edi
jmp 0x45c070
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push ecx
push 1
push edx
lea ecx, [esp + 0x2c]
call fcn.0040f700
mov ebp, dword [esp + 0x24]
inc edi
jmp 0x45c070
xor edi, edi
cmp ebp, ebx
mov dword [esp + 0x10], edi
jne 0x45c153
xor eax, eax
jmp 0x45c15c
mov eax, dword [esp + 0x28]
sub eax, ebp
sar eax, 2
cmp edi, eax
jge 0x45c2a5
mov esi, dword [ebp + edi*4]
cmp esi, ebx
je 0x45c1a0
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 4]
cmp edx, ebx
jne 0x45c17b
xor ecx, ecx
jmp 0x45c183
mov ecx, dword [eax + 8]
sub ecx, edx
sar ecx, 2
xor eax, eax
cmp ecx, ebx
jle 0x45c1a0
lea esp, [esp]
mov edi, dword [edx + eax*4]
cmp dword [edi], esi
je 0x45c213
inc eax
cmp eax, ecx
jl 0x45c190
mov edi, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x6c], 0xf
mov dword [esp + 0x68], ebx
mov byte [esp + 0x58], bl
cmp eax, ebx
mov byte [esp + 0x7178], 5
je 0x45c21c
lea ecx, [esp + 0x38]
push ecx
mov ecx, eax
call fcn.0042b540
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x7184], 6
call fcn.004017d0
mov eax, dword [esp + 0x50]
mov esi, 0x10
cmp eax, esi
mov byte [esp + 0x7178], 5
jb 0x45c201
mov edx, dword [esp + 0x3c]
push edx
call fcn.0047e60d
add esp, 4
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
jmp 0x45c221
mov eax, dword [edx + eax*4]
mov edi, dword [esp + 0x10]
jmp 0x45c1a2
mov esi, 0x10
mov eax, dword [ebp + edi*4]
mov ecx, dword [esp + 0x18]
push eax
call fcn.0045b710
test al, al
jne 0x45c24c
mov ecx, dword [ebp + edi*4]
mov edx, dword [0x52f0ec]
push ecx
push str.DeleteUnion_Error__union_d__n
push edx
call fcn.0048dda0
add esp, 0xc
cmp dword [esp + 0x6c], esi
mov eax, dword [esp + 0x58]
jae 0x45c25a
lea eax, [esp + 0x58]
push eax
mov eax, dword [0x52f0f8]
push str.A_guild_is_deleted_because_can_NOT_find_its_caption___guild_s__n
push eax
call fcn.0048dda0
mov eax, dword [esp + 0x78]
add esp, 0xc
cmp eax, esi
mov byte [esp + 0x7178], 4
jb 0x45c28b
mov ecx, dword [esp + 0x58]
push ecx
call fcn.0047e60d
add esp, 4
mov edx, dword [esp + 0x18]
mov dword [esp + 0x6c], 0xf
mov dword [esp + 0x68], ebx
mov byte [esp + 0x58], bl
inc edi
jmp 0x45c147
cmp ebp, ebx
mov byte [edx + 0x10], 1
je 0x45c2b6
push ebp
call fcn.0047e60d
add esp, 4
lea ecx, [esp + 0xbc]
call fcn.0045b1c0
mov al, 1
mov ecx, dword [esp + 0x7170]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x7164]
pop ebp
pop ebx
xor ecx, esp
call fcn.0047ece2
add esp, 0x716c
ret