Function at 0x660a12c8
Capabilities:
Impersonate user

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa34
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ecx
mov ecx, eax
cmp ecx, 3
jge 0x660a12ee
mov ebx, 1
jmp 0x660a152a
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
cmp ecx, 2
jle 0x660a1637
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x18], edi
xor esi, esi
lea eax, [edx + 8]
lea ecx, [edx + ecx*4]
mov dword [ebp - 4], ecx
mov edi, eax
push 2
push 0x660c5268
push dword [edi]
call fcn.660ac190
add esp, 0xc
test eax, eax
jne 0x660a133d
mov esi, dword [edi]
add esi, 4
movzx ecx, word [esi]
test ecx, ecx
je 0x660a1539
jmp 0x660a140f
push 2
push 0x660c5240
push dword [edi]
call fcn.660ac190
add esp, 0xc
test eax, eax
jne 0x660a136a
mov ecx, dword [edi]
add ecx, 4
mov dword [ebp - 0x18], ecx
movzx ecx, word [ecx]
test ecx, ecx
je 0x660a156b
jmp 0x660a140f
push 2
push 0x660c5260
push dword [edi]
call fcn.660ac190
add esp, 0xc
test eax, eax
jne 0x660a1395
mov eax, dword [edi]
lea ecx, [eax + 4]
mov dword [ebp - 0x20], ecx
movzx ecx, word [eax + 4]
test ecx, ecx
je 0x660a1552
jmp 0x660a140f
push 2
push 0x660c5258
push dword [edi]
call fcn.660ac190
add esp, 0xc
test eax, eax
je 0x660a13b1
mov ebx, 1
jmp 0x660a140f
push 0x660c1720
lea ecx, [ebp - 0x22c]
push 0x200
push ecx
call fcn.660ac1d0
add esp, 0xc
test eax, eax
je 0x660a13f4
lea eax, [ebp - 0xa2c]
lea ecx, [ebp - 0x22c]
push ecx
push 0x660c5250
push eax
call fcn.660abd90
add esp, 0xc
lea ecx, [ebp - 0xa2c]
mov dword [ebp - 0x20], ecx
jmp 0x660a13f7
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x660a140f
push 0xa
push ecx
call fcn.660ac250
add esp, 8
test eax, eax
je 0x660a140f
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 4]
add edi, 4
cmp edi, ecx
jb 0x660a1313
mov edi, dword [ebp - 0x18]
test edi, edi
jne 0x660a142d
xor ecx, ecx
mov ebx, 1
jmp 0x660a148b
push 0x5c
push edi
call fcn.660ac250
mov dword [ebp - 4], eax
add esp, 8
mov ecx, eax
test ecx, ecx
je 0x660a1618
sub ecx, edi
sar ecx, 1
mov dword [ebp - 0x24], ecx
lea ecx, [ecx + ecx + 2]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, eax
test ecx, ecx
je 0x660a1486
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x28], ecx
push edx
push edi
push ecx
call fcn.660ac290
mov ecx, dword [ebp - 0x28]
add esp, 0xc
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp - 4]
xor esi, esi
mov word [ecx + edx*2], si
mov esi, ecx
lea edi, [edi + 2]
jmp 0x660a148b
mov ebx, 0xcc
test esi, esi
je 0x660a1600
test ebx, ebx
je 0x660a14b1
test ecx, ecx
je 0x660a14a2
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov eax, ebx
mov ebx, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x660a14c4
movzx edx, word [eax]
cmp edx, 0x7b
je 0x660a15c7
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x28], ecx
push edx
mov edx, dword [ebp - 8]
push 0
push edx
push eax
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
mov ecx, dword [ebp - 0x28]
test eax, eax
je 0x660a1584
test esi, esi
je 0x660a1509
movzx edi, word [esi]
test edi, edi
je 0x660a1509
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ecx
mov edx, esi
call fcn.660a1ac8
mov ecx, dword [ebp - 0x28]
test eax, eax
je 0x660a1509
mov ebx, 0xda
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x660a151f
push dword [ebp - 0x20]
mov dword [ebp - 0x28], ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x660a152a
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov eax, ebx
mov ebx, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push 0
push 0xc0020041
call fcn.660a2840
add esp, 8
mov ebx, 2
jmp 0x660a140f
push 0
push 0xc0020043
call fcn.660a2840
add esp, 8
mov ebx, 2
jmp 0x660a140f
push 0
push 0xc002003f
call fcn.660a2840
add esp, 8
mov ebx, 2
jmp 0x660a140f
mov dword [ebp - 0x28], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x28]
cmp eax, 0x569
je 0x660a15c0
cmp eax, 0x52e
je 0x660a15b9
mov ebx, 0xd9
push 0
mov dword [ebp - 0x28], ecx
push eax
call fcn.660a2840
mov ecx, dword [ebp - 0x28]
add esp, 8
jmp 0x660a1509
mov ebx, 0xd7
jmp 0x660a15a3
mov ebx, pe_nt_image_headers32
jmp 0x660a15a3
lea eax, [ebp - 0x20]
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x28], ecx
call fcn.660a1648
mov ecx, dword [ebp - 0x28]
mov ebx, eax
test ebx, ebx
je 0x660a15f8
test ecx, ecx
je 0x660a15e9
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov eax, ebx
mov ebx, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
jmp 0x660a14c4
test edi, edi
je 0x660a160e
mov ebx, 0xdb
jmp 0x660a1497
mov ebx, 1
jmp 0x660a1497
push 0x40
push edi
call fcn.660ac250
add esp, 8
test eax, eax
je 0x660a1630
xor ecx, ecx
xor esi, esi
jmp 0x660a1493
xor ecx, ecx
jmp 0x660a148b
xor edi, edi
xor esi, esi
jmp 0x660a1424