Function at 0x4ae058
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
push ebx
push esi
push edi
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov cl, byte [eax + 9]
mov eax, dword [ebp - 4]
mov dl, byte [eax + 8]
mov eax, dword [ebp - 4]
mov al, byte [eax + 2]
call fcn.004adf08
mov esi, eax
xor eax, eax
mov dword [ebp - 0x10], eax
mov byte [ebp - 0x11], 0
xor edx, edx
push ebp
push 0x4ae2f8
push dword fs:[edx]
mov dword fs:[edx], esp
test esi, esi
jne 0x4ae0a7
mov eax, dword [ebp - 4]
mov byte [eax + 1], 0x82
jmp 0x4ae2dc
mov eax, dword [ebp - 4]
test byte [eax + 3], 0x40
je 0x4ae112
mov edx, 0x6c
mov eax, 0x40
call fcn.00407dfc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4ae0d9
mov eax, dword [ebp - 4]
mov byte [eax + 1], 4
call fcn.0040366c
jmp 0x4ae307
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov edx, 0x6c
call fcn.00402bf4
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], esi
push 0
push 0
push 0xffffffffffffffff
push 0
call sub.kernel32.dll_CreateEventA
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x10]
lea ebx, [eax + 0x1c]
jmp 0x4ae115
lea ebx, [ebp - 0x64]
mov eax, ebx
xor ecx, ecx
mov edx, 0x50
call fcn.00402bf4
mov word [ebx], 0x2c
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x15]
mov byte [ebx + 6], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 5
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov dword [ebx + 0x14], eax
lea eax, [ebx + 0x30]
sub eax, ebx
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 4]
xor ecx, ecx
mov cl, byte [eax + 0x15]
lea edx, [ebx + 0x1c]
mov eax, dword [ebp - 4]
add eax, 0x30
call fcn.00402858
mov edi, 0x50
mov byte [ebx + 2], 4
mov eax, dword [ebp - 4]
mov al, byte [eax + 3]
and al, 0x18
sub al, 1
jb 0x4ae187
sub al, 7
je 0x4ae18d
sub al, 8
je 0x4ae193
jmp 0x4ae197
mov byte [ebx + 8], 2
jmp 0x4ae197
mov byte [ebx + 8], 1
jmp 0x4ae197
mov byte [ebx + 8], 0
mov eax, dword [ebp - 4]
test byte [eax + 3], 0x40
je 0x4ae212
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push ebx
push edi
push ebx
push 0x4d014
mov eax, dword [esi]
push eax
call sub.kernel32.dll_DeviceIoControl
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 6], al
cmp byte [ebp - 6], 0
jne 0x4ae200
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3e5
jne 0x4ae200
mov edx, dword [ebp - 4]
xor eax, eax
mov byte [edx + 1], al
xor ebx, ebx
mov bl, al
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
push 0x4adfd8
push 0
push 0
call sub.kernel32.dll_CreateThread_1
call fcn.0040366c
jmp 0x4ae307
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
mov byte [ebp - 0x11], 1
jmp 0x4ae232
push 0
lea eax, [ebp - 0xc]
push eax
push edi
push ebx
push edi
push ebx
push 0x4d014
mov eax, dword [esi]
push eax
call sub.kernel32.dll_DeviceIoControl
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 6], al
cmp byte [ebp - 6], 0
je 0x4ae27b
cmp byte [ebx + 2], 0
jne 0x4ae24a
mov eax, dword [ebp - 4]
mov byte [eax + 1], 1
jmp 0x4ae2dc
mov eax, dword [ebp - 4]
mov byte [eax + 1], 4
mov al, byte [ebx + 2]
mov edx, dword [ebp - 4]
mov byte [edx + 0x17], al
cmp byte [ebx + 2], 2
jne 0x4ae2dc
mov al, byte [ebx + 7]
test al, al
jbe 0x4ae2dc
xor ecx, ecx
mov cl, al
mov eax, dword [ebp - 4]
lea edx, [eax + 0x40]
lea eax, [ebx + 0x30]
call fcn.00402858
jmp 0x4ae2dc
mov eax, dword [ebp - 4]
mov byte [eax + 1], 4
mov eax, dword [ebp - 4]
mov byte [eax + 0x17], 4
call sub.kernel32.dll_GetLastError_1
cmp byte [ebp - 5], 0
jne 0x4ae2dc
cmp eax, 0x456
je 0x4ae2a0
cmp eax, 6
jne 0x4ae2dc
cmp eax, 6
je 0x4ae2ad
mov eax, dword [esi]
push eax
call sub.kernel32.dll_CloseHandle_1
mov dword [esi], 0xffffffff
cmp byte [esi + 8], 0
je 0x4ae2c9
mov cl, byte [esi + 7]
mov dl, byte [esi + 6]
mov al, byte [esi + 5]
call fcn.004adb44
mov dword [esi], eax
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.004ae058
mov ebx, eax
call fcn.0040366c
jmp 0x4ae307
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4ae2ff
cmp byte [ebp - 0x11], 0
je 0x4ae2f7
mov eax, dword [ebp - 0x10]
call fcn.00407e28
ret
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret