Function at 0x40477a
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x70
push 0xfffffffffffffffe
push 0x40e440
push 0x40bdd1
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x410040]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x7c]
xor ebx, ebx
cmp dword [eax + 0x14], ebx
je 0x404c57
cmp dword [ecx + 0x14], ebx
je 0x404c57
cmp dword [eax + 0x18], 8
jb 0x4047d1
mov eax, dword [eax + 4]
jmp 0x4047d4
add eax, 4
mov dword [ebp + 0x54], eax
cmp dword [ecx + 0x18], 8
jb 0x4047e5
mov eax, dword [ecx + 4]
mov dword [ebp + 0x38], eax
jmp 0x4047eb
add ecx, 4
mov dword [ebp + 0x38], ecx
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x44], ebx
mov dword [ebp + 0x68], ebx
mov dword [ebp + 0x48], ebx
mov dword [ebp + 0x60], ebx
mov dword [ebp + 0x50], ebx
mov dword [ebp + 0x5c], ebx
mov dword [ebp + 0x7c], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp + 0x6c], ebx
mov dword [ebp + 0x58], ebx
mov dword [ebp + 0x64], ebx
mov dword [ebp + 0x28], ebx
mov dword [ebp - 4], ebx
push str.LookupAccountNameW
mov edi, dword [ebp + 0x78]
push dword [edi]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
mov dword [ebp + 0x10], eax
cmp eax, ebx
je 0x404bf4
push str.GetFileSecurityW
push dword [edi]
call esi
mov dword [ebp + 0x2c], eax
cmp eax, ebx
je 0x404bf4
push str.InitializeSecurityDescriptor
push dword [edi]
call esi
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x404bf4
push str.GetSecurityDescriptorDacl
push dword [edi]
call esi
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x404bf4
push str.GetAclInformation
push dword [edi]
call esi
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x404bf4
push str.InitializeAcl
push dword [edi]
call esi
mov dword [ebp + 0xc], eax
cmp eax, ebx
je 0x404bf4
push str.GetAce
push dword [edi]
call esi
mov dword [ebp + 0x30], eax
cmp eax, ebx
je 0x404bf4
push str.EqualSid
push dword [edi]
call esi
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x404bf4
push str.AddAce
push dword [edi]
call esi
mov dword [ebp + 0x14], eax
cmp eax, ebx
je 0x404bf4
push str.AddAccessAllowedAce
push dword [edi]
call esi
mov dword [ebp + 0x34], eax
cmp eax, ebx
je 0x404bf4
push str.SetSecurityDescriptorDacl
push dword [edi]
call esi
mov dword [ebp + 0x40], eax
cmp eax, ebx
je 0x404bf4
push str.SetFileSecurityW
push dword [edi]
call esi
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x404bf4
push str.GetSecurityDescriptorControl
push dword [edi]
call esi
mov dword [ebp], eax
cmp eax, ebx
je 0x404bf4
push str.GetLengthSid
push dword [edi]
call esi
mov dword [ebp + 0x3c], eax
cmp eax, ebx
je 0x404bf4
lea eax, [ebp + 4]
push eax
lea eax, [ebp + 0x44]
push eax
push ebx
lea eax, [ebp + 0x48]
push eax
push ebx
push dword [ebp + 0x38]
push ebx
call dword [ebp + 0x10]
cmp eax, ebx
jne 0x404bf4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x404bf4
push dword [ebp + 0x48]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call edi
mov dword [ebp + 0x68], eax
cmp eax, ebx
je 0x404bf4
mov eax, dword [ebp + 0x44]
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp + 0x4c], eax
cmp eax, ebx
je 0x404bf4
lea eax, [ebp + 4]
push eax
lea eax, [ebp + 0x44]
push eax
push dword [ebp + 0x4c]
lea eax, [ebp + 0x48]
push eax
push dword [ebp + 0x68]
push dword [ebp + 0x38]
push ebx
call dword [ebp + 0x10]
cmp eax, ebx
je 0x404bf4
lea eax, [ebp + 0x50]
push eax
push ebx
push ebx
push 4
push dword [ebp + 0x54]
call dword [ebp + 0x2c]
cmp eax, ebx
jne 0x404bf4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x404bf4
push dword [ebp + 0x50]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp + 0x60], eax
cmp eax, ebx
je 0x404bf4
lea eax, [ebp + 0x50]
push eax
push dword [ebp + 0x50]
push dword [ebp + 0x60]
push 4
push dword [ebp + 0x54]
call dword [ebp + 0x2c]
cmp eax, ebx
je 0x404bf4
push 1
lea eax, [ebp - 0x40]
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x404bf4
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp + 0x5c]
push eax
lea eax, [ebp + 0x7c]
push eax
push dword [ebp + 0x60]
call dword [ebp + 8]
test eax, eax
je 0x404bf4
mov dword [ebp + 0x1c], ebx
mov dword [ebp + 0x24], ebx
mov dword [ebp + 0x20], 8
cmp dword [ebp + 0x5c], ebx
jne 0x404a56
mov dword [ebp + 0x7c], ebx
cmp dword [ebp + 0x7c], ebx
je 0x404a71
push 2
push 0xc
lea eax, [ebp + 0x1c]
push eax
push dword [ebp + 0x5c]
call dword [ebp - 0x28]
test eax, eax
je 0x404bf4
push dword [ebp + 0x68]
call dword [ebp + 0x3c]
mov ecx, dword [ebp + 0x20]
lea eax, [eax + ecx + 8]
mov dword [ebp + 0x3c], eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp + 0x6c], eax
cmp eax, ebx
je 0x404bf4
push 2
pop edi
push edi
push dword [ebp + 0x3c]
push eax
call dword [ebp + 0xc]
test eax, eax
je 0x404bf4
mov dword [ebp + 0x18], ebx
cmp dword [ebp + 0x7c], ebx
je 0x404b0f
cmp dword [ebp + 0x1c], ebx
je 0x404b0f
mov dword [ebp + 0x64], ebx
mov eax, dword [ebp + 0x64]
cmp eax, dword [ebp + 0x1c]
jae 0x404b0f
lea ecx, [ebp + 0x58]
push ecx
push eax
push dword [ebp + 0x5c]
call dword [ebp + 0x30]
test eax, eax
je 0x404bf4
mov eax, dword [ebp + 0x58]
test byte [eax + 1], 0x10
jne 0x404b0f
add eax, 8
push eax
push dword [ebp + 0x68]
call dword [ebp - 0x1c]
test eax, eax
jne 0x404b0a
mov eax, dword [ebp + 0x58]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push edi
push dword [ebp + 0x6c]
call dword [ebp + 0x14]
test eax, eax
je 0x404bf4
inc dword [ebp + 0x18]
inc dword [ebp + 0x64]
jmp 0x404abb
push dword [ebp + 0x68]
mov eax, 0x10000000
push eax
push edi
push dword [ebp + 0x6c]
call dword [ebp + 0x34]
test eax, eax
je 0x404bf4
cmp dword [ebp + 0x7c], ebx
je 0x404b6b
cmp dword [ebp + 0x1c], ebx
je 0x404b6b
mov eax, dword [ebp + 0x64]
cmp eax, dword [ebp + 0x1c]
jae 0x404b6b
lea ecx, [ebp + 0x58]
push ecx
push eax
push dword [ebp + 0x5c]
call dword [ebp + 0x30]
test eax, eax
je 0x404bf4
mov eax, dword [ebp + 0x58]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push edi
push dword [ebp + 0x6c]
call dword [ebp + 0x14]
test eax, eax
je 0x404bf4
inc dword [ebp + 0x64]
jmp 0x404b31
push ebx
push dword [ebp + 0x6c]
push 1
lea eax, [ebp - 0x40]
push eax
call dword [ebp + 0x40]
test eax, eax
je 0x404bf4
push str.SetSecurityDescriptorControl
mov eax, dword [ebp + 0x78]
push dword [eax]
call esi
mov dword [ebp + 0x34], eax
cmp eax, ebx
je 0x404bdb
xor esi, esi
xor edi, edi
mov dword [ebp + 0x78], ebx
mov dword [ebp + 0x40], ebx
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp + 0x78]
push eax
push dword [ebp + 0x60]
call dword [ebp]
test eax, eax
je 0x404bf4
test word [ebp + 0x78], 0x400
je 0x404bba
mov eax, 0x500
jmp 0x404bc5
mov eax, 0x1000
test word [ebp + 0x78], ax
je 0x404bc9
mov edi, eax
mov esi, eax
cmp si, bx
je 0x404bdb
push edi
push esi
lea eax, [ebp - 0x40]
push eax
call dword [ebp + 0x34]
test eax, eax
je 0x404bf4
lea eax, [ebp - 0x40]
push eax
push 4
pop eax
push eax
push dword [ebp + 0x54]
call dword [ebp - 0x20]
test eax, eax
je 0x404bf4
mov dword [ebp + 0x28], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.00404c0a
cmp dword [ebp + 0x28], ebx
setne al
jmp 0x404c59
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret 8