Function at 0x4586e0
Capabilities:
Get common file path
Impersonate user

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff218
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x18]
mov eax, 0x51ae58
call fcn.004cfcb8
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], ecx
xor eax, eax
xor edx, edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], edx
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x44], eax
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x4c], ecx
push esi
lea edi, [ebp - 0xd94]
mov esi, 0x51abfc
mov ecx, 0x82
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0xd94]
pop esi
mov dword [ebp - 0x54], eax
xor edx, edx
mov dword [ebp - 0x58], edx
push esi
lea edi, [ebp - 0xda4]
mov esi, 0x51ae04
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
pop esi
lea edi, [ebp - 0xde8]
push esi
mov esi, 0x51ae14
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
pop esi
xor eax, eax
mov dword [ebp - 0x60], eax
mov word [ebp - 0x14], 8
push 0xffffeeee
push 0xffffeeee
push 0x5d358d
push 0x5d3588
mov edx, dword [ebp + 0x20]
push edx
call fcn.00457050
add esp, 0x14
test ebx, ebx
je 0x4587ab
push 0x5d35ac
push ebx
call fcn.004d1ac0
add esp, 8
mov dword [ebp - 0x58], 1
push 0x5d35b1
call sub.KERNEL32.dll_GetModuleHandleA
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jne 0x4587d3
push 0x5d35bd
call sub.KERNEL32.dll_LoadLibraryA
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x4587fd
test ebx, ebx
je 0x4587f2
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d35c9
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
push 0x5d35d2
call sub.KERNEL32.dll_LoadLibraryA
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x28]
test edx, edx
jne 0x458834
test ebx, ebx
je 0x458829
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d35df
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
push 0x5d35ed
call sub.KERNEL32.dll_LoadLibraryA
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
jne 0x45886b
test ebx, ebx
je 0x458860
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d35fa
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
mov dword [ebp - 0x58], 3
push 0x5d3608
mov eax, dword [ebp - 0x30]
push eax
call sub.KERNEL32.dll_GetProcAddress
mov dword [ebp - 0x5c], eax
mov edx, dword [ebp - 0x5c]
test edx, edx
jne 0x4588ce
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3624
push 0x5d361f
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00457050
add esp, 0x14
test ebx, ebx
je 0x4588c3
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3631
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
push 0x5d3640
mov eax, dword [ebp - 0x30]
push eax
call sub.KERNEL32.dll_GetProcAddress
mov dword [ebp - 0x60], eax
mov edx, dword [ebp - 0x60]
test edx, edx
jne 0x45892a
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d365d
push 0x5d3658
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00457050
add esp, 0x14
test ebx, ebx
je 0x45891f
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d366a
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
mov dword [ebp - 0x58], 4
push 0x5d3679
mov eax, dword [ebp - 0x28]
push eax
call sub.KERNEL32.dll_GetProcAddress
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
test edx, edx
jne 0x45896c
test ebx, ebx
je 0x458961
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3691
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
mov dword [ebp - 0x58], 5
push 0x5d369f
mov ecx, dword [ebp - 0x2c]
push ecx
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
jne 0x4589a8
test ebx, ebx
je 0x45899d
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d36af
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
mov dword [ebp - 0x58], 6
lea eax, [ebp - 0x880]
push eax
mov edx, dword [ebp + 0x14]
push edx
call fcn.0040348c
add esp, 8
lea ecx, [ebp - 0x268]
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.0040348c
add esp, 8
lea edx, [ebp - 0x678]
push edx
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0040348c
add esp, 8
xor eax, eax
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x458a0d
lea ecx, [ebp - 0x470]
mov dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 0x3c]
push eax
mov edx, dword [ebp + 0xc]
push edx
call fcn.0040348c
add esp, 8
mov dword [ebp - 0x58], 7
mov byte [ebp - 0xb8c], 0
test esi, esi
jne 0x458a25
lea esi, [ebp - 0xb8c]
mov al, byte [esi]
test al, al
jne 0x458a31
lea esi, [ebp - 0xb8c]
mov al, byte [esi]
test al, al
jne 0x458a42
push esi
push 0x104
call sub.KERNEL32.dll_GetCurrentDirectoryA
lea edi, [ebp - 0xa88]
push edi
push esi
call fcn.0040348c
add esp, 8
mov dword [ebp - 0x58], 8
push 0xffffeeee
push 0xffffeeee
push 0x5d36c2
push 0x5d36bd
mov eax, dword [ebp + 0x20]
push eax
call fcn.00457050
add esp, 0x14
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x458a87
mov ecx, dword [ebp + 0xc]
mov al, byte [ecx]
test al, al
push 0xffffeeee
push 0xffffeeee
push 0x5d36ca
push 0x5d36c5
mov edx, dword [ebp + 0x20]
push edx
call fcn.00457050
add esp, 0x14
xor ecx, ecx
mov dword [ebp - 0x40], ecx
mov eax, dword [ebp + 8]
test eax, eax
jne 0x458ae4
push 0xffffeeee
push 0xffffeeee
push 0x5d36d2
push 0x5d36cd
mov edx, dword [ebp + 0x20]
push edx
call fcn.00457050
add esp, 0x14
call fcn.00457690
push eax
call fcn.004576cc
pop ecx
mov dword [ebp - 0x40], eax
jmp 0x458b5f
push 0xffffeeee
push 0xffffeeee
push 0x5d36e0
push 0x5d36db
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00457050
add esp, 0x14
lea eax, [ebp - 0x40]
push eax
push 0
push 2
mov edx, dword [ebp + 0x10]
push edx
push 0
mov ecx, dword [ebp + 8]
push ecx
call sub.ADVAPI32.dll_LogonUserA
test eax, eax
jne 0x458b5f
mov dword [ebp - 0x58], 9
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d36ee
push 0x5d36e9
mov eax, dword [ebp + 0x20]
push eax
call fcn.00457050
add esp, 0x14
test ebx, ebx
je 0x458b5f
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d36fb
push ebx
call fcn.004d1ac0
add esp, 0xc
push 0xffffeeee
push 0xffffeeee
push 0x5d370e
push 0x5d3709
mov edx, dword [ebp + 0x20]
push edx
call fcn.00457050
add esp, 0x14
lea eax, [ebp - 0x4c]
push 0
mov ecx, dword [ebp - 0x40]
push ecx
push eax
call dword [ebp - 0x5c]
test eax, eax
jne 0x458bd5
mov dword [ebp - 0x58], 9
xor edx, edx
mov dword [ebp - 0x4c], edx
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d371a
push 0x5d3715
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00457050
add esp, 0x14
test ebx, ebx
je 0x458bd5
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3725
push ebx
call fcn.004d1ac0
add esp, 0xc
mov dword [ebp - 0x50], 0x82
push 0xffffeeee
push 0xffffeeee
push 0x5d3738
push 0x5d3733
mov eax, dword [ebp + 0x20]
push eax
call fcn.00457050
add esp, 0x14
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp - 0x54]
push ecx
mov eax, dword [ebp - 0x40]
push eax
call fcn.00445914
add esp, 0xc
test eax, eax
jne 0x458c59
mov dword [ebp - 0x58], 9
xor edx, edx
mov dword [ebp - 0x54], edx
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3744
push 0x5d373f
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00457050
add esp, 0x14
test ebx, ebx
je 0x458c59
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d374f
push ebx
call fcn.004d1ac0
add esp, 0xc
push 0x10
push 0
lea eax, [ebp - 0xda4]
push eax
call fcn.004cd264
add esp, 0xc
lea edx, [ebp - 0xde8]
push 0x44
push 0
push edx
call fcn.004cd264
mov dword [ebp - 0xde8], 0x44
mov dword [ebp - 0x58], 8
mov ecx, dword [ebp - 0x40]
add esp, 0xc
test ecx, ecx
je 0x458cb5
test byte [ebp + 0x20], 4
jne 0x458cb5
call fcn.00457690
push eax
call fcn.004576cc
pop ecx
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
push eax
call sub.ADVAPI32.dll_ImpersonateLoggedOnUser
test edi, edi
jne 0x458cc3
mov edx, dword [ebp - 0x54]
test edx, edx
je 0x458cc3
mov edi, dword [ebp - 0x54]
lea eax, [ebp - 0xda4]
lea edx, [ebp - 0xde8]
push eax
push edx
push edi
lea eax, [ebp - 0x880]
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x678]
push ecx
push 0x400
push eax
push 0
push 1
push edx
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x268]
push ecx
push eax
call dword [ebp - 0x34]
test eax, eax
jne 0x458da3
mov dword [ebp - 0x58], 9
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x2e4
jne 0x458d62
push 0
lea edx, [ebp - 0xb8c]
push edx
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.0043d554
add esp, 0xc
test eax, eax
je 0x458d62
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3762
push 0x5d375d
mov eax, dword [ebp + 0x20]
push eax
call fcn.00457050
mov dword [ebp - 0x38], 1
mov word [ebp - 0x14], 0
add esp, 0x14
jmp 0x458dfd
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3775
push 0x5d3770
mov edx, dword [ebp + 0x20]
push edx
call fcn.00457050
add esp, 0x14
test ebx, ebx
je 0x458d9b
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3785
push ebx
call fcn.004d1ac0
add esp, 0xc
mov word [ebp - 0x14], 0
jmp 0x458dfd
mov dword [ebp - 0x58], 0xa
push 0xffffeeee
call sub.KERNEL32.dll_GetLastError
push eax
push 0x5d3798
push 0x5d3793
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00457050
mov dword [ebp - 0x38], 1
mov word [ebp - 0x14], 0
add esp, 0x14
jmp 0x458dfd
mov word [ebp - 0x14], 0x14
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x458e15
test byte [ebp + 0x20], 4
jne 0x458e15
call sub.ADVAPI32.dll_RevertToSelf
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x458e2a
mov edx, dword [ebp - 0x4c]
test edx, edx
je 0x458e2a
mov ecx, dword [ebp - 0x4c]
push ecx
call dword [ebp - 0x60]
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x458e3a
mov edx, dword [ebp - 0x40]
push edx
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x458e4a
mov eax, dword [ebp - 0x44]
push eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x48]
test edx, edx
je 0x458e5a
mov ecx, dword [ebp - 0x48]
push ecx
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x458e6a
mov edx, dword [ebp - 0x28]
push edx
call sub.KERNEL32.dll_FreeLibrary
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x458e7a
mov eax, dword [ebp - 0x2c]
push eax
call sub.KERNEL32.dll_FreeLibrary
mov edx, dword [ebp - 0x30]
test edx, edx
je 0x458e8a
mov ecx, dword [ebp - 0x30]
push ecx
call sub.KERNEL32.dll_FreeLibrary
mov word [ebp - 0x14], 0
jmp 0x458eb5
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
mov esp, ebp
mov edi, dword [ebp - 0xdf4]
mov esi, dword [ebp - 0xdf0]
mov ebx, dword [ebp - 0xdec]
pop ebp
ret