Function at 0x4d1ba0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5259f0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push esi
push edi
mov eax, dword [0x588eb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x58acb8
mov dword [ebp - 0x20], vtable.nfapi::AutoLock.0
mov dword [ebp - 0x1c], 0x58acb8
call edi
cmp byte [0x58ad1c], 0
mov dword [ebp - 4], 0
je 0x4d1bf9
xor edi, edi
jmp 0x4d1eb4
push 1
call fcn.004cd2a0
add esp, 4
test al, al
jne 0x4d1c11
mov edi, 0xfffffffb
jmp 0x4d1eb4
mov esi, dword [ebp + 8]
push esi
call fcn.004cd3a0
add esp, 4
cmp eax, 0xffffffff
jne 0x4d1c29
or edi, eax
jmp 0x4d1eb4
push 0x104
push esi
push 0x58ad68
mov dword [0x580078], eax
call fcn.0050e9a0
add esp, 0xc
mov dword [ebp - 0x10], 0
xorps xmm0, xmm0
movups xmmword [0x58ae6c], xmm0
push 0
push 0
push 0
push 0
movups xmmword [0x58ae7c], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
mov dword [ebp - 0x14], esi
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 1
push eax
push 0
push 0x20
push 0x58ae6c
push 0
push 0
push 0x12c800
push dword [0x580078]
xorps xmm0, xmm0
mov dword [ebp - 0x24], esi
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x2c], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4d1cc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4d1cc2
mov ecx, 0x580078
call fcn.004cfcd0
jmp 0x4d1ea5
push 1
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [0x580078]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4d1d00
mov eax, dword [0x580078]
cmp eax, 0xffffffff
je 0x4d1ea5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x580078], 0xffffffff
jmp 0x4d1ea5
cmp dword [ebp - 0x10], 0x20
je 0x4d1d15
mov ecx, 0x580078
call fcn.004cfcd0
jmp 0x4d1ea5
push 0x3001
mov dword [0x58ad24], 0x58ad20
mov dword [0x58ad20], 0x58ad20
mov dword [0x58ad30], 0x58ad2c
mov dword [0x58ad2c], 0x58ad2c
call fcn.004d2fb0
push 0x3001
mov dword [0x58aca8], eax
call fcn.004d2fb0
add esp, 8
mov dword [0x58acac], eax
call fcn.004d3150
push 0x58acb8
mov dword [0x58ad3c], 0
mov dword [0x58ad48], 0
mov dword [0x58ad54], 0
mov dword [0x58ad60], 0
mov dword [0x58ad38], 0x58ad34
mov dword [0x58ad34], 0x58ad34
mov dword [0x58ad44], 0x58ad40
mov dword [0x58ad40], 0x58ad40
mov dword [0x58ad50], 0x58ad4c
mov dword [0x58ad4c], 0x58ad4c
mov dword [0x58ad5c], 0x58ad58
mov dword [0x58ad58], 0x58ad58
mov byte [0x58ad1c], 1
call edi
cmp dword [0x580078], 0xffffffff
je 0x4d1e95
cmp dword [0x58007c], 0xffffffff
jne 0x4d1e95
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4d1e95
push dword [0x58006c]
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [0x58acb0], eax
call edi
push dword [0x580068]
call edi
push dword [0x580064]
call edi
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0x4d2b10
push 0
push 0
call fcn.0050ec18
add esp, 0x18
test eax, eax
jne 0x4d1e72
push dword [0x580068]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x58acb8
mov dword [0x58007c], 0xffffffff
call eax
jmp 0x4d1ea0
push 0xffffffffffffffff
push dword [0x580064]
mov dword [0x58007c], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x58acb8
call eax
xor edi, edi
jmp 0x4d1ea8
push 0x58acb8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.004d1960
or edi, 0xffffffff
cmp esi, 0xffffffff
je 0x4d1eb4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x58acb8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret