Function at 0x40b5d0
Capabilities:
Get file attributes

Disassembly:
sub esp, 0x38
push ebp
push esi
push edi
mov edi, ecx
xor esi, esi
cmp dword [edi + 0x18], esi
mov dword [esp + 0x2c], edi
jne 0x40b613
mov ecx, dword [edi + 0x10]
cmp ecx, esi
je 0x40b613
mov ebp, dword [esp + 0x4c]
cmp dword [ebp + 0x18], 0x10
jb 0x40b5f9
mov eax, dword [ebp + 4]
jmp 0x40b5fc
lea eax, [ebp + 4]
mov edx, dword [edi + 0x14]
push edx
push eax
push esi
call ecx
add esp, 0xc
neg eax
sbb eax, eax
add eax, 1
mov dword [edi + 0x18], eax
jmp 0x40b617
mov ebp, dword [esp + 0x4c]
lea eax, [esp + 0x18]
push eax
push 0x20
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40b660
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_process_token_to_adjust_priveleges___error_d
push 0x400
push 0x4932a8
call fcn.00401300
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x38
ret 0x10
mov ecx, dword [esp + 0x18]
push 1
push str.SeTakeOwnershipPrivilege
push ecx
mov ecx, edi
call fcn.0040a6a0
test eax, eax
jne 0x40b699
push str.Could_not_set_SE_TAKE_OWNERSHIP_NAME_privilege
push 0x400
push 0x4932a8
call fcn.00401300
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x38
ret 0x10
cmp dword [ebp + 0x18], 0x10
push ebx
jb 0x40b6ac
mov eax, dword [ebp + 4]
lea ebx, [ebp + 4]
mov dword [esp + 0x24], ebx
jmp 0x40b6b5
lea eax, [ebp + 4]
mov dword [esp + 0x24], eax
mov ebx, eax
mov edx, dword [edi + 4]
push esi
push esi
push esi
push edx
push 1
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
mov esi, eax
xor ecx, ecx
cmp esi, ecx
jne 0x40b9b6
cmp dword [esp + 0x58], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
jne 0x40b737
cmp dword [ebp + 0x18], 0x10
jb 0x40b6eb
mov eax, dword [ebx]
jmp 0x40b6ed
mov eax, ebx
lea edx, [esp + 0x14]
push edx
push ecx
lea edx, [esp + 0x20]
push edx
push ecx
push ecx
push 4
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoA]
mov esi, eax
test esi, esi
je 0x40b735
cmp dword [ebp + 0x18], 0x10
jb 0x40b715
mov eax, dword [ebx]
jmp 0x40b717
mov eax, ebx
push esi
push eax
push str.Error_getting_security_info_for__s.__error_d
push 0x400
push 0x4932a8
call fcn.00401300
add esp, 0x14
jmp 0x40b9d3
xor ecx, ecx
push ecx
mov dword [esp + 0x14], ecx
call fcn.0042f9cf
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
mov edx, 0x20
mul edx
seto cl
mov dword [esp + 0x2c], 0
neg ecx
or ecx, eax
push ecx
call fcn.0042f9cf
add esp, 8
test eax, eax
mov dword [esp + 0x2c], eax
je 0x40b854
mov ecx, dword [ebp + 4]
mov edi, dword [ecx]
lea esi, [eax + 8]
mov eax, dword [ebp + 4]
cmp edi, eax
je 0x40b814
xor ebx, ebx
xor ebp, ebp
cmp edi, eax
jne 0x40b799
call fcn.00453b27
mov eax, dword [esp + 0x4c]
cmp edi, dword [eax + 4]
mov edx, dword [edi + 8]
mov dword [esp + 0x44], edx
jne 0x40b7ae
call fcn.00453b27
mov ecx, dword [edi + 0xc]
mov dword [esi - 8], ecx
mov ecx, dword [esp + 0x50]
mov dword [esi - 4], 1
call fcn.00405780
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edx, dword [esp + 0x44]
sub eax, 0x10
neg eax
sbb eax, eax
add dword [esp + 0x28], 1
and eax, 0xfffffffd
add eax, 3
mov dword [esi + 4], ebp
mov dword [esi], eax
mov dword [esi + 8], ebx
xor eax, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [esi + 0x14], edx
add esi, 0x20
cmp edi, dword [eax + 4]
jne 0x40b805
call fcn.00453b27
mov edi, dword [edi]
mov ebp, dword [esp + 0x4c]
mov ebx, dword [esp + 0x24]
jmp 0x40b781
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40b82d
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidAcl]
test eax, eax
je 0x40b82d
mov eax, dword [esp + 0x18]
jmp 0x40b82f
xor eax, eax
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x10]
push ecx
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclA]
mov ecx, dword [esp + 0x2c]
push ecx
mov esi, eax
call fcn.0042f9ca
add esp, 4
test esi, esi
jne 0x40b8a9
cmp dword [esp + 0x10], esi
jne 0x40b8a9
push 0x88
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 4
push 0x88
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x40b8a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x40b891
mov esi, 0x80004005
push esi
push str.Error_Initializing_new_Dacl.__error___d
push 0x400
push 0x4932a8
call fcn.00401300
add esp, 0x10
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40b8c4
push eax
call fcn.0042f9ca
add esp, 4
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
test esi, esi
jne 0x40b989
mov edi, dword [esp + 0x58]
test edi, edi
mov ecx, 4
je 0x40b8de
mov ecx, 0x20000004
mov esi, dword [esp + 0x50]
cmp dword [esi + 0x18], 0x10
jb 0x40b8ec
mov eax, dword [ebx]
jmp 0x40b8ee
mov eax, ebx
mov edx, dword [esp + 0x10]
push 0
push edx
push 0
push 0
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
test eax, eax
jne 0x40b962
mov eax, dword [esp + 0x54]
test eax, eax
je 0x40b920
mov ecx, dword [esp + 0x30]
push edi
push eax
push esi
push ebp
call fcn.0040c400
test eax, eax
je 0x40b948
cmp dword [esi + 0x18], 0x10
jb 0x40b92a
mov eax, dword [ebx]
jmp 0x40b92c
mov eax, ebx
push eax
push str.Successfully_set_permissions_on__s
push 1
push 0x4932a8
call fcn.00401300
mov dword [esp + 0x30], 1
jmp 0x40b99e
cmp dword [esi + 0x18], 0x10
jb 0x40b958
mov eax, dword [ebx]
push eax
push str.Setting_permissions_on_subFolder_of__s_failed
jmp 0x40b98f
mov eax, ebx
push eax
push str.Setting_permissions_on_subFolder_of__s_failed
jmp 0x40b98f
cmp dword [esi + 0x18], 0x10
jb 0x40b96c
mov ecx, dword [ebx]
jmp 0x40b96e
mov ecx, ebx
push eax
push ecx
push str.Error_Setting_security_info_on__s.__error_d
push 0x400
push 0x4932a8
call fcn.00401300
add esp, 0x14
jmp 0x40b9a1
push esi
push str.Error_adding_entries_to_ACL.__error_d
push 0x400
push 0x4932a8
call fcn.00401300
add esp, 0x10
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebp, dword [esp + 0x50]
mov edi, dword [esp + 0x30]
jmp 0x40b9d3
push esi
push str.Could_not_set_DACL_information_to_File_Folder_Process_and_thus_adjust_priveleges___error_d
push 8
push 0x4932a8
call fcn.00401300
add esp, 0x10
mov dword [esp + 0x20], 0
mov ecx, dword [esp + 0x1c]
push 0
push str.SeTakeOwnershipPrivilege
push ecx
mov ecx, edi
call fcn.0040a6a0
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 0x18], 0
jne 0x40ba20
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x40ba20
cmp dword [ebp + 0x18], 0x10
jb 0x40ba08
mov eax, dword [ebx]
jmp 0x40ba0a
mov eax, ebx
mov edx, dword [edi + 0x14]
push edx
push eax
push 0xa
call ecx
add esp, 0xc
neg eax
sbb eax, eax
add eax, 1
mov dword [edi + 0x18], eax
mov eax, dword [esp + 0x20]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x38
ret 0x10