Function at 0x40b570
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, eax
mov eax, dword [0x4d2798]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x268]
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateThread]
xor edi, edi
cmp eax, edi
je 0x40b5ec
lea ecx, [ebp - 4]
mov dword [ebp - 4], edi
mov edx, dword [eax + 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 4], 0x103
jne 0x40b5e6
mov eax, dword [esi + 0x268]
mov ecx, dword [eax + 0x2c]
push 0xffffffffffffffff
push ecx
call ebx
mov edx, dword [esi + 0x268]
mov eax, dword [edx + 0x2c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x268]
cmp ecx, edi
je 0x40b5e6
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov dword [esi + 0x268], edi
mov eax, dword [esi + 0x26c]
cmp eax, edi
je 0x40b649
lea ecx, [ebp - 8]
mov dword [ebp - 8], edi
mov edx, dword [eax + 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 8], 0x103
jne 0x40b643
mov eax, dword [esi + 0x26c]
mov ecx, dword [eax + 0x2c]
push 0xffffffffffffffff
push ecx
call ebx
mov edx, dword [esi + 0x26c]
mov eax, dword [edx + 0x2c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x26c]
cmp ecx, edi
je 0x40b643
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov dword [esi + 0x26c], edi
mov eax, dword [esi + 0x270]
cmp eax, edi
je 0x40b6a6
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], edi
mov edx, dword [eax + 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 0xc], 0x103
jne 0x40b6a0
mov eax, dword [esi + 0x270]
mov ecx, dword [eax + 0x2c]
push 0xffffffffffffffff
push ecx
call ebx
mov edx, dword [esi + 0x270]
mov eax, dword [edx + 0x2c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x270]
cmp ecx, edi
je 0x40b6a0
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov dword [esi + 0x270], edi
mov eax, dword [esi + 0x274]
cmp eax, edi
je 0x40b703
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], edi
mov edx, dword [eax + 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 0x10], 0x103
jne 0x40b6fd
mov eax, dword [esi + 0x274]
mov ecx, dword [eax + 0x2c]
push 0xffffffffffffffff
push ecx
call ebx
mov edx, dword [esi + 0x274]
mov eax, dword [edx + 0x2c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x274]
cmp ecx, edi
je 0x40b6fd
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov dword [esi + 0x274], edi
mov eax, dword [esi + 0x84]
cmp eax, edi
je 0x40b71c
push eax
call fcn.0041030c
add esp, 4
mov dword [esi + 0x84], edi
mov eax, dword [esi + 0x80]
mov dword [esi + 0x7c], edi
cmp eax, edi
je 0x40b738
push eax
call fcn.0041030c
add esp, 4
mov dword [esi + 0x80], edi
mov eax, dword [esi + 0x78]
cmp eax, edi
je 0x40b74b
push eax
call fcn.0042e4af
add esp, 4
mov dword [esi + 0x78], edi
mov ecx, dword [esi + 0x168]
cmp ecx, edi
je 0x40b771
cmp dword [ecx - 4], edi
lea eax, [ecx - 4]
je 0x40b768
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 3
call eax
jmp 0x40b771
push eax
call fcn.0041030c
add esp, 4
mov ecx, dword [esi + 0x16c]
cmp ecx, edi
je 0x40b784
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov ecx, dword [esi + 0x170]
cmp ecx, edi
je 0x40b797
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov ecx, dword [esi + 0x174]
cmp ecx, edi
je 0x40b7aa
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov ecx, dword [esi + 0x178]
cmp ecx, edi
je 0x40b7bd
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov ecx, dword [0x4d15f0]
cmp ecx, edi
je 0x40b7f1
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b7e2
push eax
call fcn.0041030c
mov ecx, dword [0x4d15f0]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d15f0], edi
mov ecx, dword [0x4d15f4]
cmp ecx, edi
je 0x40b825
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b816
push eax
call fcn.0041030c
mov ecx, dword [0x4d15f4]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d15f4], edi
mov ecx, dword [0x4d15f8]
cmp ecx, edi
je 0x40b859
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b84a
push eax
call fcn.0041030c
mov ecx, dword [0x4d15f8]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d15f8], edi
mov ecx, dword [0x4d15fc]
cmp ecx, edi
je 0x40b88d
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b87e
push eax
call fcn.0041030c
mov ecx, dword [0x4d15fc]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d15fc], edi
mov ecx, dword [0x4d1600]
cmp ecx, edi
je 0x40b8c1
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b8b2
push eax
call fcn.0041030c
mov ecx, dword [0x4d1600]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d1600], edi
mov ecx, dword [0x4d1604]
cmp ecx, edi
je 0x40b8f5
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b8e6
push eax
call fcn.0041030c
mov ecx, dword [0x4d1604]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d1604], edi
mov ecx, dword [0x4d1608]
cmp ecx, edi
je 0x40b929
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b91a
push eax
call fcn.0041030c
mov ecx, dword [0x4d1608]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d1608], edi
mov ecx, dword [0x4d160c]
cmp ecx, edi
je 0x40b95d
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b94e
push eax
call fcn.0041030c
mov ecx, dword [0x4d160c]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d160c], edi
mov ecx, dword [0x4d13dc]
cmp ecx, edi
je 0x40b99d
call fcn.00410090
lea esi, [ecx + 4]
mov ebx, eax
mov eax, dword [esi]
cmp eax, edi
je 0x40b982
push eax
call fcn.0041030c
add esp, 4
mov dword [esi], edi
push ebx
call fcn.0041030c
mov ecx, dword [0x4d13dc]
push ecx
call fcn.0041030c
add esp, 8
mov dword [0x4d13dc], edi
mov ecx, dword [0x4d1610]
cmp ecx, edi
je 0x40b9d1
mov eax, dword [ecx + 4]
lea esi, [ecx + 4]
cmp eax, edi
je 0x40b9c2
push eax
call fcn.0041030c
mov ecx, dword [0x4d1610]
add esp, 4
mov dword [esi], edi
push ecx
call fcn.0041030c
add esp, 4
mov dword [0x4d1610], edi
mov eax, dword [0x4d27e0]
sub eax, dword [0x4d27dc]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
sar eax, 2
xor esi, esi
cmp eax, edi
jbe 0x40ba17
cmp esi, eax
jb 0x40b9f4
call fcn.0042d5ae
mov edx, dword [0x4d27dc]
mov eax, dword [edx + esi*4]
cmp eax, edi
je 0x40ba04
push eax
call ebx
mov eax, dword [0x4d27e0]
sub eax, dword [0x4d27dc]
inc esi
sar eax, 2
cmp esi, eax
jb 0x40b9f4
call fcn.0040c640
mov eax, dword [0x4d13bc]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
cmp eax, edi
je 0x40ba34
push eax
call esi
mov dword [0x4d13bc], edi
mov eax, dword [0x4d13c0]
cmp eax, edi
je 0x40ba46
push eax
call esi
mov dword [0x4d13c0], edi
mov eax, dword [0x4d15ec]
cmp eax, edi
je 0x40ba58
push eax
call ebx
mov dword [0x4d15ec], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret