Function at 0x435140
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x26b0
call fcn.005258e0
mov eax, dword [0x5c3040]
xor eax, ebp
mov dword [ebp - 8], eax
cmp byte [0x5c6494], 0
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x2624], eax
mov eax, dword [ebp + 0x24]
push edi
mov dword [ebp - 0x2630], ecx
mov dword [ebp - 0x262c], eax
jne 0x43534d
mov esi, 0x5c6908
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x435187
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
sub esi, ecx
je 0x4351dc
cmp esi, 0xfe
jg 0x4351dc
push esi
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.00526a30
add esp, 0xc
lea eax, [ebp - 0x414]
push esi
push eax
push esi
push 0x5c6908
push 1
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4351d2
call ebx
jmp 0x4351dc
xor ecx, ecx
mov word [ebp + eax*2 - 0x414], cx
push 0x44
lea eax, [ebp - 0x26ac]
push 0
push eax
call fcn.00526a30
add esp, 0xc
mov dword [ebp - 0x26a4], str.Winsta0Winlogon
mov eax, 5
mov dword [ebp - 0x26ac], 0x44
mov word [ebp - 0x267c], ax
mov ax, word [0x5a94bc]
push 0x206
mov word [ebp - 0x214], ax
lea eax, [ebp - 0x212]
push 0
push eax
mov dword [ebp - 0x2638], 0
call fcn.00526a30
add esp, 0xc
mov dword [ebp - 0x2634], 0
lea eax, [ebp - 0x2588]
xor esi, esi
mov dword [ebp - 0x2620], eax
mov edi, 0x94
lea eax, [ebp - 0x61c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.winsta.dll
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x2628], eax
test eax, eax
je 0x4352e8
push str.WinStationQueryInformationW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4352cb
lea ecx, [ebp - 0x263c]
push ecx
push 0x208
lea ecx, [ebp - 0x214]
push ecx
push 0x21
push dword [ebp - 0x2630]
push esi
call eax
movzx eax, al
mov dword [ebp - 0x2638], eax
push dword [ebp - 0x2628]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x2638], esi
je 0x4352e8
cmp word [ebp - 0x214], si
jne 0x435307
push dword [ebp - 0x2630]
lea eax, [ebp - 0x214]
push str..PipeTerminalServerSystemExecSrvr_d
push 0x104
push eax
call fcn.00432f50
add esp, 0x10
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2630], eax
cmp eax, 0xffffffff
jne 0x435360
call ebx
cmp eax, 0xe7
jne 0x43534d
push 0x7530
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x435307
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00524763
mov esp, ebp
pop ebp
ret
push 0x94
lea eax, [ebp - 0x261c]
push 0
push eax
call fcn.00526a30
mov eax, dword [ebp + 0x20]
add esp, 0xc
mov dword [ebp - 0x2614], 1
mov dword [ebp - 0x25e8], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x2618], eax
lea ecx, [ebp - 0x414]
mov eax, dword [ebp - 0x2624]
lea edx, [ecx + 2]
mov dword [ebp - 0x2610], eax
mov dword [ebp - 0x260c], esi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4353b0
sub ecx, edx
sar ecx, 1
lea ebx, [ecx*2 + 2]
lea eax, [ebx + 0x94]
cmp eax, 0x2000
jbe 0x4353d7
xor eax, eax
jmp 0x435407
push ebx
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x2588]
push eax
call fcn.00526b90
lea eax, [ebp - 0x2588]
add esp, 0xc
add eax, ebx
lea edi, [ebx + 0x94]
mov dword [ebp - 0x2620], eax
mov eax, 0x94
movups xmm0, xmmword [ebp - 0x26ac]
mov dword [ebp - 0x2608], eax
mov ebx, edi
mov eax, dword [ebp - 0x266c]
movups xmmword [ebp - 0x25dc], xmm0
mov dword [ebp - 0x259c], eax
mov eax, str.Winsta0Winlogon
movups xmm0, xmmword [ebp - 0x269c]
movups xmmword [ebp - 0x25cc], xmm0
movups xmm0, xmmword [ebp - 0x268c]
movups xmmword [ebp - 0x25bc], xmm0
movups xmm0, xmmword [ebp - 0x267c]
movups xmmword [ebp - 0x25ac], xmm0
test eax, eax
jne 0x435460
xor ebx, ebx
jmp 0x4354c2
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x435465
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
lea ecx, [eax + edi]
mov dword [ebp - 0x2628], eax
mov dword [ebp - 0x2624], ecx
cmp ecx, 0x2000
jbe 0x435496
xor ebx, ebx
jmp 0x4354c2
push eax
push str.Winsta0Winlogon
push dword [ebp - 0x2620]
call fcn.00526b90
mov eax, dword [ebp - 0x2620]
add esp, 0xc
add eax, dword [ebp - 0x2628]
mov edi, dword [ebp - 0x2624]
mov dword [ebp - 0x2620], eax
mov edx, dword [ebp - 0x25d0]
mov dword [ebp - 0x25d4], ebx
mov ebx, edi
test edx, edx
jne 0x4354d8
xor ebx, ebx
jmp 0x435540
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x2624], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4354e3
sub ecx, dword [ebp - 0x2624]
sar ecx, 1
lea eax, [ecx*2 + 2]
lea ecx, [eax + edi]
mov dword [ebp - 0x2628], eax
mov dword [ebp - 0x2624], ecx
cmp ecx, 0x2000
jbe 0x435518
xor ebx, ebx
jmp 0x435540
push eax
push edx
push dword [ebp - 0x2620]
call fcn.00526b90
mov eax, dword [ebp - 0x2620]
add esp, 0xc
add eax, dword [ebp - 0x2628]
mov edi, dword [ebp - 0x2624]
mov dword [ebp - 0x2620], eax
mov ecx, dword [ebp - 0x262c]
mov dword [ebp - 0x25d0], ebx
test ecx, ecx
je 0x4355f6
mov eax, dword [ebp + 0x20]
and eax, 0x400
cmp edi, 0x2000
ja 0x4355c5
test eax, eax
je 0x435597
nop dword [eax + eax]
mov eax, esi
shr eax, 1
cmp word [ecx + eax*2], 0
jne 0x435583
cmp word [ecx + eax*2 + 2], 0
je 0x435592
add esi, 2
lea eax, [edi + esi]
cmp eax, 0x2000
jbe 0x435570
jmp 0x4355c5
add esi, 4
jmp 0x4355c5
mov edx, edi
sub edx, ecx
nop dword [eax + eax]
cmp byte [ecx], 0
lea eax, [ecx + 1]
mov ecx, eax
jne 0x4355af
cmp byte [eax], 0
je 0x4355bc
lea eax, [edx + ecx]
inc esi
cmp eax, 0x2000
jbe 0x4355a0
jmp 0x4355bf
add esi, 2
mov ecx, dword [ebp - 0x262c]
lea ebx, [edi + esi]
cmp ebx, 0x2000
ja 0x4355ea
push esi
push ecx
push dword [ebp - 0x2620]
call fcn.00526b90
mov dword [ebp - 0x25e4], edi
add esp, 0xc
mov edi, ebx
jmp 0x4355fc
mov dword [ebp - 0x25e4], 0
jmp 0x4355fc
mov dword [ebp - 0x25e4], esi
mov ebx, dword [ebp - 0x2630]
lea eax, [ebp - 0x2640]
xor esi, esi
mov dword [ebp - 0x261c], edi
push esi
push eax
push edi
lea eax, [ebp - 0x261c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
je 0x435690
push 0xfa
call edi
push esi
lea eax, [ebp - 0x2644]
push eax
push 0x1c
lea eax, [ebp - 0x2660]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x435696
push dword [ebp - 0x264c]
push esi
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ecx, dword [ebp - 0x265c]
mov esi, eax
mov dword [ebp - 0x2634], ecx
test ecx, ecx
je 0x435682
movups xmm0, xmmword [ebp - 0x2654]
movups xmmword [0x5c68f0], xmm0
jmp 0x435696
push dword [ebp - 0x2658]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x435696
mov dword [ebp - 0x2634], esi
mov eax, dword [0x5c68f0]
test eax, eax
jne 0x4356a5
mov dword [0x5c68f0], esi
cmovne esi, eax
test esi, esi
jne 0x4356b3
push 0x1388
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x2634]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00524763
mov esp, ebp
pop ebp
ret