Function at 0x10007070
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100f23e3
mov eax, dword fs:[0]
push eax
mov eax, 0xd078
call fcn.100ca280
mov eax, dword [0x10131fa8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0xc664], 0
mov byte [ebp - 0xc65d], 1
nop dword [eax + eax]
push 0xc350
lea eax, [ebp - 0xc394]
mov dword [ebp - 0xc66c], 0
push 0
push eax
call fcn.100cd020
add esp, 0xc
or esi, 0xffffffff
mov dword [ebp - 0xc668], esi
mov dword [ebp - 4], 2
test esi, esi
je 0x1000710b
cmp esi, 0xffffffff
je 0x1000710b
mov eax, dword [0x101312c8]
test eax, eax
je 0x1000710b
cmp eax, 0xffffffff
jne 0x100078c3
call edi
mov ecx, eax
lea edi, [ebp - 0x1a]
mov eax, 0xcccccccd
sub edi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [edi], cx
mov ecx, edx
test ecx, ecx
jne 0x10007112
xor eax, eax
mov dword [ebp - 0xc3cc], edx
mov word [ebp - 0xc3dc], ax
lea eax, [ebp - 0x1a]
mov dword [ebp - 0xc3c8], 7
cmp edi, eax
je 0x10007163
sub eax, edi
lea ecx, [ebp - 0xc3dc]
sar eax, 1
push eax
push edi
call fcn.10008530
mov eax, dword [ebp - 0xc664]
or eax, 3
mov dword [ebp - 0xc664], eax
push 0x13
xor eax, eax
mov byte [ebp - 4], 3
push str.LUNA_PIPE_AVAILABLE
lea ecx, [ebp - 0xc3c4]
mov dword [ebp - 0xc3b4], 0
mov dword [ebp - 0xc3b0], 7
mov word [ebp - 0xc3c4], ax
call fcn.10008530
mov eax, dword [ebp - 0xc3b0]
mov ecx, dword [ebp - 0xc3b4]
sub eax, ecx
mov edx, dword [ebp - 0xc3cc]
mov edi, dword [ebp - 0xc3c8]
mov byte [ebp - 4], 4
cmp edx, eax
jbe 0x100071f4
mov eax, edi
sub eax, edx
cmp eax, ecx
jb 0x100071f4
cmp dword [ebp - 0xc3b0], 8
lea eax, [ebp - 0xc3c4]
push ecx
cmovae eax, dword [ebp - 0xc3c4]
lea ecx, [ebp - 0xc3dc]
push eax
push 0
call fcn.10008d00
jmp 0x10007211
cmp edi, 8
lea eax, [ebp - 0xc3dc]
push edx
cmovae eax, dword [ebp - 0xc3dc]
lea ecx, [ebp - 0xc3c4]
push eax
call fcn.100082c0
mov dword [ebp - 0xc39c], 0
xor ecx, ecx
mov dword [ebp - 0xc398], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xc3ac], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xc39c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea eax, [ebp - 0xc3ac]
cmp dword [ebp - 0xc398], 8
cmovae eax, dword [ebp - 0xc3ac]
push eax
push ecx
push ecx
push 0x10138a8c
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov byte [ebp - 4], 5
test edi, edi
je 0x10007290
cmp edi, 0xffffffff
je 0x10007290
push edi
call dword [0x100ffc5c]
mov edx, dword [ebp - 0xc398]
mov byte [ebp - 4], 4
cmp edx, 8
jb 0x100072d4
mov ecx, dword [ebp - 0xc3ac]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100072ca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
mov edx, dword [ebp - 0xc3b0]
xor eax, eax
mov dword [ebp - 0xc39c], 0
mov dword [ebp - 0xc398], 7
mov word [ebp - 0xc3ac], ax
mov byte [ebp - 4], 3
cmp edx, 8
jb 0x10007335
mov ecx, dword [ebp - 0xc3c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1000732b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
mov edx, dword [ebp - 0xc3c8]
xor eax, eax
mov dword [ebp - 0xc3b4], 0
mov dword [ebp - 0xc3b0], 7
mov word [ebp - 0xc3c4], ax
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x10007396
mov ecx, dword [ebp - 0xc3dc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1000738c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea edi, [ebp - 0x1a]
mov eax, 0xcccccccd
sub edi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [edi], cx
mov ecx, edx
test ecx, ecx
jne 0x100073a1
xor eax, eax
mov dword [ebp - 0xc3cc], edx
mov word [ebp - 0xc3dc], ax
lea eax, [ebp - 0x1a]
mov dword [ebp - 0xc3c8], 7
cmp edi, eax
je 0x100073f2
sub eax, edi
lea ecx, [ebp - 0xc3dc]
sar eax, 1
push eax
push edi
call fcn.10008530
push 0x12
xor eax, eax
mov byte [ebp - 4], 6
push str..pipeLUNA_HOST
lea ecx, [ebp - 0xc3c4]
mov dword [ebp - 0xc3b4], 0
mov dword [ebp - 0xc3b0], 7
mov word [ebp - 0xc3c4], ax
call fcn.10008530
mov eax, dword [ebp - 0xc3b0]
mov ecx, dword [ebp - 0xc3b4]
sub eax, ecx
mov edx, dword [ebp - 0xc3cc]
mov edi, dword [ebp - 0xc3c8]
mov byte [ebp - 4], 7
cmp edx, eax
jbe 0x10007474
mov eax, edi
sub eax, edx
cmp eax, ecx
jb 0x10007474
cmp dword [ebp - 0xc3b0], 8
lea eax, [ebp - 0xc3c4]
push ecx
cmovae eax, dword [ebp - 0xc3c4]
lea ecx, [ebp - 0xc3dc]
push eax
push 0
call fcn.10008d00
jmp 0x10007491
cmp edi, 8
lea eax, [ebp - 0xc3dc]
push edx
cmovae eax, dword [ebp - 0xc3dc]
lea ecx, [ebp - 0xc3c4]
push eax
call fcn.100082c0
mov dword [ebp - 0xc39c], 0
xor ecx, ecx
mov dword [ebp - 0xc398], 0
movups xmm0, xmmword [eax]
push ecx
push 0x80
movups xmmword [ebp - 0xc3ac], xmm0
push 3
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xc39c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea eax, [ebp - 0xc3ac]
cmp dword [ebp - 0xc398], 8
push ecx
cmovae eax, dword [ebp - 0xc3ac]
push 1
push 0x80000100
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, esi
mov byte [ebp - 4], 8
mov esi, eax
mov dword [ebp - 0xc668], esi
test ecx, ecx
je 0x10007518
cmp ecx, 0xffffffff
je 0x10007518
push ecx
call dword [0x100ffc5c]
mov edx, dword [ebp - 0xc398]
mov byte [ebp - 4], 7
cmp edx, 8
jb 0x1000755c
mov ecx, dword [ebp - 0xc3ac]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10007552
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
mov edx, dword [ebp - 0xc3b0]
xor eax, eax
mov dword [ebp - 0xc39c], 0
mov dword [ebp - 0xc398], 7
mov word [ebp - 0xc3ac], ax
mov byte [ebp - 4], 6
cmp edx, 8
jb 0x100075bd
mov ecx, dword [ebp - 0xc3c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100075b3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
mov edx, dword [ebp - 0xc3c8]
xor eax, eax
mov dword [ebp - 0xc3b4], 0
mov dword [ebp - 0xc3b0], 7
mov word [ebp - 0xc3c4], ax
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x1000761e
mov ecx, dword [ebp - 0xc3dc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10007614
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea edi, [ebp - 0x1a]
nop dword [eax]
mov eax, 0xcccccccd
sub edi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [edi], cx
mov ecx, edx
test ecx, ecx
jne 0x10007630
xor eax, eax
mov dword [ebp - 0xc3cc], edx
mov word [ebp - 0xc3dc], ax
lea eax, [ebp - 0x1a]
mov dword [ebp - 0xc3c8], 7
cmp edi, eax
je 0x10007681
sub eax, edi
lea ecx, [ebp - 0xc3dc]
sar eax, 1
push eax
push edi
call fcn.10008530
push 0x12
xor eax, eax
mov byte [ebp - 4], 0xa
push str..pipeLUNA_HOOK
lea ecx, [ebp - 0xc3c4]
mov dword [ebp - 0xc3b4], 0
mov dword [ebp - 0xc3b0], 7
mov word [ebp - 0xc3c4], ax
call fcn.10008530
mov eax, dword [ebp - 0xc3b0]
mov ecx, dword [ebp - 0xc3b4]
sub eax, ecx
mov edx, dword [ebp - 0xc3cc]
mov edi, dword [ebp - 0xc3c8]
mov byte [ebp - 4], 0xb
cmp edx, eax
jbe 0x10007703
mov eax, edi
sub eax, edx
cmp eax, ecx
jb 0x10007703
cmp dword [ebp - 0xc3b0], 8
lea eax, [ebp - 0xc3c4]
push ecx
cmovae eax, dword [ebp - 0xc3c4]
lea ecx, [ebp - 0xc3dc]
push eax
push 0
call fcn.10008d00
jmp 0x10007720
cmp edi, 8
lea eax, [ebp - 0xc3dc]
push edx
cmovae eax, dword [ebp - 0xc3dc]
lea ecx, [ebp - 0xc3c4]
push eax
call fcn.100082c0
or dword [ebp - 0xc664], 0x1fc
xor ecx, ecx
mov dword [ebp - 0xc39c], 0
mov dword [ebp - 0xc398], 0
movups xmm0, xmmword [eax]
push ecx
push 0x80
movups xmmword [ebp - 0xc3ac], xmm0
push 3
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xc39c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea eax, [ebp - 0xc3ac]
cmp dword [ebp - 0xc398], 8
push ecx
cmovae eax, dword [ebp - 0xc3ac]
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [0x101312c8]
mov byte [ebp - 4], 0xc
mov dword [0x101312c8], eax
test ecx, ecx
je 0x100077b2
cmp ecx, 0xffffffff
je 0x100077b2
push ecx
call dword [0x100ffc5c]
mov edx, dword [ebp - 0xc398]
mov byte [ebp - 4], 0xb
cmp edx, 8
jb 0x100077f6
mov ecx, dword [ebp - 0xc3ac]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100077ec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
mov edx, dword [ebp - 0xc3b0]
xor eax, eax
mov dword [ebp - 0xc39c], 0
mov dword [ebp - 0xc398], 7
mov word [ebp - 0xc3ac], ax
mov byte [ebp - 4], 0xa
cmp edx, 8
jb 0x10007857
mov ecx, dword [ebp - 0xc3c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1000784d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
mov edx, dword [ebp - 0xc3c8]
xor eax, eax
mov dword [ebp - 0xc3b4], 0
mov dword [ebp - 0xc3b0], 7
mov word [ebp - 0xc3c4], ax
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x100078b8
mov ecx, dword [ebp - 0xc3dc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100078ae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007c65
push edx
push ecx
call fcn.100ca2ff
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
jmp 0x100070f0
push 0
push 0
lea eax, [ebp - 0xc670]
mov dword [ebp - 0xc670], 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
call edi
push 0
mov dword [ebp - 0xc394], eax
lea eax, [ebp - 0xc66c]
push eax
push 4
lea eax, [ebp - 0xc394]
push eax
push dword [0x101312c8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov dword [ebp - 0x18], 0x3a0005
push eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc66c]
push eax
push 8
lea eax, [ebp - 0x18]
push eax
push dword [0x101312c8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push str.pipe_connected
call fcn.100060e0
add esp, 4
call fcn.10078d50
cmp byte [ebp - 0xc65d], 0
mov byte [0x10138c1d], 1
je 0x10007bab
push 0
lea eax, [ebp - 0xc66c]
push eax
push 0xc350
lea eax, [ebp - 0xc394]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10007ba5
mov eax, dword [ebp - 0xc394]
cmp eax, 5
ja case.0x10007980.3
jmp dword [eax*4 + 0x10007c6c]
mov eax, dword [0x10138c20]
lea esi, [ebp - 0xc394]
mov ecx, 0x282
lea edi, [ebp - 0xd084]
add eax, 1
rep movsd dword es:[edi], dword [esi]
mov dword [0x10138c20], eax
jns 0x100079c1
neg eax
push eax
lea eax, [ebp - 0xc397]
push eax
call fcn.10005580
mov byte [eax - 1], 0x2d
lea ecx, [eax - 1]
jmp 0x100079d0
push eax
lea eax, [ebp - 0xc397]
push eax
call fcn.10005580
mov ecx, eax
lea eax, [ebp - 0xc397]
mov dword [ebp - 0xc3b4], 0
add esp, 8
mov dword [ebp - 0xc3b0], 0xf
mov byte [ebp - 0xc3c4], 0
cmp ecx, eax
je 0x10007a07
sub eax, ecx
push eax
push ecx
lea ecx, [ebp - 0xc3c4]
call fcn.10008440
mov esi, dword [ebp - 0xc664]
or esi, 0x600
push 8
push str.UserHook
push 0
lea ecx, [ebp - 0xc3c4]
mov byte [ebp - 4], 0xe
call fcn.10008b20
mov dword [ebp - 0xc3cc], 0
or esi, 0x800
mov dword [ebp - 0xc3c8], 0
mov dword [ebp - 0xc664], esi
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xc3dc], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xc3cc], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
cmp dword [ebp - 0xc3c8], 0x10
lea eax, [ebp - 0xc3dc]
mov ecx, 0x280
mov byte [ebp - 4], 0xf
cmovae eax, dword [ebp - 0xc3dc]
lea esi, [ebp - 0xd07c]
push eax
sub esp, 0xa00
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.100063b0
add esp, 0xa04
lea ecx, [ebp - 0xc3dc]
call fcn.10005a00
lea ecx, [ebp - 0xc3c4]
mov byte [ebp - 4], 2
call fcn.10005a00
mov esi, dword [ebp - 0xc668]
jmp case.0x10007980.3
mov ecx, dword [0x10138aec]
lea eax, [ecx + 0x68fb00]
mov dword [ebp - 0xc674], eax
cmp ecx, eax
je case.0x10007980.3
nop dword [eax + eax]
mov edi, dword [ecx + 0xa00]
sub edi, dword [ebp - 0xc38c]
mov eax, dword [ecx + 0xa04]
sbb eax, dword [ebp - 0xc388]
cdq
xor eax, edx
xor edi, edx
sub edi, edx
sbb eax, edx
js 0x10007b2c
jg 0x10007b19
test edi, edi
je 0x10007b2c
add ecx, 0xac0
cmp ecx, dword [ebp - 0xc674]
jne 0x10007af0
jmp case.0x10007980.3
call fcn.10009800
jmp case.0x10007980.3
cmp word [ebp - 0xc154], 0
lea esi, [ebp - 0xc394]
mov ecx, 0xa0
lea edi, [ebp - 0xc65c]
rep movsd dword es:[edi], dword [esi]
je 0x10007b73
push dword [ebp - 0xc354]
lea eax, [ebp - 0xc41c]
push eax
call fcn.1000c970
mov esi, dword [ebp - 0xc668]
add esp, 8
jmp case.0x10007980.3
sub esp, 0x278
lea esi, [ebp - 0xc38c]
mov ecx, 0x9e
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.1000c560
mov esi, dword [ebp - 0xc668]
add esp, 0x278
jmp case.0x10007980.3
mov byte [ebp - 0xc65d], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push esi
mov dword [ebp - 4], 0x10
call dword [0x100ffc5c]
mov eax, dword [0x101312c8]
mov dword [ebp - 4], 0
mov dword [0x101312c8], 0xffffffff
test eax, eax
je 0x10007bdf
cmp eax, 0xffffffff
je 0x10007bdf
push eax
call dword [0x100ffc5c]
cmp byte [ebp - 0xc65d], 0
mov dword [ebp - 4], 0xffffffff
jne 0x100070c0
cmp byte [0x10138c1c], 0
je 0x10007c27
push 0
mov byte [0x10138c1d], 0
call fcn.10007070
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100ca30d
mov esp, ebp
pop ebp
ret 4
call fcn.10081f00
mov esi, dword [0x10138aec]
lea edi, [esi + 0x68fb00]
cmp esi, edi
je 0x10007c51
nop dword [eax]
mov ecx, esi
call fcn.10009800
add esi, 0xac0
cmp esi, edi
jne 0x10007c40
push 0
push str.LunaHook32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibraryAndExitThread]
call fcn.100d55d9
nop
xchg dword [ecx], edi
adc cl, dl
jp 0x10007c73
adc byte [esi], dh
jnp 0x10007c77
adc byte [ecx + 0x79], dl
add byte [eax], dl
push ecx
jns 268467327
adc byte [esi - 0x33efff85], bl
int3