Function at 0x40775d
Capabilities:
Create thread
Terminate thread

Disassembly:
push 0x40
mov eax, 0x421605
call fcn.00421269
mov dword [ebp - 0x30], ecx
and dword [ebp - 4], 0
mov esi, 0x10000
push esi
call fcn.00415646
pop ecx
push 0
push esi
mov ebx, eax
push ebx
push 0x10
call dword [0x42fb48]
mov edi, 0xc0000004
jmp 0x4077aa
add esi, esi
push esi
push ebx
call fcn.00415620
pop ecx
pop ecx
push 0
push esi
mov ebx, eax
push ebx
push 0x10
call dword [0x42fb48]
cmp eax, edi
je 0x407791
test eax, eax
js 0x407998
and dword [ebp - 0x34], 0
cmp dword [ebx], 0
jbe 0x407998
lea ecx, [ebx + 4]
mov dword [ebp - 0x38], ecx
and dword [ebp - 0x2c], 0
lea edi, [ebp - 0x4c]
mov esi, ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push dword [ebp - 0x4c]
push 0
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x407980
push 2
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
movzx eax, word [ebp - 0x46]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
call edi
test esi, esi
je 0x407980
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x40797b
push 0x2000
call fcn.00415646
and dword [0x42fb2c], 0
mov esi, eax
or dword [0x42fb30], 0xffffffff
pop ecx
mov ecx, dword [ebp - 0x2c]
push dword [0x42fb54]
mov dword [ebp - 0x3c], esi
mov dword [0x42fb20], ecx
mov dword [0x42fb24], esi
mov dword [0x42fb28], 0x2000
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x64
push dword [0x42fb50]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4078b9
push 1
push dword [0x42fb4c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [0x42fb4c]
call edi
xor eax, eax
push eax
push eax
push eax
push 0x40735f
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x42fb4c], eax
jmp 0x40797b
cmp dword [0x42fb30], 0
jl 0x407974
mov eax, dword [esi]
mov ecx, dword [esi + 4]
test ax, ax
je 0x407974
and dword [ebp - 0x28], 0
xor edx, edx
and dword [ebp - 0x18], 0
movzx eax, ax
shr eax, 1
push eax
push ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], dx
call fcn.00406d34
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.004073a8
mov esi, dword [ebp + 8]
jmp 0x407960
push ecx
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.004079c6
cmp eax, 0xffffffff
je 0x40795d
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx]
cmp eax, dword [ecx + 4]
je 0x407933
mov edx, dword [ebp - 0x4c]
cmp dword [eax], edx
je 0x40795d
add eax, 4
cmp eax, dword [ecx + 4]
jne 0x407927
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [ebp - 0x4c]
cmp edx, eax
je 0x40795d
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
je 0x407953
mov dword [eax], edx
add dword [ecx + 4], 4
jmp 0x40795d
lea edx, [ebp - 0x4c]
push edx
push eax
call fcn.00407ba1
add esi, 0x18
cmp esi, dword [ebp + 0xc]
jne 0x407909
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.00406c39
mov esi, dword [ebp - 0x3c]
push esi
call fcn.0041562b
pop ecx
push dword [ebp - 0x2c]
call edi
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
inc eax
add ecx, 0x10
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], ecx
cmp eax, dword [ebx]
jb 0x4077c9
push ebx
call fcn.0041562b
pop ecx
lea ecx, [ebp + 8]
call fcn.00406ce2
call fcn.00421227
ret