Function at 0x40a170
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438f70
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x449af0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
push 4
mov dword [ebp - 4], 0
call fcn.00412566
mov edi, eax
add esp, 4
test edi, edi
je 0x40a488
mov dword [edi], vtable.CFileProc.0
mov eax, dword [0x44e618]
add eax, 0xfffffff0
push eax
call fcn.00401f40
lea ebx, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x14]
push eax
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.0040ef20
lea ecx, [ebp - 0x14]
call fcn.0040ed70
cmp eax, 1
jne 0x40a2d5
mov edx, dword [edi]
push eax
mov eax, dword [edx]
mov ecx, edi
call eax
push 0x440380
lea ecx, [ebp - 0x18]
call fcn.00403ce0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a22a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0040f8f0
push 0x43f458
push 0x440398
call fcn.0040f9c0
mov eax, dword [esi + 0x184]
add esp, 8
test eax, eax
je 0x40a274
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
mov edx, dword [eax + 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov eax, dword [ebp - 0x18]
mov ecx, dword [esi + 0x184]
mov edx, dword [ecx + 0x2c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
cmp dword [esi + 0x180], 0
jne 0x40a28b
push 0
push 0
push 0x4403b8
call fcn.00416e37
mov eax, dword [esi + 0x20]
push 0
push 0
push 0xc02
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov byte [ebp - 4], 0
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a2be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x44e61c]
add eax, 0xfffffff0
push eax
call fcn.00401f40
lea ebx, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x18]
push ecx
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.0040ef20
lea ecx, [ebp - 0x18]
call fcn.0040ed70
cmp eax, 1
jne 0x40a3ad
mov edx, dword [edi]
push eax
mov eax, dword [edx]
mov ecx, edi
call eax
push 0x4403ec
lea ecx, [ebp - 0x1c]
call fcn.00403ce0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a341
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0040f8f0
push 0x43f458
push 0x440404
call fcn.0040f9c0
add esp, 8
call fcn.004081b0
push 0
push 0
push 0x4403b8
call fcn.00416e37
mov ecx, dword [esi + 0x20]
push 0
push 0
push 0xc02
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a39e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
jmp 0x40a2a5
push 0x440424
lea ecx, [ebp - 0x1c]
call fcn.00403ce0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a3d9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call fcn.0040c600
mov edx, dword [edi]
test eax, eax
mov eax, dword [edx]
push 1
mov ecx, edi
jne 0x40a443
call eax
push 0x440438
lea ecx, [ebp - 0x1c]
call fcn.00403ce0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a419
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0040f8f0
push 0x43f458
push 0x440450
call fcn.0040f9c0
add esp, 8
call fcn.004081b0
push 0
push 0
push 0x440468
jmp 0x40a366
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a465
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a488
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret