Function at 0x42e940
Capabilities:
Create process on windows
Read .ini file
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5661ab
mov eax, dword fs:[0]
push eax
sub esp, 0x368
mov eax, dword [0x5d60c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x328]
call fcn.00426c50
lea eax, [ebp - 0x328]
push eax
push 0
push str.rdpmode
push str.admin
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
xor dl, dl
mov dword [ebp - 0x334], eax
xor cl, cl
call fcn.0042e770
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0x63
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventA]
mov dword [ebp - 0x330], edi
mov dword [0x5d94c4], 0
mov byte [0x5d9287], 0
mov byte [ebp - 0x329], 0
mov dword [ebp - 0x348], 0
nop word [eax + eax]
push str.GlobalSessionEventUltra
push 0
push 0x1f0003
call esi
mov dword [0x5d95dc], eax
test eax, eax
je 0x42ea1a
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [0x5d95dc]
call ebx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x5d9287], 0
je 0x42e9e0
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push str.GlobalSessionEventUltra
push 0
push 0
push 0
call esi
push str.GlobalSessionEventUltraCad
push 0
push 0
push 0
mov dword [ebp - 0x33c], eax
call esi
push str.GlobalSessionEventUltraPreConnect
push 0
push 0
push 0
mov dword [ebp - 0x354], eax
call esi
push str.GlobalEndSessionEvent
push 0
push 0
push 0
mov dword [ebp - 0x358], eax
call esi
push str.GlobalSessionUltraPreConnect
push 4
push 0
push 4
push 0
push 0xffffffffffffffff
mov dword [0x5d94d4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x364], eax
test eax, eax
je 0x42ea9f
push 0
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x348], eax
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xbb8
call esi
cmp byte [0x5d9287], 0
mov ecx, dword [0x5d94d4]
mov eax, dword [ebp - 0x354]
mov edx, dword [ebp - 0x358]
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x374], ecx
mov dword [ebp - 0x370], eax
jne 0x42f0e9
cmp dword [0x5d93a4], 4
mov ecx, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
jne 0x42f0e9
cmp dword [ebp - 0x334], 0
push 0x3e8
push 0
je 0x42eb17
lea eax, [ebp - 0x224]
push eax
push 3
jmp 0x42eb20
lea eax, [ebp - 0x374]
push eax
push 2
call ecx
cmp eax, 2
ja 0x42ed07
je 0x42ec30
sub eax, 0
je 0x42f0e2
sub eax, 1
jne 0x42f0ce
push str.sas.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push str.SendSAS
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x42eb69
push 0
call eax
jmp 0x42ec1c
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x42eb9d
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.0052cf50
add esp, 8
test eax, eax
je 0x42f187
mov byte [eax], 0
push 0x5b9638
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.0053193e
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.00531998
push 0x5bea9c
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.00531998
push str.cad.exe
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.00531998
add esp, 0x30
lea eax, [ebp - 0x114]
push 1
push 0
push 0x5b9638
push eax
push str.open
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
test esi, esi
je 0x42f0ce
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x42f0ce
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 0x348]
mov dword [ebp - 0x340], 0x103
mov eax, dword [ecx]
mov dword [ebp - 0x330], eax
mov eax, dword [0x5d94c4]
test eax, eax
je 0x42ecbe
cmp byte [0x5d9287], 0
jne 0x42ecbe
lea ecx, [ebp - 0x340]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [ebp - 0x340], 0x103
je 0x42ecab
push 0x3a98
push dword [0x5d94c4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x5d94c4]
test eax, eax
je 0x42ec9d
push eax
call ebx
mov eax, dword [0x5d94c8]
test eax, eax
je 0x42ecb2
push eax
call ebx
jmp 0x42ecb2
push 0x3e8
call esi
cmp dword [ebp - 0x340], 0x103
je 0x42ec54
xor esi, esi
cmp byte [0x5d9287], 0
jne 0x42ece7
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
push 0x3e8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0xa
jg 0x42ece7
cmp edi, 0xffffffff
je 0x42ecc0
mov edi, dword [ebp - 0x330]
xor dl, dl
push 1
mov ecx, edi
call fcn.0042f1b0
add esp, 4
mov byte [ebp - 0x329], 1
jmp 0x42f0ce
cmp eax, 0x102
jne 0x42f0ce
cmp dword [ebp - 0x334], 0
je 0x42f006
call fcn.0042e590
test al, al
je 0x42f006
cmp dword [0x5d94c4], 0
jne 0x42edac
call fcn.0042e590
test al, al
je 0x42ed60
push 0
mov dl, 1
xor ecx, ecx
call fcn.0042f1b0
add esp, 4
mov byte [ebp - 0x329], 0
xor edi, edi
mov dword [ebp - 0x330], edi
jmp 0x42f0ce
or edi, 0xffffffff
xor esi, esi
cmp byte [0x5d9287], 0
jne 0x42ed8c
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
push 0x3e8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0xa
jg 0x42ed8c
cmp edi, 0xffffffff
je 0x42ed65
push 0
xor dl, dl
mov dword [ebp - 0x330], edi
mov ecx, edi
call fcn.0042f1b0
add esp, 4
mov byte [ebp - 0x329], 0
jmp 0x42f0ce
cmp byte [ebp - 0x329], 1
jne 0x42ef67
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor esi, esi
push str.wtsapi32
mov dword [ebp - 0x36c], esi
call ebx
mov edi, eax
mov dword [ebp - 0x368], edi
test edi, edi
je 0x42edee
push 0x5c2afc
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov dword [ebp - 0x36c], esi
xor eax, eax
mov dword [ebp - 4], 0
push str.wtsapi32
mov dword [ebp - 0x360], eax
call ebx
mov ebx, eax
mov dword [ebp - 0x35c], ebx
test ebx, ebx
je 0x42ee24
push 0x5c2b20
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x360], eax
jmp 0x42ee26
xor eax, eax
mov byte [ebp - 4], 1
test esi, esi
je 0x42ef1b
test eax, eax
je 0x42ef1b
lea eax, [ebp - 0x344]
mov dword [ebp - 0x338], 0
push eax
lea eax, [ebp - 0x338]
mov dword [ebp - 0x344], 0
push eax
push 1
xor edi, edi
push edi
push edi
call esi
test eax, eax
je 0x42eee1
mov ecx, dword [ebp - 0x338]
xor ebx, ebx
cmp dword [ebp - 0x344], ebx
jbe 0x42eed2
xor esi, esi
nop
test edi, edi
jne 0x42eed2
push str.Console
push dword [esi + ecx + 4]
call fcn.0053a44c
mov ecx, dword [ebp - 0x338]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x330]
jne 0x42eeaa
cmp dword [esi + ecx], eax
jmp 0x42eebf
cmp dword [esi + ecx], eax
jne 0x42eec6
mov eax, dword [esi + ecx + 8]
test eax, eax
je 0x42eec1
cmp eax, 3
je 0x42eec1
cmp eax, 2
jne 0x42eec6
mov edi, 1
inc ebx
add esi, 0xc
cmp ebx, dword [ebp - 0x344]
jb 0x42ee80
mov eax, dword [ebp - 0x360]
push ecx
call eax
mov ebx, dword [ebp - 0x35c]
mov byte [ebp - 4], 2
test ebx, ebx
je 0x42eef4
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call ebx
jmp 0x42eefa
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x368]
test eax, eax
je 0x42ef0e
push eax
call ebx
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x42ef49
jmp 0x42ef55
mov byte [ebp - 4], 4
test ebx, ebx
je 0x42ef2e
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call ebx
jmp 0x42ef34
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 5
test edi, edi
je 0x42ef42
push edi
call ebx
mov dword [ebp - 4], 0xffffffff
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp - 0x330]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x34c], 0
push eax
push dword [0x5d94c4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x42efdf
mov eax, dword [0x5d94c4]
test eax, eax
je 0x42ef94
push eax
call ebx
mov eax, dword [0x5d94c8]
test eax, eax
je 0x42efa0
push eax
call ebx
lea eax, [ebp - 0x328]
mov dword [0x5d94c4], 0
push eax
push 0
push str.rdpmode
push str.admin
mov dword [0x5d94c8], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push 0x3e8
mov dword [ebp - 0x334], eax
call esi
jmp 0x42f0ce
cmp dword [ebp - 0x34c], 0x103
je 0x42f0ce
mov eax, dword [0x5d94c4]
test eax, eax
je 0x42ef94
push 0x3a98
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x42ef88
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov esi, eax
cmp edi, esi
je 0x42f01e
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp esi, 0xffffffff
je 0x42f0ce
mov eax, dword [0x5d94c4]
mov dword [ebp - 0x350], 0
test eax, eax
jne 0x42f054
push eax
xor dl, dl
mov ecx, esi
call fcn.0042f1b0
mov edi, esi
add esp, 4
mov dword [ebp - 0x330], edi
jmp 0x42f0ce
lea ecx, [ebp - 0x350]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x42f083
cmp dword [ebp - 0x350], 0x103
je 0x42f0ce
push 0x3a98
push dword [0x5d94c4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x5d94c4]
test eax, eax
je 0x42f08f
push eax
call ebx
mov eax, dword [0x5d94c8]
test eax, eax
je 0x42f09b
push eax
call ebx
lea eax, [ebp - 0x328]
mov dword [0x5d94c4], 0
push eax
push 0
push str.rdpmode
push str.admin
mov dword [0x5d94c8], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp - 0x334], eax
cmp byte [0x5d9287], 0
jne 0x42f0e9
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x42eae9
mov byte [0x5d9287], 1
mov esi, dword [ebp - 0x33c]
test esi, esi
je 0x42f0fa
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [0x5d94c4]
test eax, eax
je 0x42f13b
push 0x3a98
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x5d94c4]
test eax, eax
je 0x42f11b
push eax
call ebx
mov eax, dword [0x5d94c8]
test eax, eax
je 0x42f127
push eax
call ebx
mov dword [0x5d94c4], 0
mov dword [0x5d94c8], 0
test esi, esi
je 0x42f142
push esi
call ebx
mov eax, dword [ebp - 0x354]
test eax, eax
je 0x42f14f
push eax
call ebx
mov eax, dword [ebp - 0x358]
test eax, eax
je 0x42f15c
push eax
call ebx
mov ecx, dword [0x5d94d4]
test ecx, ecx
je 0x42f169
push ecx
call ebx
mov eax, dword [ebp - 0x348]
test eax, eax
je 0x42f17a
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x364]
test eax, eax
je 0x42f187
push eax
call ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052b789
mov esp, ebp
pop ebp
ret