Function at 0x40a480
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43b7e4
push eax
mov dword fs:[0], esp
sub esp, 0x68
push esi
mov esi, ecx
cmp dword [esi + 8], 0
je 0x40a69e
mov eax, dword [esi + 0x2c]
mov byte [esi + 0x40], 0
test eax, eax
je 0x40a4c3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x2c], 0
mov eax, dword [esi + 0x24]
test eax, eax
je 0x40a4d8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x24], 0
push ebx
push edi
xor edi, edi
lea ebx, [esi + 0x41]
mov ecx, 0xffffffbf
mov dword [ebp - 0x14], edi
mov eax, 0x493fa8
sub ecx, esi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], ecx
cmp byte [ebx], 0
je 0x40a5e4
mov edi, dword [esi]
lea ecx, [ebp - 0x34]
push 9
xor eax, eax
mov dword [ebp - 0x24], 0
push 0x48d138
mov dword [ebp - 0x20], 7
mov word [ebp - 0x34], ax
call fcn.00402710
mov eax, dword [ebp - 0x10]
lea ecx, [edi + 0x10]
push 0x48d134
mov dword [ebp - 4], 0
push dword [eax]
lea eax, [ebp - 0x34]
push 2
push 0
push eax
call fcn.004072e0
push eax
lea eax, [ebp - 0x74]
push eax
lea ecx, [edi + 0x10]
call fcn.00407920
lea ecx, [ebp - 0x74]
mov edi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], eax
call fcn.00404b30
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x20]
cmp edx, 8
jb 0x40a5a1
mov ecx, dword [ebp - 0x34]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a597
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a70c
push edx
push ecx
call fcn.0041ee0c
add esp, 8
push ecx
push dword [ebp - 0x18]
mov ecx, esi
push edi
call fcn.0040a3f0
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40a5e1
mov edx, dword [esi + 0x30]
push 0x18f
push 0
mov ecx, dword [edx + edi]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x18]
mov al, byte [edx + edi + 4]
mov byte [ecx + 4], al
mov eax, dword [esi + 0x30]
add eax, edi
push eax
call fcn.004213e0
add esp, 0xc
mov byte [ebx], 0
mov eax, dword [ebp - 0x10]
add eax, 4
inc ebx
mov dword [ebp - 0x10], eax
add edi, 0x18f
mov eax, dword [ebp - 0x1c]
add eax, ebx
mov dword [ebp - 0x14], edi
cmp eax, 4
jge 0x40a606
mov eax, dword [ebp - 0x10]
jmp 0x40a4f4
mov eax, dword [esi]
mov edi, dword [eax + 4]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x49aa68]
cmp eax, dword [ecx + 4]
jle 0x40a659
push 0x49aa68
call fcn.0041f34c
add esp, 4
cmp dword [0x49aa68], 0xffffffff
jne 0x40a659
mov dword [ebp - 4], 1
call fcn.004014e0
push 0x43c0d0
call fcn.0041f197
push 0x49aa68
call fcn.0041f302
add esp, 8
mov eax, dword [0x49aa60]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], 0
cmp eax, 0xffffffff
jne 0x40a6ad
mov edi, 0xc00000c0
lea ebx, [esi + 4]
test edi, edi
jns 0x40a69c
mov ecx, ebx
call fcn.0040a720
mov dword [esi + 0x30], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x28], 0
pop edi
pop ebx
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 0
push 4
lea ecx, [ebp - 0x18]
push ecx
push 0x8005e020
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40a6d1
xor edi, edi
jmp 0x40a6e1
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0xbf4]
test edi, edi
js 0x40a672
lea ebx, [esi + 4]
mov ecx, ebx
call fcn.0040a720
mov dword [esi + 0x30], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x28], 0
jmp 0x40a675
call fcn.00424b90
int3