Function at 0x402d70
Capabilities:
Check mutex on windows
Get session information
Get session user name
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42eb7b
mov eax, dword fs:[0]
push eax
sub esp, 0x4a0
mov eax, dword [0x44206c]
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
mov dword [ebp - 0x448], edx
mov ebx, ecx
mov dword [ebp - 0x488], ebx
cmp dword [ebp + 0xc], 0
lea ecx, [ebp - 0x484]
mov dword [ebp - 0x458], 0x36d1707a
mov eax, dword [ebp - 0x458]
sete al
movzx eax, al
push eax
call fcn.00405e20
lea eax, [ebp - 0x44c]
mov dword [ebp - 4], 0
push eax
lea edx, [ebp - 0x4ac]
mov dword [ebp - 0x49c], ebx
lea ecx, [ebp - 0x450]
call fcn.00403480
mov esi, eax
add esp, 4
test esi, esi
jne 0x403325
mov dword [ebp - 0x458], 0x625009e4
mov ecx, 0x629433a0
mov eax, dword [ebp - 0x458]
sub ecx, eax
mov esi, dword [ecx]
lea ecx, [ebp - 0x218]
call fcn.00401e60
test eax, eax
jne 0x402f12
lea eax, [ebp - 0x460]
push eax
lea eax, [ebp - 0x454]
push eax
push 1
push 0
push 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
je 0x402f0c
lea eax, [ebp - 0x218]
mov ecx, 0x3836987a
push eax
lea eax, [esi + esi]
sub ecx, eax
lea eax, [ebp - 0x434]
push ecx
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
xor edi, edi
add esp, 0xc
cmp dword [ebp - 0x460], edi
jbe 0x402efc
xor esi, esi
jmp 0x402e90
lea eax, [ebp - 0x494]
push eax
lea eax, [ebp - 0x45c]
push eax
mov eax, dword [ebp - 0x454]
push 5
push dword [esi + eax]
push 0
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x402eea
mov eax, dword [ebp - 0x45c]
cmp word [eax], 0
je 0x402ee5
mov ecx, dword [ebp - 0x454]
lea eax, [ebp - 0x434]
push eax
lea edx, [ebp - 0x218]
mov ecx, dword [esi + ecx]
call fcn.00401f70
mov eax, dword [ebp - 0x45c]
add esp, 4
push eax
call ebx
jmp 0x402ef0
call dword [sym.imp.KERNEL32.dll_GetLastError]
inc edi
add esi, 0xc
cmp edi, dword [ebp - 0x460]
jb 0x402e90
push dword [ebp - 0x454]
call ebx
mov ebx, dword [ebp - 0x488]
jmp 0x402f12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x444], eax
mov eax, dword [ebp - 0x448]
mov dword [ebp - 0x440], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x43c], eax
mov edi, dword [sym.imp.KERNEL32.dll_OpenMutexW]
lea esp, [esp]
xor ecx, ecx
mov dword [ebp - 0x438], ecx
cmp dword [ebp - 0x47c], ecx
je 0x402f6a
mov ecx, dword [ebp - 0x474]
test ecx, ecx
je 0x402f62
mov ecx, dword [ecx + 0x180]
jmp 0x402f64
xor ecx, ecx
mov dword [ebp - 0x438], ecx
push 1
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x444]
push eax
xor eax, eax
test ecx, ecx
setne al
add eax, 3
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
cmp eax, 0xc0
ja case.0x402f9a.1
movzx eax, byte [eax + 0x4033bc]
jmp dword [eax*4 + 0x4033a4]
cmp dword [ebp - 0x44c], 0
mov edi, dword [ebp - 0x450]
je 0x402fcf
push 0
lea eax, [ebp - 0x498]
push eax
lea eax, [ebp - 0x4ac]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x403264
push 0x134
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x403278
mov eax, dword [0x444080]
test eax, eax
je 0x402ffc
mov dword [eax + 0x130], esi
mov dword [esi + 0x12c], eax
mov dword [esi + 0x130], 0
mov dword [esi + 0x118], 0
mov dword [0x444080], esi
mov dword [esi + 0x14], edi
mov dword [ebp - 0x448], 0x6f019a9b
mov eax, dword [ebp - 0x448]
cmp dword [esi + 0x118], 0
jne 0x403054
push 0x403610
push esi
push 0x100
lea eax, [esi + 0x18]
push eax
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFileEx]
test eax, eax
jne 0x40305b
mov ecx, esi
call fcn.00403820
lea eax, [ebp - 0x44c]
push eax
lea edx, [ebp - 0x4ac]
lea ecx, [ebp - 0x450]
call fcn.00403480
mov esi, eax
add esp, 4
test esi, esi
jne 0x403325
jmp 0x402f33
call fcn.004038e0
cmp dword [ebp - 0x47c], 0
jne case.0x402f9a.189
mov dword [ebp - 0x448], 0x7d9bc5dd
mov ecx, 0x7ddfef99
mov eax, dword [ebp - 0x448]
sub ecx, eax
mov eax, dword [ebp - 0x478]
test eax, eax
je 0x40310b
cmp eax, 0x1020000
jbe 0x40310b
mov esi, 0xea4fd8c5
sub esi, dword [ecx]
lea eax, [esi*2 + 0x6396ee74]
push eax
push 0
push 0x100000
call edi
test eax, eax
jne 0x403108
lea eax, [esi*2 + 0x6396eeac]
push eax
push 0
push 0x100000
call edi
test eax, eax
jne 0x403108
cmp dword [0x44407c], eax
jne 0x40310b
lea ecx, [ebp - 0x484]
call fcn.00406880
jmp case.0x402f9a.189
push eax
call ebx
cmp byte [ebp - 0x484], 0
je 0x403185
mov esi, dword [ebp - 0x480]
test esi, esi
jne 0x403122
xor eax, eax
jmp 0x403171
lea eax, [ebp - 0x490]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [ebp - 0x490]
mov eax, dword [ebp - 0x48c]
shr ecx, 0x1f
add eax, eax
or ecx, eax
cmp esi, ecx
jbe 0x40314a
xor eax, eax
jmp 0x403171
sub ecx, esi
cmp ecx, 0x4e20
jbe 0x403158
xor eax, eax
jmp 0x403171
imul ecx, ecx, 0x346dc
cmp ecx, 0x5265c00
jb 0x40316a
xor eax, eax
jmp 0x403171
mov eax, 0x5265c00
sub eax, ecx
test eax, eax
jne 0x403185
lea ecx, [ebp - 0x484]
call fcn.004060d0
jmp case.0x402f9a.189
lea ecx, [ebp - 0x484]
call fcn.00406da0
test al, al
je case.0x402f9a.189
lea ecx, [ebp - 0x484]
call fcn.00406e70
jmp case.0x402f9a.189
mov eax, dword [ebp - 0x47c]
sub eax, 0
je case.0x402f9a.189
lea ecx, [ebp - 0x484]
sub eax, 1
je 0x4031cc
call fcn.004070d0
jmp case.0x402f9a.189
call fcn.004070d0
mov dword [ebp - 0x448], 0x7d9bc5dd
mov ecx, 0x7ddfef99
mov eax, dword [ebp - 0x448]
sub ecx, eax
mov eax, dword [ebp - 0x478]
test eax, eax
je case.0x402f9a.189
cmp eax, 0x1020000
jbe case.0x402f9a.189
mov esi, 0xea4fd8c5
sub esi, dword [ecx]
lea eax, [esi*2 + 0x6396ee74]
push eax
push 0
push 0x100000
call edi
test eax, eax
je 0x403225
push eax
call ebx
jmp case.0x402f9a.189
lea eax, [esi*2 + 0x6396eeac]
push eax
push 0
push 0x100000
call edi
test eax, eax
je 0x403242
push eax
call ebx
jmp case.0x402f9a.189
call fcn.004038e0
cmp dword [0x44407c], 0
jne case.0x402f9a.189
lea ecx, [ebp - 0x484]
call fcn.00406880
jmp case.0x402f9a.189
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x403322
push edi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push edi
call ebx
mov esi, 8
jmp 0x403325
cmp dword [ebp - 0x47c], 0
jne 0x4032af
lea ecx, [ebp - 0x484]
call fcn.00406da0
test al, al
je 0x4032af
lea ecx, [ebp - 0x484]
call fcn.00406e70
cmp dword [ebp - 0x47c], 3
jne 0x4032e7
mov eax, dword [ebp - 0x474]
test eax, eax
je 0x4032ca
mov eax, dword [eax + 0x180]
jmp 0x4032cc
xor eax, eax
push 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4032e7
lea ecx, [ebp - 0x484]
call fcn.004070d0
cmp dword [ebp - 0x44c], 0
mov esi, dword [ebp - 0x450]
je 0x4032fd
push esi
call dword [sym.imp.KERNEL32.dll_CancelIo]
push esi
call ebx
xor esi, esi
jmp 0x403325
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x44c], 0
mov esi, eax
mov edi, dword [ebp - 0x450]
je 0x403322
push edi
call dword [sym.imp.KERNEL32.dll_CancelIo]
push edi
call ebx
mov dword [ebp - 4], 0xffffffff
or edi, 0xffffffff
mov edx, dword [ebp - 0x464]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40334c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x470]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x403367
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x474]
test edi, edi
je 0x403386
mov ecx, edi
call fcn.004080b0
push 0x188
push edi
call fcn.00414cce
add esp, 8
mov eax, esi
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.004146e0
mov esp, ebp
pop ebp
ret