Function at 0x407050
Capabilities:
Terminate thread

Disassembly:
push 0xffffffffffffffff
push 0x40db6b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], ecx
mov dword [ecx], 0x40edb0
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [esp + 0x50], 1
xor ebx, ebx
lea esi, [ecx + 0x60]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x5c]
cmp eax, ecx
je 0x407095
xor eax, eax
cmp ebx, eax
jge 0x407162
mov eax, dword [esp + 0x10]
push ebx
lea edi, [eax + 0x64]
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 ebp
cmp eax, 0x102
jne 0x407116
mov eax, edi
push ebx
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 + 4]
mov eax, dword [edi + 8]
mov ecx, dword [edi]
mov dword [esp + 0x3c], edx
mov edi, dword [edi + 0xc]
lea edx, [eax + ebx*4]
mov eax, edx
sub eax, ecx
sar eax, 2
js 0x407138
mov ecx, eax
shr ecx, 0xa
jmp 0x407144
mov ecx, 0x3ff
sub ecx, eax
shr ecx, 0xa
neg ecx
test ecx, ecx
je 0x407153
mov edx, dword [edi + ecx*4]
shl ecx, 0xa
sub eax, ecx
lea edx, [edx + eax*4]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
jmp 0x407089
mov dword [esp + 0x14], esi
mov eax, dword [esi + 0x5c]
mov byte [esp + 0x50], 2
test eax, eax
je 0x40723c
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 0x4071a1
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x38]
cmp eax, ecx
jne 0x407231
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 0x407202
lea ecx, [esp + 0x28]
call fcn.00408890
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
lea edx, [esi + 0x34]
mov edi, dword [esp + 0x34]
mov ebx, edx
mov edx, dword [esp + 0x30]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], edi
lea ebx, [esi + 0x44]
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x54]
push eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], edi
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x407231
mov eax, dword [esi + 0x40]
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x20]
call fcn.004090a0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea eax, [esi + 0x34]
mov dword [esi + 0x34], ecx
mov ecx, dword [esp + 0x20]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x24]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x5c]
test eax, eax
jne 0x407176
mov eax, dword [esi + 0x2c]
mov byte [esp + 0x50], 0
test eax, eax
je 0x407272
mov edi, 4
mov ebx, dword [esi + 0xc]
add ebx, edi
dec eax
test eax, eax
mov dword [esi + 0xc], ebx
mov ecx, ebx
mov dword [esi + 0x2c], eax
je 0x407264
cmp ecx, dword [esi + 8]
jne 0x40726b
mov ecx, esi
call fcn.00408fb0
mov eax, dword [esi + 0x2c]
test eax, eax
jne 0x40724d
mov ecx, dword [esp + 0x10]
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