Function at 0x687ca620
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, eax
push ebx
mov ebx, ecx
sub esp, 0x5c
test byte [0x687da03c], 1
jne 0x687ca828
mov eax, dword [esi + 0x54]
mov eax, dword [eax + 0x78]
test eax, eax
je 0x687ca940
mov edx, edi
mov eax, esi
call fcn.687c9900
test eax, eax
je 0x687ca94a
lea edx, [ebp - 0x30]
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x30], esi
mov dword [esp + 0xc], edx
lea edx, [esi + 0x18]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x687c7990
mov dword [esp + 4], 0
mov dword [esp], edx
call dword [eax + 0x2c]
sub esp, 0x14
test byte [0x687da03c], 8
jne 0x687ca8a0
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], ecx
mov ecx, dword [ecx + 0x10]
mov ebx, ecx
jmp 0x687ca6c7
mov eax, dword [ebx + 8]
mov edx, dword [ebx]
cmp edi, dword [eax]
je 0x687ca730
cmp ecx, edx
je 0x687ca6cb
mov ebx, edx
test ebx, ebx
jne 0x687ca6b8
movzx edx, byte [0x687da03c]
mov eax, dword [ebp - 0x3c]
test dl, 2
jne 0x687ca8d8
mov ecx, dword [eax + 0x30]
and edx, 1
mov ecx, dword [ecx + 0x28]
test ecx, ecx
je 0x687ca718
test dl, dl
jne 0x687ca7e0
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
mov dword [esp], eax
call ecx
movzx edx, byte [0x687da03c]
sub esp, 4
and edx, 1
xor ebx, ebx
test dl, dl
jne 0x687ca868
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 4]
test edx, edx
je 0x687ca818
mov dword [edx + 4], eax
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
mov dword [eax], edx
mov edx, dword [ebx + 8]
sub dword [edx + 0x18], 1
je 0x687ca760
test byte [0x687da03c], 1
jne 0x687ca910
call sub.kernel32.dll_DebugBreak
mov eax, dword [ebx + 8]
lea edx, [eax + 0x10]
mov eax, dword [eax + 0xc]
call fcn.687c34c0
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebx + 8]
sub esp, 4
mov edx, dword fs:[0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x3c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapFree
mov edx, dword [ebp - 0x3c]
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapFree
mov eax, dword [esi + 0x54]
movzx edx, byte [0x687da03c]
sub esp, 0xc
jmp 0x687ca6de
mov dword [esp + 0xc], str.data.dwFlags_is_incorrect_n
mov dword [esp + 8], str.DP_IF_DestroyPlayer
mov dword [esp + 4], 0x687da03c
mov dword [esp], 0
call fcn.687c3970
mov eax, dword [esi + 0x54]
mov edx, dword [eax + 0x30]
mov ecx, dword [edx + 0x28]
jmp 0x687ca6f3
mov ecx, dword [ebp - 0x40]
mov dword [ecx + 0x14], eax
jmp 0x687ca73e
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__p_____p_0x_08x__u_:_semi_stub_n
mov dword [esp + 8], str.DP_IF_DestroyPlayer
mov dword [esp + 4], 0x687da03c
mov dword [esp], 0
call fcn.687c3970
jmp 0x687ca63c
mov dword [esp + 0xc], str.Send_a_DELETEPLAYERORGROUP_msg_n
mov dword [esp + 8], str.DP_IF_DestroyPlayer
mov dword [esp + 4], 0x687da03c
mov dword [esp], 0
call fcn.687c3970
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x687dcda3
mov dword [esp + 8], str.DP_DeletePlayer
mov dword [esp + 4], 0x687da03c
mov dword [esp], 3
call fcn.687c3970
jmp 0x687ca69f
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.DPID_0x_08x_not_found_n
mov dword [esp + 8], str.DP_DeletePlayer
mov dword [esp + 4], 0x687da03c
mov dword [esp], 1
call fcn.687c3970
mov eax, dword [esi + 0x54]
movzx edx, byte [0x687da03c]
jmp 0x687ca6de
mov dword [esp + 0xc], str.Why_is_this_not_the_last_reference_to_player__n
mov dword [esp + 8], str.DP_DeletePlayer
mov dword [esp + 4], 0x687da03c
mov dword [esp], 0
call fcn.687c3970
jmp 0x687ca75b
mov ebx, 0x88770140
jmp 0x687ca722
mov ebx, 0x88770096
jmp 0x687ca722