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

Disassembly:
push ebp
lea ebp, [esp - 0x5c]
sub esp, 0x2d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 4], eax
mov dword [ebp + 0x50], 0
mov dword [ebp + 0x54], 0
mov dword [ebp - 0x170], 0
push 0x148
push 0
lea eax, [ebp - 0x16c]
push eax
call fcn.10055aa0
add esp, 0xc
mov dword [ebp + 0x48], 0
mov ecx, dword [ebp + 0x60]
push ecx
call fcn.1004bcd0
mov dword [ebp], eax
cmp dword [ebp], 0x10000000
je 0x1003fd85
xor eax, eax
jmp 0x100402b6
call fcn.1003f860
movzx edx, al
test edx, edx
je 0x1004005d
push 0x104
push 0
lea eax, [ebp - 0x274]
push eax
call fcn.10055aa0
add esp, 0xc
call fcn.1003dcf0
mov dword [ebp - 0x26c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x274], eax
mov ecx, dword [ebp + 0x74]
mov dword [ebp - 0x30], ecx
push 0
lea edx, [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov eax, dword [ebp - 0x26c]
push eax
mov ecx, dword [ebp + 0x64]
push ecx
push 1
call fcn.1003e090
add esp, 0x18
movzx edx, al
mov dword [ebp + 0x48], edx
cmp dword [ebp + 0x48], 0
je 0x10040058
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 0
mov dword [ebp + 0x38], 0
mov dword [ebp + 0x4c], 0
call fcn.1003e690
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp + 0x64]
push ecx
call fcn.1003e710
add esp, 8
push 0x18
push 0
lea edx, [ebp + 0xc]
push edx
call fcn.10055aa0
add esp, 0xc
push 0x10
push 0
lea eax, [ebp - 0x24]
push eax
call fcn.10055aa0
add esp, 0xc
mov ecx, dword [ebp + 0x6c]
mov dword [ebp - 0x270], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.1003b9c0
mov dword [ebp - 0x268], eax
mov edx, dword [ebp + 0x74]
mov dword [ebp - 0x264], edx
cmp dword [ebp + 0x6c], 0xf0
jbe 0x1003ff0e
push 0xc
push 0
lea eax, [ebp - 0x14]
push eax
call fcn.10055aa0
add esp, 0xc
mov dword [ebp + 0xc], 0x18
push 0
mov ecx, dword [ebp + 0x6c]
push ecx
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp + 0x10], eax
mov edx, dword [ebp + 0x6c]
mov dword [ebp + 0x18], edx
push 0
push 0
push 0
push 0xf001f
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x1c], 0
je 0x1003fef3
mov ecx, dword [ebp + 0x6c]
push ecx
mov edx, dword [ebp + 0x68]
push edx
mov eax, dword [ebp + 0x1c]
push eax
call fcn.10055450
add esp, 0xc
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp + 0x1c], 0
mov dword [ebp - 0x14], 0xc
mov edx, dword [ebp + 0x6c]
mov dword [ebp - 0x10], edx
lea eax, [ebp + 0xc]
mov dword [ebp + 0x40], eax
lea ecx, [ebp - 0x14]
mov dword [ebp + 0x44], ecx
jmp 0x1003ff33
mov edx, dword [ebp + 0x6c]
push edx
mov eax, dword [ebp + 0x68]
push eax
lea ecx, [ebp - 0x260]
push ecx
call fcn.10055450
add esp, 0xc
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 0
mov dword [ebp + 0x38], 0x104
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp + 0x28], eax
mov edx, 1
test edx, edx
je 0x1003ffbf
mov dword [ebp + 0x4c], 0
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp - 0x274]
push ecx
push 0
mov edx, dword [ebp + 0x44]
push edx
mov eax, dword [ebp + 0x40]
push eax
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp + 0x4c]
push eax
call dword [0x100e0b54]
mov dword [ebp + 0x30], eax
cmp dword [ebp + 0x30], 0
je 0x1003ff92
cmp dword [ebp + 0x30], 0xc0000034
je 0x1003ff92
cmp dword [ebp + 0x4c], 0
je 0x1003ff94
jmp 0x1003ffbf
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp + 0x34], eax
mov ecx, dword [ebp + 0x34]
cmp ecx, dword [ebp + 0x28]
jb 0x1003ffb3
mov edx, dword [ebp + 0x34]
sub edx, dword [ebp + 0x28]
cmp edx, 0x12c
jb 0x1003ffb5
jmp 0x1003ffbf
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1003ff43
cmp dword [ebp + 0x4c], 0
je 0x1003ffcf
mov eax, dword [ebp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.SendIpcMessage:_NtConnectPort_complete_n
call fcn.1004ec20
add esp, 4
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x10], 0
je 0x1003fff6
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x274], 0
je 0x10040016
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x274], eax
je 0x10040016
mov dword [ebp + 0x3c], 1
jmp 0x1004001d
mov dword [ebp + 0x3c], 0
mov eax, dword [ebp + 0x3c]
mov dword [ebp + 0x50], eax
cmp dword [ebp + 0x50], 0
je 0x1004004b
cmp dword [ebp + 0x74], 0
je 0x1004004b
mov ecx, dword [ebp - 0x274]
sub ecx, 1
push ecx
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x54], eax
jmp 0x10040058
push str.SendIpcMessage:__LpcPortThread_did_not_fill_in_the_process_ID_n
call fcn.1004ec20
add esp, 4
jmp 0x10040200
push 0
lea edx, [ebp + 0x24]
push edx
lea eax, [ebp - 0x170]
push eax
mov ecx, dword [ebp + 0x64]
push ecx
call fcn.1003f230
add esp, 0x10
movzx edx, al
test edx, edx
je 0x10040200
mov eax, dword [ebp + 0x74]
mov dword [ebp - 0x30], eax
push 0
lea ecx, [ebp - 0x38]
push ecx
push 0
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp + 0x64]
push eax
push 1
call fcn.1003e090
add esp, 0x18
movzx ecx, al
mov dword [ebp + 0x48], ecx
cmp dword [ebp + 0x48], 0
je 0x100401ec
mov edx, dword [ebp - 0x16c]
push edx
push 0
push 0x100040
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x54], eax
cmp dword [ebp + 0x54], 0
je 0x100401ec
push 2
push 0
push 0
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov ecx, dword [ebp - 0x164]
push ecx
mov edx, dword [ebp + 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x100401ec
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.1003b9c0
mov dword [ebp + 8], eax
push 0
lea eax, [ebp + 0x58]
push eax
push 4
lea ecx, [ebp + 0x6c]
push ecx
mov edx, dword [ebp - 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100401d2
cmp dword [ebp + 0x58], 4
jne 0x100401d2
push 0
lea eax, [ebp + 0x58]
push eax
push 4
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100401d2
cmp dword [ebp + 0x58], 4
jne 0x100401d2
push 0
lea eax, [ebp + 0x58]
push eax
push 4
lea ecx, [ebp + 8]
push ecx
mov edx, dword [ebp - 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100401d2
cmp dword [ebp + 0x58], 4
jne 0x100401d2
push 0
lea eax, [ebp + 0x58]
push eax
push 4
lea ecx, [ebp + 0x74]
push ecx
mov edx, dword [ebp - 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100401d2
cmp dword [ebp + 0x58], 4
jne 0x100401d2
push 0
lea eax, [ebp + 0x58]
push eax
mov ecx, dword [ebp + 0x6c]
push ecx
mov edx, dword [ebp + 0x68]
push edx
mov eax, dword [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100401d2
mov ecx, dword [ebp + 0x58]
cmp ecx, dword [ebp + 0x6c]
jne 0x100401d2
mov dword [ebp + 0x2c], 1
jmp 0x100401d9
mov dword [ebp + 0x2c], 0
mov edx, dword [ebp + 0x2c]
mov dword [ebp + 0x50], edx
mov eax, dword [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x54], 0
je 0x1004028a
cmp dword [ebp + 0x50], 0
je 0x1004027e
cmp dword [ebp + 0x74], 0
je 0x1004027e
mov eax, dword [ebp + 0x7c]
push eax
push 5
call fcn.10043c50
push eax
mov ecx, dword [ebp + 0x54]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.1003f890
add esp, 0x10
movzx eax, al
test eax, eax
je 0x10040277
mov ecx, dword [ebp + 0x7c]
push ecx
mov edx, dword [ebp + 0x78]
push edx
mov eax, dword [ebp + 0x54]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.1003f890
add esp, 0x10
movzx edx, al
test edx, edx
je 0x1004026e
mov eax, dword [ebp + 0x74]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp + 0x70]
push edx
call fcn.10055450
add esp, 0xc
jmp 0x10040275
mov dword [ebp + 0x50], 0
jmp 0x1004027e
mov dword [ebp + 0x50], 0
mov eax, dword [ebp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10040297
push str._SendIpcMessage:_ProcessID_was_not_filled_in_by_server_n
call fcn.1004ec20
add esp, 4
cmp dword [ebp + 0x48], 0
je 0x100402a9
lea ecx, [ebp - 0x38]
push ecx
call fcn.1003d110
add esp, 4
mov edx, dword [ebp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x50]
add ebp, 0x5c
mov esp, ebp
pop ebp
ret 0x1c