Function at 0x458030
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 0x458048
push eax
call esi
mov eax, dword [edi + 0x70]
test eax, eax
je 0x458052
push eax
call esi
cmp dword [edi + 0x78], 0
push ebx
je 0x458164
push 0x525870
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [edi + 0x78], 1
je 0x458077
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
test byte [edi + 0x78], 2
je 0x45808b
push dword [edi + 0x80]
call fcn.004abf31
add esp, 4
test byte [edi + 0x78], 4
je 0x45809f
push dword [edi + 0x84]
call fcn.004a9274
add esp, 4
mov ecx, dword [0x525868]
mov eax, dword [ecx + 4]
add eax, 0xfffffffc
cmp dword [eax], edi
jne 0x4580ba
mov dword [ecx + 4], eax
mov ebx, dword [0x525868]
jmp 0x458116
push 0x4d6270
push 2
call fcn.004b9e83
add esp, 4
push eax
call fcn.00458000
mov ebx, dword [0x525868]
add esp, 8
mov esi, dword [ebx]
cmp esi, dword [ebx + 4]
je 0x458116
lea ecx, [esi + 4]
mov dword [ebp - 4], ecx
cmp dword [esi], edi
jne 0x458108
mov eax, dword [ebx + 4]
sub eax, ecx
push eax
push ecx
push esi
call fcn.004a8100
mov ecx, dword [ebp - 4]
add esp, 0xc
add dword [ebx + 4], 0xfffffffc
mov ebx, dword [0x525868]
jmp 0x458111
add esi, 4
add ecx, 4
mov dword [ebp - 4], ecx
cmp esi, dword [ebx + 4]
jne 0x4580e5
mov ecx, dword [ebx]
cmp ecx, dword [ebx + 4]
jne 0x458159
test ecx, ecx
je 0x458146
mov eax, dword [ebx + 8]
sub eax, ecx
sar eax, 2
push eax
push ecx
mov ecx, ebx
call fcn.0040c5a0
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
push ebx
call fcn.0046101e
add esp, 4
mov dword [0x525868], 0
push 0x525870
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [edi + 0xc], 0
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jne 0x4581af
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
or eax, 0xffffffff
lock xadd dword [0x525888], eax
jne 0x4581c3
push 0x525870
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 0x458205
lea esp, [esp]
mov esi, dword [ecx]
push ecx
call fcn.0046101e
add esp, 4
mov ecx, esi
cmp esi, dword [edi + 0xc0]
jne 0x4581f0
push dword [edi + 0xc0]
call fcn.0046101e
mov eax, dword [edi + 0x54]
lea esi, [edi + 0x40]
add esp, 4
cmp eax, 8
jb 0x458229
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.004085f0
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x45823f
mov esi, dword [esi]
xor eax, eax
mov word [esi], ax
lea esi, [edi + 0x28]
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x45825a
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.004085f0
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x458270
mov esi, dword [esi]
xor eax, eax
mov word [esi], ax
lea esi, [edi + 0x10]
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x45828b
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.004085f0
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x4582a1
mov esi, dword [esi]
xor eax, eax
mov word [esi], ax
mov esi, dword [edi + 0xc]
test esi, esi
je 0x4582bd
mov ecx, esi
call fcn.00457d70
push esi
call fcn.0046101e
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret