Function at 0x408210
Capabilities:
Terminate thread

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, eax
mov eax, dword [0x59d5d4]
mov ebp, dword [esi + 0x3b4]
mov ecx, dword [eax*4 + 0x597150]
push edi
mov edi, dword [eax*4 + 0x597158]
mov eax, dword [ebp + 0x160]
xor ebx, ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ecx
cmp eax, ebx
je 0x4082d6
lea ecx, [eax + 0x74]
cmp edi, ebx
jne 0x408255
xor eax, eax
jmp 0x408271
mov eax, edi
lea edx, [eax + 2]
mov dword [esp + 0x10], edx
mov edi, edi
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x408260
sub eax, dword [esp + 0x10]
sar eax, 1
push eax
push edi
call fcn.004019d0
mov ecx, dword [ebp + 0x160]
push ebx
call fcn.0041c9de
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x160]
push eax
call fcn.00419836
mov ecx, dword [ebp + 0x160]
push 5
call fcn.00419901
mov ecx, dword [ebp + 0x114]
push ecx
mov ecx, dword [ebp + 0x160]
call fcn.0041ca69
mov edx, dword [ebp + 0x160]
mov eax, dword [edx + 0x20]
push 1
push ebx
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [ebp + 0x160]
mov edx, dword [ecx + 0x20]
push edx
call dword [sym.imp.USER32.dll_UpdateWindow]
cmp byte [esi + 0x4fc], bl
je 0x4083a8
mov eax, dword [esi + 0x3c8]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov ecx, dword [esi + 0x3c4]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x408315
push 0x32
call ebp
inc edi
cmp edi, 0x64
jl 0x4082f7
jmp 0x408328
mov edx, dword [esi + 0x3c4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x3c4], ebx
mov eax, dword [esi + 0x3c4]
cmp eax, ebx
je 0x408341
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x3c4], ebx
xor edi, edi
mov eax, dword [esi + 0x408]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x408367
push 0x32
call ebp
inc edi
cmp edi, 0x64
jl 0x408343
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40837c
mov ecx, dword [esi + 0x408]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
mov dword [esi + 0x408], ebx
mov eax, dword [esi + 0x408]
cmp eax, ebx
je 0x408395
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x408], ebx
mov edx, dword [esi + 0x3c8]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebp, dword [esp + 0x18]
jmp 0x4083ae
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00408500
mov eax, dword [esi + 0x410]
cmp eax, ebx
je 0x4083c6
push eax
call edi
mov dword [esi + 0x410], ebx
mov eax, dword [esi + 0x40c]
cmp eax, ebx
je 0x4083d9
push eax
call edi
mov dword [esi + 0x40c], ebx
mov eax, dword [esi + 0x3d8]
cmp eax, ebx
je 0x4083ec
push eax
call edi
mov dword [esi + 0x3d8], ebx
mov eax, dword [esi + 0x3d0]
cmp eax, ebx
je 0x4083ff
push eax
call edi
mov dword [esi + 0x3d0], ebx
mov eax, dword [esi + 0x3c8]
cmp eax, ebx
je 0x408412
push eax
call edi
mov dword [esi + 0x3c8], ebx
mov eax, dword [esi + 0x3cc]
cmp eax, ebx
je 0x408425
push eax
call edi
mov dword [esi + 0x3cc], ebx
mov eax, dword [esi + 0x3dc]
cmp eax, ebx
je 0x408438
push eax
call edi
mov dword [esi + 0x3dc], ebx
mov eax, dword [esi + 0x3d4]
cmp eax, ebx
je 0x40844b
push eax
call edi
mov dword [esi + 0x3d4], ebx
mov eax, dword [esi + 0x3e0]
cmp eax, ebx
je 0x40845e
push eax
call edi
mov dword [esi + 0x3e0], ebx
mov eax, dword [esi + 0x4f4]
cmp eax, ebx
je 0x408471
push eax
call edi
mov dword [esi + 0x4f4], ebx
mov edi, dword [ebp + 0x164]
cmp edi, ebx
je 0x40848d
mov eax, dword [edi]
mov edx, dword [eax + 0x1c]
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
mov ecx, edi
call edx
mov dword [esi + 0x500], 0xffffffff
mov eax, dword [esi + 0x420]
cmp eax, ebx
je 0x4084b6
push eax
call fcn.00417339
add esp, 4
mov dword [esi + 0x420], ebx
mov dword [esi + 0x424], ebx
push ebx
push 0x56e530
lea ecx, [esi + 0x510]
mov byte [esi + 0x4fc], bl
call fcn.004019d0
mov ecx, dword [ebp + 0x160]
cmp ecx, ebx
je 0x4084f1
push ebx
call fcn.00419901
mov eax, dword [ebp + 0x114]
mov ecx, dword [eax + 0x20]
push ebx
push ebx
push 0xf
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret