Function at 0x40a1c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x43617c
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x448fb0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [esp + 0x80]
xor ebp, ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebp
cmp eax, 1
jne 0x40a20c
mov eax, dword [ebx + 4]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], ebp
jmp 0x40a224
cmp eax, 2
jne 0x40a76d
mov ecx, dword [ebx + 8]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x3c], 1
mov esi, dword [esp + 0x1c]
cmp esi, ebp
jne 0x40a233
xor eax, eax
jmp 0x40a772
push 2
push 0xc
lea edx, [esp + 0x6c]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x40a25a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x18], eax
mov eax, 0x1d
jmp 0x40a772
mov eax, dword [esp + 0x64]
xor ecx, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], ecx
cmp eax, ebp
jbe 0x40a22c
jmp 0x40a276
mov esi, dword [esp + 0x1c]
xor ebp, ebp
lea eax, [esp + 0x24]
push eax
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x40a247
mov ecx, dword [esp + 0x24]
add ecx, 8
push ecx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x40a250
mov edx, dword [esp + 0x24]
test byte [edx + 1], 0x10
jne 0x40a718
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], ebp
call fcn.0041583d
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
je 0x40a72f
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov dword [esp + 0x78], ebp
call fcn.0041583d
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
je 0x40a72f
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov ecx, dword [ebx + 0x28]
mov ecx, dword [ecx + 0x40]
mov eax, dword [ecx - 0xc]
neg eax
sbb eax, eax
and eax, ecx
mov ebp, eax
lea edx, [esp + 0x38]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x34]
push eax
push 0
lea ecx, [esp + 0x40]
push ecx
push 0
add edx, 8
push edx
push ebp
mov byte [esp + 0x94], 1
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
mov eax, dword [edi - 8]
mov edx, dword [esp + 0x30]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, edx
or eax, ecx
jge 0x40a359
push edx
lea ecx, [esp + 0x1c]
call fcn.004026e0
mov edi, dword [esp + 0x18]
mov eax, dword [esi - 8]
mov edx, dword [esp + 0x34]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x40a37c
push edx
lea ecx, [esp + 0x18]
call fcn.004026e0
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x34]
push ecx
push edi
lea edx, [esp + 0x40]
push edx
push esi
add eax, 8
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
mov ebp, eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00421ff5
add esp, 8
test eax, eax
jl 0x40a788
cmp eax, dword [esi - 8]
jg 0x40a788
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00421ff5
add esp, 8
test eax, eax
jl 0x40a788
cmp eax, dword [edi - 8]
jg 0x40a788
xor edx, edx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], dx
test ebp, ebp
je 0x40a6fe
mov eax, dword [esp + 0x38]
cmp eax, 6
je 0x40a6fe
cmp eax, 7
je 0x40a6fe
cmp eax, 8
je 0x40a6fe
cmp dword [esi - 0xc], edx
je 0x40a6fe
cmp dword [edi - 0xc], edx
je 0x40a6fe
mov eax, dword [ebx + 0x28]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x48], eax
test eax, eax
je 0x40a6fe
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [ebx + 0x28]
add ecx, 0x24
call fcn.00401220
cmp dword [esp + 0x3c], 0
mov esi, dword [eax]
je 0x40a456
cmp dword [esi + 0x10], 0
jmp 0x40a45a
cmp dword [esi + 0xc], 0
je 0x40a5f5
mov eax, dword [esi + 4]
push eax
lea ecx, [esp + 0x1c]
call fcn.00402410
test eax, eax
jne 0x40a5f5
xor ebp, ebp
test dword [esi + 8], 0x200
jne 0x40a605
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40a75b
mov edx, dword [eax + 4]
cmp dword [edx - 0xc], ebp
je 0x40a75b
push 0x20
call fcn.00414bdc
mov edi, eax
add esp, 4
mov dword [esp + 0x5c], edi
mov byte [esp + 0x78], 2
test edi, edi
je 0x40a4fe
mov eax, dword [esi + 0x14]
push ebp
push ebp
push ebp
push ebp
push 0x4397d4
add eax, 4
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.00403ce0
or dword [esp + 0x44], 1
add esp, 8
mov edx, esp
mov dword [esp + 0x74], esp
lea ecx, [esp + 0x28]
push ecx
push eax
push edx
mov byte [esp + 0x98], 3
call fcn.00403c20
add esp, 0xc
mov ecx, edi
call fcn.00404a60
mov edi, eax
jmp 0x40a500
xor edi, edi
test byte [esp + 0x28], 1
mov dword [esp + 0x78], 1
je 0x40a51d
and dword [esp + 0x28], 0xfffffffe
lea ecx, [esp + 0x4c]
call fcn.00402640
mov ecx, edi
call fcn.00406f20
test eax, eax
je 0x40a62f
push 0x4396c8
lea ecx, [esp + 0x48]
call fcn.004046c0
push str.__was_not_found_in_domain__
lea ecx, [esp + 0x44]
mov byte [esp + 0x7c], 5
call fcn.004046c0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x5c]
push 0x43ae40
push eax
mov byte [esp + 0x84], 6
call fcn.00403dc0
lea ecx, [esp + 0x4c]
push ecx
push eax
lea edx, [esp + 0x68]
push edx
mov byte [esp + 0x90], 7
call fcn.00403c20
mov ecx, dword [esi + 0x14]
add ecx, 4
push ecx
push eax
lea edx, [esp + 0x70]
push edx
mov byte [esp + 0x9c], 8
call fcn.00403c20
add esp, 0x20
mov ecx, esp
mov dword [esp + 0x64], esp
lea edx, [esp + 0x48]
push edx
push eax
push ecx
mov byte [esp + 0x88], 9
call fcn.00403c20
mov ecx, dword [ebx + 0x28]
add esp, 0xc
call fcn.00403f90
lea ecx, [esp + 0x50]
call fcn.00402640
lea ecx, [esp + 0x54]
call fcn.00402640
lea ecx, [esp + 0x58]
call fcn.00402640
lea ecx, [esp + 0x40]
call fcn.00402640
lea ecx, [esp + 0x44]
mov byte [esp + 0x78], 1
call fcn.00402640
cmp dword [esp + 0x48], 0
jne 0x40a437
jmp 0x40a6fe
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
test eax, eax
je 0x40a739
mov eax, 1
sub dword [esp + 0x2c], eax
sub dword [esp + 0x20], eax
jmp 0x40a6fe
mov esi, dword [esi + 8]
test esi, 0x100
je 0x40a684
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push edx
push eax
push ecx
mov ecx, ebx
call fcn.00401420
mov ebp, eax
test ebp, ebp
jne 0x40a6ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x18], eax
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
lea ecx, [esp + 0x14]
call fcn.00402640
lea ecx, [esp + 0x18]
call fcn.00402640
mov eax, 0x1f
jmp 0x40a772
test esi, 0x400
je 0x40a6ab
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push edx
push eax
push ecx
mov ecx, ebx
call fcn.00401660
mov ebp, eax
test ebp, ebp
je 0x40a655
inc dword [esp + 0x2c]
test edi, edi
je 0x40a6b9
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
test ebp, ebp
je 0x40a6fe
mov esi, dword [esp + 0x80]
cmp esi, 1
jne 0x40a6d2
mov ecx, ebx
call fcn.00401d10
jmp 0x40a6de
cmp esi, 2
jne 0x40a6de
mov ecx, ebx
call fcn.00401d40
mov dword [esp + 0x1c], ebp
cmp esi, 1
jne 0x40a6ef
mov dword [ebx + 4], ebp
mov dword [ebx + 0x30], esi
jmp 0x40a6fe
cmp esi, 2
jne 0x40a6fe
mov dword [ebx + 8], ebp
mov dword [ebx + 0x34], 1
lea ecx, [esp + 0x14]
call fcn.00402640
lea ecx, [esp + 0x18]
mov dword [esp + 0x78], 0xffffffff
call fcn.00402640
mov ecx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [esp + 0x2c]
jb 0x40a270
xor eax, eax
jmp 0x40a772
push 0x80004005
call fcn.00401090
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x14]
mov dword [ebx + 0x18], eax
call fcn.00402640
lea ecx, [esp + 0x18]
call fcn.00402640
mov eax, 0x1e
jmp 0x40a772
lea ecx, [esp + 0x14]
call fcn.00402640
lea ecx, [esp + 0x18]
call fcn.00402640
mov eax, 3
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret 4
push 0x80070057
call fcn.00401090
int3