Function at 0x405ee0
Capabilities:
Terminate thread

Disassembly:
push 0xffffffffffffffff
push 0x40d9bb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push ebp
mov ebx, ecx
push esi
push edi
xor edi, edi
mov eax, dword [ebx + 0xc8]
mov dword [esp + 0x10], ebx
cmp eax, edi
mov dword [ebx], 0x40ecc0
je 0x405f26
push 0x2b67
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [ebx + 0xc8], edi
mov eax, dword [ebx + 0xc0]
cmp eax, edi
je 0x405f41
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov dword [ebx + 0xc0], edi
jmp 0x405f47
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0xc4]
cmp eax, edi
je 0x405f5a
push eax
call esi
mov dword [ebx + 0xc4], edi
mov eax, dword [ebx + 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebx + 0xd0]
cmp eax, edi
je 0x405f7a
push eax
call esi
mov dword [ebx + 0xd0], edi
mov eax, dword [ebx + 0xd8]
cmp eax, edi
je 0x405f87
mov dword [eax + 0x20], edi
mov dword [ebx], 0x40edb0
mov dword [esp + 0x50], 1
xor ebp, ebp
lea esi, [ebx + 0x60]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x5c]
cmp eax, ecx
je 0x405fa6
xor eax, eax
cmp ebp, eax
jge 0x406061
lea edi, [ebx + 0x64]
push ebp
mov ecx, edi
mov edx, dword [ecx]
mov dword [esp + 0x1c], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x20], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x24], edx
mov eax, dword [ecx + 0xc]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x28], eax
call fcn.00409030
mov ecx, dword [esp + 0x20]
push 0x2710
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x406027
mov eax, edi
push ebp
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x2c]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x38], edx
call fcn.00409030
mov eax, dword [esp + 0x30]
push 0
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [edi]
mov ecx, dword [edi + 8]
mov eax, dword [edi + 4]
mov dword [esp + 0x38], edx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x40], ecx
push ebp
lea ecx, [esp + 0x3c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], edx
call fcn.00409030
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebp
xor edi, edi
jmp 0x405f9a
mov dword [esp + 0x14], esi
mov eax, dword [esi + 0x5c]
mov byte [esp + 0x50], 2
test eax, eax
je 0x40613c
mov ecx, dword [esi + 0x3c]
push 0
lea edx, [ecx + 4]
mov dword [esi + 0x3c], edx
call fcn.004091c0
mov ecx, dword [esi + 0x5c]
dec ecx
mov eax, ecx
mov dword [esi + 0x5c], ecx
test eax, eax
je 0x4060a0
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x38]
cmp eax, ecx
jne 0x406131
mov eax, dword [esi + 0x40]
lea ecx, [eax + 4]
mov dword [esi + 0x40], ecx
mov eax, dword [eax]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esi + 0x5c]
add esp, 4
test eax, eax
jne 0x406102
lea ecx, [esp + 0x38]
call fcn.00408890
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
lea edx, [esi + 0x34]
mov edi, dword [esp + 0x44]
mov ebp, edx
mov edx, dword [esp + 0x40]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], edi
lea ebp, [esi + 0x44]
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x54]
push eax
mov dword [ebp + 4], ecx
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], edi
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x406131
mov eax, dword [esi + 0x40]
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x30]
call fcn.004090a0
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
lea eax, [esi + 0x34]
mov dword [esi + 0x34], ecx
mov ecx, dword [esp + 0x30]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x34]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x5c]
test eax, eax
jne 0x406075
mov eax, dword [esi + 0x2c]
mov byte [esp + 0x50], 0
test eax, eax
je 0x406172
mov edi, 4
mov ebp, dword [esi + 0xc]
add ebp, edi
dec eax
test eax, eax
mov dword [esi + 0xc], ebp
mov ecx, ebp
mov dword [esi + 0x2c], eax
je 0x406164
cmp ecx, dword [esi + 8]
jne 0x40616b
mov ecx, esi
call fcn.00408fb0
mov eax, dword [esi + 0x2c]
test eax, eax
jne 0x40614d
mov ecx, ebx
mov dword [esp + 0x50], 0xffffffff
call sub.MFC42.DLL_CDialog::CDialog
mov ecx, dword [esp + 0x48]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x44
ret