Function at 0x10001020
Capabilities:
Check for time delay via gettickcount
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x164], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x160], 0
push 0x148
push 0
lea eax, [ebp - 0x15c]
push eax
call fcn.10033470
add esp, 0xc
mov dword [ebp - 8], 0
call fcn.10001000
movzx ecx, al
test ecx, ecx
je 0x100013e8
push 0x104
push 0
lea edx, [ebp - 0x270]
push edx
call fcn.10033470
add esp, 0xc
call fcn.10002130
mov dword [ebp - 0x268], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x270], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x20], eax
push 0
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov edx, dword [ebp - 0x268]
push edx
mov eax, dword [ebp + 8]
push eax
push 1
call fcn.10001940
add esp, 0x18
movzx ecx, al
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x100013e3
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x2c0], 0
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 0
call fcn.10001750
lea edx, [ebp - 0x29c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.100016b0
add esp, 8
push 0x18
push 0
lea ecx, [ebp - 0x2b8]
push ecx
call fcn.10033470
add esp, 0xc
push 0x10
push 0
lea edx, [ebp - 0x280]
push edx
call fcn.10033470
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x26c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.10003ad0
mov dword [ebp - 0x264], eax
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x260], ecx
cmp dword [ebp + 0x10], 0xf0
jbe 0x10001238
push 0xc
push 0
lea edx, [ebp - 0x294]
push edx
call fcn.10033470
add esp, 0xc
mov dword [ebp - 0x2b8], 0x18
push 0
mov eax, dword [ebp + 0x10]
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x2b4], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x2ac], ecx
push 0
push 0
push 0
push 0xf001f
mov edx, dword [ebp - 0x2b4]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x2a8], eax
cmp dword [ebp - 0x2a8], 0
je 0x1000120b
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x2a8]
push edx
call fcn.100335d0
add esp, 0xc
mov eax, dword [ebp - 0x2a8]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x294], 0xc
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x290], ecx
lea edx, [ebp - 0x2b8]
mov dword [ebp - 0x2a0], edx
lea eax, [ebp - 0x294]
mov dword [ebp - 0x2c0], eax
jmp 0x10001263
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x25c]
push eax
call fcn.100335d0
add esp, 0xc
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x2c0], 0
mov dword [ebp - 0x288], 0x104
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2bc], eax
mov ecx, 1
test ecx, ecx
je 0x1000132c
mov dword [ebp - 0x284], 0
lea edx, [ebp - 0x288]
push edx
lea eax, [ebp - 0x270]
push eax
push 0
mov ecx, dword [ebp - 0x2c0]
push ecx
mov edx, dword [ebp - 0x2a0]
push edx
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x29c]
push ecx
lea edx, [ebp - 0x284]
push edx
call dword [0x10082874]
mov dword [ebp - 0x2c8], eax
cmp dword [ebp - 0x2c8], 0
je 0x100012ed
cmp dword [ebp - 0x2c8], 0xc0000034
je 0x100012ed
cmp dword [ebp - 0x284], 0
je 0x100012ef
jmp 0x1000132c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2c4], eax
mov eax, dword [ebp - 0x2c4]
cmp eax, dword [ebp - 0x2bc]
jb 0x1000131d
mov ecx, dword [ebp - 0x2c4]
sub ecx, dword [ebp - 0x2bc]
cmp ecx, 0x12c
jb 0x1000131f
jmp 0x1000132c
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10001279
cmp dword [ebp - 0x284], 0
je 0x10001342
mov edx, dword [ebp - 0x284]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.SendIpcMessage:_NtConnectPort_complete_n
call fcn.100016a0
add esp, 4
mov eax, dword [ebp - 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x2b4], 0
je 0x10001372
mov ecx, dword [ebp - 0x2b4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x270], 0
je 0x10001395
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x270], eax
je 0x10001395
mov dword [ebp - 0x2d8], 1
jmp 0x1000139f
mov dword [ebp - 0x2d8], 0
mov edx, dword [ebp - 0x2d8]
mov dword [ebp - 0x164], edx
cmp dword [ebp - 0x164], 0
je 0x100013d6
cmp dword [ebp + 0x18], 0
je 0x100013d6
mov eax, dword [ebp - 0x270]
sub eax, 1
push eax
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
jmp 0x100013e3
push str.SendIpcMessage:__LpcPortThread_did_not_fill_in_the_process_ID_n
call fcn.100016a0
add esp, 4
jmp 0x100015cc
push 0
lea ecx, [ebp - 0x2cc]
push ecx
lea edx, [ebp - 0x160]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.100022e0
add esp, 0x10
movzx ecx, al
test ecx, ecx
je 0x100015cc
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x20], edx
push 0
lea eax, [ebp - 0x28]
push eax
push 0
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp + 8]
push edx
push 1
call fcn.10001940
add esp, 0x18
movzx eax, al
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x100015b2
mov ecx, dword [ebp - 0x15c]
push ecx
push 0
push 0x100040
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x100015b2
push 2
push 0
push 0
lea edx, [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov eax, dword [ebp - 0x154]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x100015b2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.10003ad0
mov dword [ebp - 0x2d4], eax
push 0
lea edx, [ebp - 0x2d0]
push edx
push 4
lea eax, [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000158f
cmp dword [ebp - 0x2d0], 4
jne 0x1000158f
push 0
lea edx, [ebp - 0x2d0]
push edx
push 4
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000158f
cmp dword [ebp - 0x2d0], 4
jne 0x1000158f
push 0
lea edx, [ebp - 0x2d0]
push edx
push 4
lea eax, [ebp - 0x2d4]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000158f
cmp dword [ebp - 0x2d0], 4
jne 0x1000158f
push 0
lea edx, [ebp - 0x2d0]
push edx
push 4
lea eax, [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000158f
cmp dword [ebp - 0x2d0], 4
jne 0x1000158f
push 0
lea edx, [ebp - 0x2d0]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000158f
mov eax, dword [ebp - 0x2d0]
cmp eax, dword [ebp + 0x10]
jne 0x1000158f
mov dword [ebp - 0x2dc], 1
jmp 0x10001599
mov dword [ebp - 0x2dc], 0
mov ecx, dword [ebp - 0x2dc]
mov dword [ebp - 0x164], ecx
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2cc]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 0x2cc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
je 0x1000165f
cmp dword [ebp - 0x164], 0
je 0x10001653
cmp dword [ebp + 0x18], 0
je 0x10001653
mov edx, dword [ebp + 0x20]
push edx
push 5
call fcn.10003960
push eax
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.10002060
add esp, 0x10
movzx edx, al
test edx, edx
je 0x10001649
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.10002060
add esp, 0x10
movzx ecx, al
test ecx, ecx
je 0x1000163d
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.100335d0
add esp, 0xc
jmp 0x10001647
mov dword [ebp - 0x164], 0
jmp 0x10001653
mov dword [ebp - 0x164], 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000166c
push str._SendIpcMessage:_ProcessID_was_not_filled_in_by_server_n
call fcn.100016a0
add esp, 4
cmp dword [ebp - 8], 0
je 0x1000167e
lea eax, [ebp - 0x28]
push eax
call fcn.10001f80
add esp, 4
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x164]
mov esp, ebp
pop ebp
ret 0x1c