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

Disassembly:
push 0xffffffffffffffff
push 0x4356fc
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x449fb0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [esp + 0x80]
xor edi, edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], edi
cmp eax, 1
jne 0x409a3c
mov eax, dword [ebx + 4]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], edi
jmp 0x409a54
cmp eax, 2
jne 0x40a020
mov ecx, dword [ebx + 8]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], 1
mov esi, dword [esp + 0x1c]
cmp esi, edi
jne 0x409a63
xor eax, eax
jmp 0x40a025
push 2
push 0xc
lea edx, [esp + 0x6c]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x409a8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x18], eax
mov eax, 0x1d
jmp 0x40a025
mov eax, dword [esp + 0x64]
xor ecx, ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], ecx
cmp eax, edi
jbe 0x409a5c
jmp 0x409aa6
mov esi, dword [esp + 0x1c]
xor edi, edi
lea eax, [esp + 0x2c]
push eax
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x409a77
mov ecx, dword [esp + 0x2c]
add ecx, 8
push ecx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x409a80
mov edx, dword [esp + 0x2c]
test byte [edx + 1], 0x10
jne 0x409fc1
mov eax, 0x400
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], eax
call fcn.00414de3
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
je 0x409fd8
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x78], edi
call fcn.00414de3
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
je 0x409fd8
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov eax, dword [ebx + 0x28]
mov edx, dword [eax + 0x40]
lea ecx, [eax + 0x40]
mov eax, dword [edx - 0xc]
mov byte [esp + 0x78], 1
cmp eax, edi
je 0x409b4d
push eax
call fcn.00402290
mov edi, eax
mov eax, dword [ebp - 8]
mov ecx, 1
sub ecx, dword [ebp - 4]
sub eax, 0x400
or eax, ecx
jge 0x409b73
push 0x400
lea ecx, [esp + 0x1c]
call fcn.00402160
mov ebp, dword [esp + 0x18]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x409b99
push 0x400
lea ecx, [esp + 0x18]
call fcn.00402160
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x44]
push ecx
push ebp
lea edx, [esp + 0x50]
push edx
push esi
add eax, 8
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
mov ecx, dword [ebx + 0x28]
add ecx, 0x40
test eax, eax
jne 0x409c2f
push 0xffffffffffffffff
call fcn.00401fb0
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042159c
add esp, 8
test eax, eax
jl 0x409fe2
cmp eax, dword [esi - 8]
jg 0x409fe2
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [ebp - 8]
push eax
push ebp
call fcn.0042159c
add esp, 8
test eax, eax
jl 0x409fe2
cmp eax, dword [ebp - 8]
jg 0x409fe2
xor edx, edx
mov dword [ebp - 0xc], eax
mov word [ebp + eax*2], dx
lea ecx, [esp + 0x14]
call fcn.00402050
mov dword [esp + 0x78], 0xffffffff
jmp 0x409fb8
or edi, 0xffffffff
push edi
call fcn.00401fb0
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042159c
add esp, 8
test eax, eax
jl 0x409fe2
cmp eax, dword [esi - 8]
jg 0x409fe2
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [ebp - 8]
push eax
push ebp
call fcn.0042159c
add esp, 8
test eax, eax
jl 0x409fe2
cmp eax, dword [ebp - 8]
jg 0x409fe2
xor edx, edx
mov dword [ebp - 0xc], eax
mov word [ebp + eax*2], dx
mov eax, dword [esp + 0x48]
cmp eax, 6
je 0x409fab
cmp eax, 7
je 0x409fab
cmp eax, 8
je 0x409fab
cmp dword [esi - 0xc], edx
je 0x409fab
cmp dword [ebp - 0xc], edx
je 0x409fab
mov eax, dword [ebx + 0x28]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x409c19
lea ebx, [ebx]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [ebx + 0x28]
add ecx, 0x24
call fcn.00401220
cmp dword [esp + 0x30], 0
mov esi, dword [eax]
je 0x409cef
cmp dword [esi + 0x10], 0
jmp 0x409cf3
cmp dword [esi + 0xc], 0
je 0x409e92
mov eax, dword [esi + 4]
push eax
push ebp
call fcn.00420d5f
add esp, 8
test eax, eax
jne 0x409e92
xor ebp, ebp
test dword [esi + 8], 0x200
jne 0x409ea2
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40a00e
mov edx, dword [eax + 4]
cmp dword [edx - 0xc], ebp
je 0x40a00e
push 0x20
call fcn.00414182
mov edi, eax
add esp, 4
mov dword [esp + 0x5c], edi
mov byte [esp + 0x78], 2
test edi, edi
je 0x409d97
mov eax, dword [esi + 0x14]
push ebp
push ebp
push ebp
push ebp
push 0x438814
add eax, 4
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.00403780
or dword [esp + 0x40], 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.004036c0
add esp, 0xc
mov ecx, edi
call fcn.004043a0
mov edi, eax
jmp 0x409d99
xor edi, edi
test byte [esp + 0x24], 1
mov dword [esp + 0x78], 1
je 0x409db6
and dword [esp + 0x24], 0xfffffffe
lea ecx, [esp + 0x4c]
call fcn.00402050
mov ecx, edi
call fcn.00406920
test eax, eax
je 0x409ecc
push 0x438704
lea ecx, [esp + 0x3c]
call fcn.00404000
push str.__was_not_found_in_domain__
lea ecx, [esp + 0x38]
mov byte [esp + 0x7c], 5
call fcn.00404000
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x5c]
push 0x43974c
push eax
mov byte [esp + 0x84], 6
call fcn.00403860
lea ecx, [esp + 0x40]
push ecx
push eax
lea edx, [esp + 0x68]
push edx
mov byte [esp + 0x90], 7
call fcn.004036c0
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.004036c0
add esp, 0x20
mov ecx, esp
mov dword [esp + 0x64], esp
lea edx, [esp + 0x3c]
push edx
push eax
push ecx
mov byte [esp + 0x88], 9
call fcn.004036c0
mov ecx, dword [ebx + 0x28]
add esp, 0xc
call fcn.00403a30
lea ecx, [esp + 0x50]
call fcn.00402050
lea ecx, [esp + 0x54]
call fcn.00402050
lea ecx, [esp + 0x58]
call fcn.00402050
lea ecx, [esp + 0x34]
call fcn.00402050
lea ecx, [esp + 0x38]
mov byte [esp + 0x78], 1
call fcn.00402050
mov ebp, dword [esp + 0x18]
cmp dword [esp + 0x3c], 0
jne 0x409cd0
jmp 0x409c19
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 0x409fec
mov eax, 1
sub dword [esp + 0x28], eax
sub dword [esp + 0x20], eax
jmp 0x409c19
mov esi, dword [esi + 8]
test esi, 0x100
je 0x409f21
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 0x409f48
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.00402050
lea ecx, [esp + 0x18]
call fcn.00402050
mov eax, 0x1f
jmp 0x40a025
test esi, 0x400
je 0x409f48
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 0x409ef2
inc dword [esp + 0x28]
test edi, edi
je 0x409f56
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
test ebp, ebp
je 0x409c19
mov esi, dword [esp + 0x80]
cmp esi, 1
jne 0x409f73
mov ecx, ebx
call fcn.00401970
jmp 0x409f7f
cmp esi, 2
jne 0x409f7f
mov ecx, ebx
call fcn.004019a0
mov dword [esp + 0x1c], ebp
cmp esi, 1
jne 0x409f93
mov dword [ebx + 4], ebp
mov dword [ebx + 0x30], esi
jmp 0x409c19
cmp esi, 2
jne 0x409c19
mov dword [ebx + 8], ebp
mov dword [ebx + 0x34], 1
jmp 0x409c19
lea ecx, [esp + 0x14]
call fcn.00402050
mov dword [esp + 0x78], edi
lea ecx, [esp + 0x18]
call fcn.00402050
mov ecx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [esp + 0x28]
jb 0x409aa0
xor eax, eax
jmp 0x40a025
push 0x80004005
call fcn.00401090
push 0x80070057
call fcn.00401090
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x14]
mov dword [ebx + 0x18], eax
call fcn.00402050
lea ecx, [esp + 0x18]
call fcn.00402050
mov eax, 0x1e
jmp 0x40a025
lea ecx, [esp + 0x14]
call fcn.00402050
lea ecx, [esp + 0x18]
call fcn.00402050
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