Function at 0x4052a0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
mov edi, ecx
mov eax, dword [edi + 0x64]
test eax, eax
je 0x4052b8
push eax
call esi
mov eax, dword [edi + 0x70]
test eax, eax
je 0x4052c2
push eax
call esi
cmp dword [edi + 0x78], 0
push ebx
je 0x4053cc
push 0x4331d0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [edi + 0x78], 1
je 0x4052e7
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
test byte [edi + 0x78], 2
je 0x4052fb
push dword [edi + 0x80]
call fcn.0040da48
add esp, 4
test byte [edi + 0x78], 4
je 0x40530f
push dword [edi + 0x84]
call fcn.0040be06
add esp, 4
mov ecx, dword [0x4331c8]
mov eax, dword [ecx + 4]
cmp dword [eax - 4], edi
jne 0x405329
add dword [ecx + 4], 0xfffffffc
mov ebx, dword [0x4331c8]
jmp 0x405386
push str.warning:_removing_Breakpad_handler_out_of_order_n
call fcn.0040d10a
add eax, 0x40
push eax
call fcn.0040dd6e
mov ebx, dword [0x4331c8]
add esp, 8
mov esi, dword [ebx]
cmp esi, dword [ebx + 4]
je 0x405386
lea ecx, [esi + 4]
mov dword [ebp - 4], ecx
cmp dword [esi], edi
jne 0x405378
mov eax, dword [ebx + 4]
sub eax, ecx
and eax, 0xfffffffc
push eax
push ecx
push esi
call fcn.0040b660
mov ecx, dword [ebp - 4]
add esp, 0xc
add dword [ebx + 4], 0xfffffffc
mov ebx, dword [0x4331c8]
jmp 0x405381
add esi, 4
add ecx, 4
mov dword [ebp - 4], ecx
cmp esi, dword [ebx + 4]
jne 0x405352
mov eax, dword [ebx]
cmp eax, dword [ebx + 4]
jne 0x4053c1
test eax, eax
je 0x4053ae
push eax
call fcn.0040be2b
add esp, 4
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
push ebx
call fcn.0040be2b
add esp, 4
mov dword [0x4331c8], 0
push 0x4331d0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [edi + 0xc], 0
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jne 0x405417
push 1
push dword [edi + 0x88]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi + 0x88]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
lea eax, [edi + 0x90]
mov dword [edi + 0x88], 0
push eax
call ebx
push dword [edi + 0xa8]
call esi
push dword [edi + 0xac]
call esi
push 0x4331e8
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40542d
push 0x4331d0
call ebx
mov eax, dword [edi + 0xc0]
pop ebx
mov ecx, dword [eax]
mov dword [eax], eax
mov eax, dword [edi + 0xc0]
mov dword [eax + 4], eax
mov dword [edi + 0xc4], 0
cmp ecx, dword [edi + 0xc0]
je 0x405468
mov esi, dword [ecx]
push ecx
call fcn.0040be2b
add esp, 4
mov ecx, esi
cmp esi, dword [edi + 0xc0]
jne 0x405453
push dword [edi + 0xc0]
call fcn.0040be2b
add esp, 4
cmp dword [edi + 0x54], 8
jb 0x405487
push dword [edi + 0x40]
call fcn.0040be2b
add esp, 4
xor eax, eax
mov dword [edi + 0x54], 7
mov dword [edi + 0x50], 0
mov word [edi + 0x40], ax
cmp dword [edi + 0x3c], 8
jb 0x4054ac
push dword [edi + 0x28]
call fcn.0040be2b
add esp, 4
xor eax, eax
mov dword [edi + 0x3c], 7
mov dword [edi + 0x38], 0
mov word [edi + 0x28], ax
cmp dword [edi + 0x24], 8
jb 0x4054d1
push dword [edi + 0x10]
call fcn.0040be2b
add esp, 4
xor eax, eax
mov dword [edi + 0x24], 7
mov dword [edi + 0x20], 0
mov word [edi + 0x10], ax
mov esi, dword [edi + 0xc]
test esi, esi
je 0x4054fc
mov ecx, esi
call fcn.004065c0
push esi
call fcn.0040be2b
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret