Function at 0x40ce10
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
cmp dword [0x4365a8], 0
je 0x40ce29
xor eax, eax
jmp 0x40d095
push 0x48
push 0
push 0x4365a8
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x94], 0x94
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x40ce5a
jmp 0x40d08d
cmp dword [ebp - 0x84], 2
jne 0x40ce79
push str.security.dll
lea ecx, [ebp - 0x198]
push ecx
call sub.MSVCRT.dll_strcpy
add esp, 8
jmp 0x40ce9d
cmp dword [ebp - 0x84], 1
jne 0x40ce98
push str.secur32.dll
lea edx, [ebp - 0x198]
push edx
call sub.MSVCRT.dll_strcpy
add esp, 8
jmp 0x40ce9d
jmp 0x40d08d
mov dword [0x4365a8], 1
lea eax, [ebp - 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x4365ac], eax
cmp dword [0x4365ac], 0
jne 0x40cec7
jmp 0x40d08d
push str.AcceptSecurityContext
mov ecx, dword [0x4365ac]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365b0], eax
push str.AcquireCredentialsHandleA
mov edx, dword [0x4365ac]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365b4], eax
push str.ApplyControlToken
mov eax, dword [0x4365ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365b8], eax
push str.CompleteAuthToken
mov ecx, dword [0x4365ac]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365bc], eax
push str.DeleteSecurityContext
mov edx, dword [0x4365ac]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365c0], eax
push str.EnumerateSecurityPackagesA
mov eax, dword [0x4365ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365c4], eax
push str.FreeContextBuffer
mov ecx, dword [0x4365ac]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365c8], eax
push str.FreeCredentialsHandle
mov edx, dword [0x4365ac]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365cc], eax
push str.ImpersonateSecurityContext
mov eax, dword [0x4365ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365d0], eax
push str.InitializeSecurityContextA
mov ecx, dword [0x4365ac]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365d4], eax
push str.MakeSignature
mov edx, dword [0x4365ac]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365d8], eax
push str.QueryContextAttributesA
mov eax, dword [0x4365ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365dc], eax
push str.QueryCredentialsAttributesA
mov ecx, dword [0x4365ac]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365e0], eax
push str.QuerySecurityPackageInfoA
mov edx, dword [0x4365ac]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365e4], eax
push str.RevertSecurityContext
mov eax, dword [0x4365ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365e8], eax
push str.VerifySignature
mov ecx, dword [0x4365ac]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4365ec], eax
cmp dword [0x4365b0], 0
je 0x40d07a
cmp dword [0x4365b4], 0
je 0x40d07a
cmp dword [0x4365c4], 0
je 0x40d07a
cmp dword [0x4365c8], 0
je 0x40d07a
cmp dword [0x4365cc], 0
je 0x40d07a
cmp dword [0x4365d4], 0
je 0x40d07a
cmp dword [0x4365dc], 0
je 0x40d07a
cmp dword [0x4365e0], 0
jne 0x40d07c
jmp 0x40d08d
push fcn.0040d0a0
call fcn.0040e39b
add esp, 4
xor eax, eax
jmp 0x40d095
call fcn.0040d0a0
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret