Function at 0x1010940
Capabilities:
Terminate thread

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov dword [esp + 0x14], ebp
call fcn.010294e0
mov eax, dword [ebp + 8]
cmp eax, 2
jne 0x1010b3e
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x38], eax
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x40], eax
push 0x14
lea eax, [esp + 0x34]
xor esi, esi
push eax
mov ecx, ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x40], 0x100005
call fcn.01013730
test eax, eax
je 0x10109af
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x10109af
push eax
call fcn.0108e495
add esp, 4
mov edx, dword [ebp]
push 0xffffffffffffffff
mov ecx, ebp
call dword [edx + 0xc]
mov eax, dword [ebp + 0x14]
cmp eax, 0xffffffff
je 0x10109f2
cmp dword [ebp + 0x2c], esi
je 0x10109f2
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x10109f2
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x14]
mov ecx, dword [ebp + 0x2c]
push 0x3e8
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp]
push 0xffffffffffffffff
mov ecx, ebp
call dword [edx + 0xc]
mov eax, dword [ebp + 0x2c]
cmp eax, esi
je 0x1010a05
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [ebp + 0x2c], esi
mov eax, dword [ebp + 0x28]
cmp eax, 0xffffffff
je 0x1010a1b
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov dword [ebp + 0x28], 0xffffffff
mov ecx, dword [ebp + 0x34]
cmp ecx, esi
mov dword [ebp + 0x30], esi
je 0x1010b04
mov ebx, dword [ecx + 0xc]
cmp ebx, esi
jle 0x1010af4
mov eax, ebx
neg eax
sbb eax, eax
cmp eax, esi
je 0x1010af4
test ebx, ebx
jle 0x1010af4
cmp eax, 0xffffffff
mov edi, eax
jne 0x1010a6b
mov esi, dword [ecx + 8]
xor eax, eax
test esi, esi
jbe 0x1010a6b
mov edx, dword [ecx + 4]
mov edi, dword [edx]
test edi, edi
jne 0x1010a6b
inc eax
add edx, 4
cmp eax, esi
jb 0x1010a5d
cmp dword [edi], 0
jne 0x1010a8e
mov eax, dword [edi + 4]
mov edx, dword [ecx + 8]
inc eax
cmp eax, edx
jae 0x1010a8e
mov ecx, dword [ecx + 4]
lea ecx, [ecx + eax*4]
cmp dword [ecx], 0
jne 0x1010a8e
inc eax
add ecx, 4
cmp eax, edx
jb 0x1010a81
mov esi, dword [edi + 0xc]
test esi, esi
je 0x1010ae1
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x1010ac1
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x14]
mov ecx, esi
call fcn.01035420
push esi
call fcn.0108e495
mov eax, dword [ebp]
add esp, 4
push 0xffffffffffffffff
mov ecx, ebp
call dword [eax + 0xc]
jmp 0x1010ae1
mov eax, dword [esi + 0x10]
cmp eax, 0xffffffff
je 0x1010ae1
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esi + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10], 0xffffffff
mov ecx, dword [ebp + 0x34]
mov eax, dword [ecx + 0xc]
dec ebx
neg eax
sbb eax, eax
test eax, eax
jne 0x1010a42
mov ecx, dword [ebp + 0x34]
xor esi, esi
cmp ecx, esi
je 0x1010b04
mov edx, dword [ecx]
push 1
call dword [edx + 4]
mov eax, dword [ebp + 0x24]
cmp eax, 0xffffffff
je 0x1010b24
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x24], 0xffffffff
mov eax, dword [ebp + 0x14]
cmp eax, esi
je 0x1010ffb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x14], esi
jmp 0x1010ffb
cmp eax, 1
jne 0x101100a
mov eax, dword [ebp]
push 0xffffffffffffffff
mov ecx, ebp
call dword [eax + 0xc]
mov eax, dword [ebp + 0x28]
cmp eax, 0xffffffff
je 0x1010b67
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x28], 0xffffffff
mov eax, dword [ebp + 0x2c]
xor ebx, ebx
cmp eax, ebx
je 0x1010f9c
mov eax, dword [eax + 0xc]
cmp eax, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], 1
jle 0x1010f89
lea esi, [eax*4]
push esi
call fcn.0108e46c
mov edx, eax
mov ecx, esi
shr ecx, 2
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
add esp, 4
cmp edx, ebx
mov dword [esp + 0x18], edx
rep stosb byte es:[edi], al
je 0x1010e62
mov ecx, dword [ebp + 0x2c]
mov ebx, dword [ecx + 0xc]
neg ebx
sbb ebx, ebx
test ebx, ebx
je 0x1010d24
mov ebp, edx
mov dword [esp + 0x1c], ebp
cmp ebx, 0xffffffff
mov edx, dword [esp + 0x14]
mov edi, dword [edx + 0x2c]
mov edx, ebx
jne 0x1010bfb
mov esi, dword [edi + 8]
xor eax, eax
test esi, esi
jbe 0x1010bfb
mov ecx, dword [edi + 4]
mov edx, dword [ecx]
test edx, edx
jne 0x1010bfb
inc eax
add ecx, 4
cmp eax, esi
jb 0x1010bed
mov ebx, dword [edx]
test ebx, ebx
jne 0x1010c20
mov eax, dword [edx + 4]
mov esi, dword [edi + 8]
inc eax
cmp eax, esi
jae 0x1010c20
mov ecx, dword [edi + 4]
lea ecx, [ecx + eax*4]
mov ebx, dword [ecx]
test ebx, ebx
jne 0x1010c20
inc eax
add ecx, 4
cmp eax, esi
jb 0x1010c12
mov esi, dword [edx + 0xc]
xor eax, eax
cmp esi, eax
je 0x1010d1c
cmp dword [esp + 0x40], eax
je 0x1010ca9
cmp dword [esi + 0xc], 0xffffffff
je 0x1010ca9
mov ecx, dword [esp + 0x20]
xor edx, edx
cmp ecx, eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x30], 0x200000
je 0x1010c6f
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], 1
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x1c]
push 0x14
lea edx, [esp + 0x34]
push edx
push esi
call fcn.01012f20
test eax, eax
je 0x1010ca2
cmp dword [esp + 0x24], 0x1c
jne 0x1010ca2
mov eax, dword [esp + 0x1c]
push eax
call fcn.0108e495
add esp, 4
mov ecx, dword [esi]
mov dword [ebp], ecx
jmp 0x1010d0c
cmp dword [esi + 0x1c], eax
je 0x1010d1c
cmp dword [esi + 0x20], eax
je 0x1010d1c
push 0xfb
call fcn.0108e46c
mov edi, eax
push edi
push 0xfb
call fcn.01084740
add esp, 0xc
test edi, edi
je 0x1010e7c
mov dword [edi], 9
mov dword [edi + 0xd], 0x12
mov ecx, dword [esi + 0x1c]
push edi
call fcn.01089b40
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0xc], 0x64
jle 0x1010cf9
call fcn.01089b69
mov edx, dword [esi + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi]
mov ebp, dword [esp + 0x1c]
mov dword [ebp], eax
mov ecx, dword [esp + 0x10]
inc ecx
add ebp, 4
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ebp
test ebx, ebx
jne 0x1010bd3
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
xor edi, edi
test ebx, ebx
jbe 0x1010d63
mov esi, dword [esp + 0x18]
mov edi, ebx
cmp dword [esi], 0
je 0x1010d5d
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x14]
mov eax, dword [esi]
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp]
push 0xffffffffffffffff
mov ecx, ebp
call dword [edx + 0xc]
add esi, 4
dec ebx
jne 0x1010d38
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [esp + 0x18]
mov ecx, edi
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x2c]
mov esi, dword [ecx + 0xc]
xor edx, edx
neg esi
sbb esi, esi
test esi, esi
mov dword [esp + 0x10], edx
je 0x1010e22
mov dword [esp + 0x40], ebx
cmp esi, 0xffffffff
mov ebx, dword [ebp + 0x2c]
mov edx, esi
jne 0x1010db9
mov esi, dword [ebx + 8]
xor eax, eax
test esi, esi
jbe 0x1010db9
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
test edx, edx
jne 0x1010db9
inc eax
add ecx, 4
cmp eax, esi
jb 0x1010dab
mov esi, dword [edx]
test esi, esi
jne 0x1010dde
mov eax, dword [edx + 4]
mov edi, dword [ebx + 8]
inc eax
cmp eax, edi
jae 0x1010dde
mov ecx, dword [ebx + 4]
lea ecx, [ecx + eax*4]
mov esi, dword [ecx]
test esi, esi
jne 0x1010dde
inc eax
add ecx, 4
cmp eax, edi
jb 0x1010dd0
mov eax, dword [edx + 0xc]
test eax, eax
je 0x1010e12
mov ecx, dword [eax]
test ecx, ecx
je 0x1010e12
mov edx, dword [eax + 8]
test edx, edx
je 0x1010e12
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x10]
mov dword [edx], ecx
add edx, 4
mov dword [esp + 0x40], edx
mov edx, dword [eax + 8]
inc edi
push edx
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
test esi, esi
jne 0x1010d95
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
test edx, edx
jbe 0x1010e55
mov esi, ebx
mov edi, edx
cmp dword [esi], 0
je 0x1010e4f
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x14]
mov ecx, dword [esi]
push 0x3e8
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp]
push 0xffffffffffffffff
mov ecx, ebp
call dword [edx + 0xc]
add esi, 4
dec edi
jne 0x1010e2a
push ebx
call fcn.0108e495
mov ebp, dword [esp + 0x18]
add esp, 4
mov esi, dword [ebp + 0x2c]
mov ecx, dword [esi + 0xc]
mov eax, ecx
neg eax
sbb eax, eax
test eax, eax
mov dword [esp + 0x40], ecx
je 0x1010f89
jmp 0x1010e8d
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
jmp 0x1010d2c
mov ecx, dword [esp + 0x40]
test ecx, ecx
jle 0x1010f89
cmp eax, 0xffffffff
mov edx, eax
jne 0x1010eb6
mov edi, dword [esi + 8]
xor eax, eax
test edi, edi
jbe 0x1010eb6
mov ecx, dword [esi + 4]
mov edx, dword [ecx]
test edx, edx
jne 0x1010eb6
inc eax
add ecx, 4
cmp eax, edi
jb 0x1010ea8
cmp dword [edx], 0
jne 0x1010ed9
mov eax, dword [edx + 4]
mov edi, dword [esi + 8]
inc eax
cmp eax, edi
jae 0x1010ed9
mov ecx, dword [esi + 4]
lea ecx, [ecx + eax*4]
cmp dword [ecx], 0
jne 0x1010ed9
inc eax
add ecx, 4
cmp eax, edi
jb 0x1010ecc
mov edi, dword [edx + 0xc]
test edi, edi
mov ebx, dword [edx + 8]
je 0x1010ef5
mov ecx, edi
call fcn.01013a30
push edi
call fcn.0108e495
add esp, 4
jmp 0x1010f73
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x1010f73
mov eax, ebx
shr eax, 4
xor edx, edx
div dword [esi + 8]
mov eax, dword [ecx + edx*4]
test eax, eax
lea ecx, [ecx + edx*4]
je 0x1010f73
cmp dword [eax + 8], ebx
je 0x1010f1f
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x1010f10
jmp 0x1010f73
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [esi + 0x10]
mov dword [eax], ecx
mov dword [esi + 0x10], eax
dec dword [esi + 0xc]
jne 0x1010f73
mov edi, dword [esi + 4]
xor ebx, ebx
cmp edi, ebx
je 0x1010f56
mov eax, dword [esi + 8]
cmp eax, ebx
jbe 0x1010f56
mov ecx, edi
mov edx, eax
mov eax, dword [ecx]
cmp eax, ebx
je 0x1010f50
mov eax, dword [eax]
cmp eax, ebx
jne 0x1010f4a
add ecx, 4
dec edx
jne 0x1010f44
push edi
call fcn.0108e495
mov ecx, dword [esi + 0x14]
add esp, 4
mov dword [esi + 4], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
call fcn.01089a31
mov dword [esi + 0x14], ebx
dec dword [esp + 0x40]
mov esi, dword [ebp + 0x2c]
mov eax, dword [esi + 0xc]
neg eax
sbb eax, eax
test eax, eax
jne 0x1010e89
mov ecx, dword [ebp + 0x2c]
xor ebx, ebx
cmp ecx, ebx
je 0x1010f99
mov edx, dword [ecx]
push 1
call dword [edx + 4]
mov dword [ebp + 0x2c], ebx
mov eax, dword [ebp + 0x14]
cmp eax, 0xffffffff
je 0x1010fea
cmp dword [ebp + 0x24], ebx
je 0x1010fea
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x1010fea
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x14]
mov ecx, dword [ebp + 0x24]
push 0x3e8
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp]
push 0xffffffffffffffff
mov ecx, ebp
mov esi, eax
call dword [edx + 0xc]
cmp esi, ebx
je 0x1010fea
mov eax, dword [ebp + 0x24]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [ebp + 0x24], ebx
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x1010ffb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x14], ebx
mov edx, dword [ebp]
mov ecx, ebp
mov dword [ebp + 8], 3
call dword [edx + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 4