Function at 0x5d531a96
Capabilities:
Create thread
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push esi
mov esi, ecx
xor ecx, ecx
cmp dword [esi + 0xc], ecx
jne 0x5d531aa5
xor eax, eax
inc eax
pop esi
ret
mov eax, dword [esi + 0x14]
cmp dword [eax + 0x18], ecx
je 0x5d531aca
cmp dword [eax + 0x68], ecx
je 0x5d531ac2
push 1
push 0x6d3
push dword [eax + 0x7c]
call dword [sym.imp.ntdll.dll_WinSqmIncrementDWORD]
mov ecx, esi
pop esi
jmp 0x5d5323f9
cmp dword [eax + 0x14], ecx
je 0x5d531aec
cmp dword [eax + 0x68], ecx
je 0x5d531ae4
push 1
push 0x6d3
push dword [eax + 0x7c]
call dword [sym.imp.ntdll.dll_WinSqmIncrementDWORD]
mov ecx, esi
pop esi
jmp fcn.5d531f30
mov eax, 0x80070032
pop esi
ret
push 0x48
mov eax, 0x5d51791a
call fcn.5d5166e7
mov ebx, ecx
mov dword [ebp - 0x54], ebx
xor ecx, ecx
mov byte [ebp - 0x11], cl
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x48], ecx
push ecx
push ecx
mov dword [ebp - 4], ecx
push 0x5d508bf8
push dword [0x5d560dfc]
mov dword [ebp - 0x30], ecx
push dword [0x5d560df8]
mov dword [ebp - 0x18], ecx
call dword [sym.imp.ADVAPI32.dll_EventWrite]
push 0x5d5069c0
push 0x44
call fcn.5d50f318
pop ecx
pop ecx
test eax, eax
je 0x5d532b74
mov ecx, eax
call fcn.5d531593
mov edi, eax
mov dword [ebp - 0x1c], edi
test eax, eax
je 0x5d532b7b
mov eax, dword [ebx + 0x14]
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
mov esi, dword [eax + 0x10]
xor eax, eax
push eax
lea eax, [ebp - 0x20]
push eax
push 0x37
push ecx
mov ecx, esi
call dword [0x5d562560]
call esi
mov esi, eax
mov dword [ebp - 0x1c], edi
test esi, esi
js 0x5d532b80
mov eax, dword [ebx + 0x14]
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
mov esi, dword [eax + 0x10]
xor eax, eax
push eax
lea eax, [ebp - 0x24]
push eax
push 0x73
push ecx
mov ecx, esi
call dword [0x5d562560]
call esi
mov esi, eax
mov ecx, edi
mov dword [ebp - 0x1c], ecx
test esi, esi
js 0x5d532b80
xor eax, eax
mov dword [ebp - 0x1c], ecx
mov byte [ebx + 0x6b], al
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x3c], edi
mov edx, dword [eax + 0x10]
test edx, edx
je 0x5d53260d
lea ecx, [ebp - 0x48]
call fcn.5d5319d2
mov eax, dword [ebp - 0x48]
lea edx, [edi + 0x14]
push edx
mov dword [ebp - 0x38], edx
mov ecx, dword [eax]
mov esi, dword [ecx + 0xc]
lea ecx, [edi + 0x10]
push ecx
mov dword [ebp - 0x28], ecx
mov ecx, esi
push eax
call dword [0x5d562560]
call esi
xor ecx, ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x3c], edi
test eax, eax
jns 0x5d53251d
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], ecx
jmp 0x5d53260d
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x4c], ecx
cmp dword [eax], ecx
jbe 0x5d53260d
mov eax, dword [ebp - 0x28]
mov esi, ecx
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x3c], edi
mov edx, dword [eax]
cmp byte [esi + edx + 0x18], 0
je 0x5d5325f8
cmp dword [esi + edx + 0x14], 2
jne 0x5d5325f8
mov ecx, dword [esi + edx + 4]
mov dword [ebp - 0x50], ecx
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5d562560]
call esi
push 0x208
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [ebp - 0x28]
mov ecx, eax
mov esi, dword [ebp - 0x40]
mov eax, dword [edx]
mov dword [esi + eax], ecx
mov eax, dword [edx]
cmp dword [esi + eax], 0
je 0x5d532b7b
push 0x104
push dword [esi + eax]
push 0x86
push dword [0x5d560df4]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x5d5327a7
mov eax, dword [ebp - 0x28]
xor edx, edx
mov eax, dword [eax]
cmp dword [esi + eax + 0xc], edx
je 0x5d5325f2
mov ecx, dword [ebp - 0x50]
push edx
mov dword [ebp - 0x34], edx
mov eax, dword [ecx]
mov esi, dword [eax + 0x10]
lea eax, [ebp - 0x34]
push eax
push 4
push ecx
mov ecx, esi
call dword [0x5d562560]
call esi
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x5d5325e6
mov byte [ebx + 0x6b], cl
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x4c]
add esi, 0x1c
inc edx
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x4c], edx
cmp edx, dword [ecx]
jb 0x5d53253c
mov eax, dword [ebx + 0x14]
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
mov esi, dword [eax + 0x10]
xor eax, eax
push eax
lea eax, [ebp - 0x2c]
push eax
push 0x40
push ecx
mov ecx, esi
call dword [0x5d562560]
call esi
test eax, eax
js 0x5d53269f
cmp dword [ebp - 0x2c], 0
je 0x5d53269f
xor eax, eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x5d53269f
cmp dword [ebp - 0x4c], 0
je 0x5d53269f
cmp dword [ebp - 0x38], 0
je 0x5d53269f
xor ecx, ecx
lea eax, [ebp - 0x40]
push eax
push ecx
push dword [ebp - 0x38]
mov dword [ebp - 0x40], ecx
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x5d5326a2
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x5d53268c
test byte [eax + 1], 8
je 0x5d5326c3
lea eax, [ebp - 0x40]
inc esi
push eax
push esi
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x5d53267f
mov esi, dword [ebp - 0x18]
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x34], eax
inc eax
mov dword [edi + 0x14], eax
imul eax, eax, 0x1c
cmp dword [edi + 0x10], 0
je 0x5d5326f7
push 0x42
push eax
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
jmp 0x5d532700
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x11], 1
push ecx
push dword [ebp - 0x20]
add eax, 8
mov ecx, ebx
push eax
call fcn.5d532fd9
mov esi, eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x44], eax
test esi, esi
jne 0x5d5326f0
lea ecx, [eax + 1]
mov dword [edi + 0x14], ecx
jmp 0x5d5326a2
add eax, esi
mov dword [edi + 0x14], eax
jmp 0x5d5326a2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
jne 0x5d53271f
cmp byte [ebp - 0x11], al
je 0x5d532717
test esi, esi
je 0x5d532711
mov eax, esi
jmp 0x5d532714
xor eax, eax
inc eax
sub dword [edi + 0x14], eax
dec dword [edi + 0x14]
jmp 0x5d532b7b
cmp byte [ebp - 0x11], 0
mov dword [edi + 0x10], eax
je 0x5d53284e
test esi, esi
jne 0x5d5327c9
imul esi, dword [ebp - 0x44], 0x1c
mov byte [esi + eax + 0x18], 1
mov eax, dword [edi + 0x10]
mov dword [eax + esi + 0x14], 3
mov ecx, dword [edi + 0x10]
mov eax, dword [ebp - 0x24]
mov dword [ecx + esi + 4], eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov ecx, dword [edi + 0x10]
push 0x208
push 0x40
mov dword [ecx + esi + 8], eax
xor eax, eax
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [edi + 0x10]
mov dword [esi + ecx], eax
mov eax, dword [edi + 0x10]
mov eax, dword [esi + eax]
test eax, eax
je 0x5d532b7b
push 0x104
push eax
push 0x85
push dword [0x5d560df4]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jg 0x5d53284e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x5d5327be
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x5d532bf0
jmp 0x5d532b80
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x34]
cmp ecx, eax
jae 0x5d53284e
mov esi, dword [ebp - 0x30]
imul ebx, ecx, 0x1c
add esi, 8
sub eax, ecx
mov dword [ebp - 0x44], eax
mov eax, dword [edi + 0x10]
mov byte [ebx + eax + 0x18], 1
mov eax, dword [edi + 0x10]
mov dword [ebx + eax + 0x14], 4
mov ecx, dword [edi + 0x10]
mov eax, dword [esi - 4]
mov dword [ebx + ecx + 4], eax
push dword [esi - 4]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov ecx, dword [edi + 0x10]
xor edx, edx
mov dword [ebx + ecx + 8], eax
mov dword [esi - 4], edx
mov ecx, dword [edi + 0x10]
mov eax, dword [esi]
mov dword [ebx + ecx + 0xc], eax
cmp dword [esi], edx
je 0x5d532831
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov ecx, dword [edi + 0x10]
xor edx, edx
mov dword [ebx + ecx + 0x10], eax
mov dword [esi], edx
mov ecx, dword [edi + 0x10]
mov eax, dword [esi - 8]
mov dword [ebx + ecx], eax
add ebx, 0x1c
mov dword [esi - 8], edx
add esi, 0xc
sub dword [ebp - 0x44], 1
jne 0x5d5327e1
mov ebx, dword [ebp - 0x54]
imul esi, dword [ebp - 0x34], 0x1c
xor ecx, ecx
mov eax, dword [edi + 0x10]
inc ecx
mov byte [eax + esi + 0x18], cl
mov eax, dword [edi + 0x10]
mov dword [eax + esi + 0x14], ecx
mov ecx, dword [edi + 0x10]
mov eax, dword [ebp - 0x20]
mov dword [ecx + esi + 4], eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov ecx, dword [edi + 0x10]
push 0x208
push 0x40
mov dword [ecx + esi + 8], eax
xor eax, eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [edi + 0x10]
mov dword [esi + ecx], eax
mov eax, dword [edi + 0x10]
mov eax, dword [esi + eax]
test eax, eax
je 0x5d532b7b
push 0x104
push eax
push 0x92
push dword [0x5d560df4]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jle 0x5d5327a7
mov eax, dword [edi + 0x14]
shl eax, 4
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi + 0x38], eax
test eax, eax
je 0x5d532b7b
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x5d53293e
mov byte [ebp - 4], 1
mov eax, dword [eax]
mov esi, dword [eax + 0x20]
mov ecx, esi
call dword [0x5d562560]
mov ecx, dword [ebp - 0x54]
call esi
xor ecx, ecx
mov dword [edi + 0x18], eax
mov dword [ebp - 4], ecx
test eax, eax
je 0x5d53293e
mov eax, dword [eax]
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi + 0x1c], eax
test eax, eax
je 0x5d532b7b
mov eax, dword [edi + 0x18]
xor edx, edx
mov ecx, edx
cmp dword [eax], edx
jbe 0x5d53293e
mov eax, dword [edi + 0x1c]
mov dword [eax + ecx*4], 4
inc ecx
mov eax, dword [edi + 0x18]
cmp ecx, dword [eax]
jb 0x5d53292c
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x5d5329a0
mov byte [ebp - 4], 3
mov eax, dword [eax]
mov esi, dword [eax + 0x20]
mov ecx, esi
call dword [0x5d562560]
mov ecx, dword [ebp - 0x54]
call esi
xor ecx, ecx
mov dword [edi + 0x20], eax
mov dword [ebp - 4], ecx
test eax, eax
je 0x5d5329a0
mov eax, dword [eax]
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi + 0x24], eax
test eax, eax
je 0x5d532b7b
mov eax, dword [edi + 0x20]
xor edx, edx
mov ecx, edx
cmp dword [eax], edx
jbe 0x5d5329a0
mov eax, dword [edi + 0x24]
mov dword [eax + ecx*4], 4
inc ecx
mov eax, dword [edi + 0x20]
cmp ecx, dword [eax]
jb 0x5d53298e
mov ecx, dword [edi + 0x18]
xor eax, eax
test ecx, ecx
je 0x5d5329ab
mov eax, dword [ecx]
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x5d5329b8
cmp dword [ecx], eax
jbe 0x5d5329b8
mov eax, dword [ecx]
test eax, eax
je 0x5d5329d5
mov ecx, dword [ebx + 0x14]
xor edx, edx
cmp dword [ecx + 0x68], edx
je 0x5d5329d5
push eax
push 0x2a85
push dword [ecx + 0x7c]
call dword [sym.imp.ntdll.dll_WinSqmSetDWORD]
lea eax, [edi + 0x34]
mov ecx, ebx
push eax
lea eax, [edi + 0x30]
push eax
lea eax, [edi + 0x2c]
push eax
lea eax, [edi + 0x28]
push eax
call fcn.5d536b24
mov esi, eax
test esi, esi
js 0x5d532b80
push dword [ebx + 0xc]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi + 4], eax
test eax, eax
je 0x5d532b7b
push dword [ebx + 0xc]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x5d5327a7
cmp dword [ebx + 0x10], 0
je 0x5d532a60
push dword [ebx + 0x10]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [edi + 8], eax
test eax, eax
je 0x5d532b7b
push dword [ebx + 0x10]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x5d5327a7
mov eax, dword [ebx + 0x14]
mov ecx, dword [eax + 0x3c]
test ecx, ecx
je 0x5d532aab
lea edx, [ecx + 2]
xor esi, esi
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x5d532a6f
sub ecx, edx
sar ecx, 1
lea esi, [ecx*2 + 2]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, eax
mov dword [edi + 0xc], ecx
test ecx, ecx
je 0x5d532b7b
mov eax, dword [ebx + 0x14]
push esi
push dword [eax + 0x3c]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebx + 0x14]
mov eax, dword [eax + 0x18]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
mov ecx, esi
call dword [0x5d562560]
call esi
mov eax, dword [ebx + 0x14]
push 0x800
mov eax, dword [eax + 0x18]
mov dword [edi], eax
mov eax, dword [ebx + 0x70]
mov dword [edi + 0x3c], eax
xor eax, eax
push eax
push 0x5d509364
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
test ebx, ebx
je 0x5d5327a7
lea eax, [ebp - 0x54]
push eax
xor eax, eax
push eax
push edi
push 0x5d533970
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x5d532b4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x5d532b1a
movzx esi, si
or esi, 0x80070000
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x5d5327bc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, SHCreateMemStream
jmp 0x5d532bf0
xor eax, eax
mov edi, eax
mov dword [ebp - 0x1c], eax
mov esi, 0x8007000e
push dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x5d532bcc
test ebx, ebx
je 0x5d532bc5
mov edi, dword [ebp - 0x18]
lea ebx, [eax + 8]
push dword [ebx - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebx - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ebx, [ebx + 0xc]
sub edi, 1
jne 0x5d532b9d
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x5d532bde
mov ecx, edi
call fcn.5d53175a
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [ebp - 0x48]
call fcn.5d512630
mov eax, esi
call fcn.5d51662e
ret