Function at 0x406d80
Capabilities:
Terminate thread

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x5c
lea edi, [esp + 0x1c]
mov dword [esp + 0x34], 0x4bda00
mov dword [esp + 0x38], 0x4be848
mov dword [esp], edi
call fcn.00414b80
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x406dc0
mov dword [esp], eax
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
mov eax, dword [ebx + 0x70]
test eax, eax
je 0x406ddb
mov dword [esp], eax
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
mov eax, dword [ebx + 0x78]
test eax, eax
jne 0x406e84
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x406fb2
lock sub dword [0x4d0244], 1
je 0x406f21
mov eax, dword [ebx + 0xbc]
lea ebp, [ebx + 0xbc]
cmp ebp, eax
je 0x406e20
nop
mov esi, dword [eax]
mov dword [esp], eax
call fcn.004bcd40
cmp ebp, esi
mov eax, esi
jne 0x406e10
mov eax, dword [ebx + 0x40]
lea edx, [ebx + 0x48]
cmp eax, edx
je 0x406e32
mov dword [esp], eax
call fcn.004bcd40
mov eax, dword [ebx + 0x28]
lea edx, [ebx + 0x30]
cmp eax, edx
je 0x406e44
mov dword [esp], eax
call fcn.004bcd40
mov eax, dword [ebx + 0x10]
lea edx, [ebx + 0x18]
cmp eax, edx
je 0x406e56
mov dword [esp], eax
call fcn.004bcd40
mov ebx, dword [ebx + 0xc]
test ebx, ebx
je 0x406e74
mov ecx, ebx
call fcn.004094e0
mov dword [esp + 4], 0x348
mov dword [esp], ebx
call fcn.004bcd60
mov dword [esp], edi
call fcn.00414c10
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
mov dword [esp], 0x4d0248
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0x78]
sub esp, 4
test al, 1
jne 0x406f9b
test al, 4
jne 0x406f7f
mov ebp, dword [0x4d0264]
mov esi, dword [ebp + 4]
cmp ebx, dword [esi - 4]
je 0x406f74
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.warning:_removing_Breakpad_handler_out_of_order_n
add eax, 0x40
mov dword [esp], eax
call fcn.004225c0
mov ebp, dword [0x4d0264]
mov esi, dword [ebp]
mov eax, dword [ebp + 4]
jmp 0x406ef7
cmp ebx, dword [esi]
je 0x406f40
add esi, 4
cmp esi, eax
jne 0x406ef0
cmp esi, dword [ebp]
je 0x407025
mov dword [esp], 0x4d0248
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x406de6
mov dword [esp], 0x4d0248
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
sub esp, 4
jmp 0x406dff
lea ecx, [esi + 4]
cmp ecx, eax
je 0x407072
mov edx, eax
sub edx, ecx
mov dword [esp + 0x18], edx
sar edx, 2
mov dword [esp + 0x14], edx
cmp dword [esp + 0x14], 0
mov edx, ebp
jne 0x407050
sub eax, 4
mov dword [ebp + 4], eax
mov ebp, edx
mov eax, dword [edx + 4]
jmp 0x406ef7
sub esi, 4
mov dword [ebp + 4], esi
jmp 0x406efb
mov eax, dword [ebx + 0x80]
mov dword [esp + 0x20], 0
mov dword [esp], eax
call dword [0x4c10ac]
jmp 0x406eaf
mov eax, dword [ebx + 0x7c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov eax, dword [ebx + 0x78]
sub esp, 4
jmp 0x406ea7
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x84]
mov dword [esp + 0x20], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [ebx + 0x84]
sub esp, 8
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
lea eax, [ebx + 0x8c]
sub esp, 4
mov dword [ebx + 0x84], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [ebx + 0xa4]
sub esp, 4
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0xa8]
sub esp, 4
mov dword [esp], eax
call esi
sub esp, 4
jmp 0x406df1
test esi, esi
je 0x407031
mov dword [esp], esi
call fcn.004bcd40
mov dword [esp + 4], 0xc
mov dword [esp], ebp
call fcn.004bcd60
mov dword [0x4d0264], 0
jmp 0x406f04
mov eax, dword [esp + 0x18]
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 8], eax
call sub.msvcrt.dll_memmove
mov eax, dword [ebp + 4]
mov edx, dword [0x4d0264]
jmp 0x406f67
mov edx, ebp
jmp 0x406f67