Function at 0x1003d1f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10091060
push 0x10055d18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffff9c
push ebx
push esi
push edi
mov byte [ebp - 0x19], 0
push 2
push 0
push 0
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1003d260
push 0x100000
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.1003f980
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, byte [0x100e0b68]
test eax, eax
jne 0x1003d282
movzx ecx, byte [0x100e0b69]
test ecx, ecx
jne 0x1003d27b
call fcn.1003e7b0
mov byte [0x100e0b68], 1
mov byte [ebp - 0x19], 1
push 0x100e0b80
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov dword [ebp - 0x2c], 0
jmp 0x1003d2aa
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [0x100e0b74]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x44]
jge 0x1003d2e8
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x100e0b70]
lea ecx, [eax + edx*4]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call fcn.100560b1
add esp, 8
test eax, eax
jne 0x1003d2e6
mov byte [ebp - 0x19], 0
jmp 0x1003d2e8
jmp 0x1003d2a1
mov dword [ebp - 4], 0xffffffff
call fcn.1003d2f6
jmp 0x1003d302
movzx eax, byte [ebp - 0x19]
test eax, eax
je 0x1003d5a9
push 8
push 0
lea ecx, [ebp - 0x54]
push ecx
call fcn.10055aa0
add esp, 0xc
call fcn.1003e690
lea edx, [ebp - 0x54]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.1003e710
add esp, 8
cmp dword [ebp + 0x1c], 0
jne 0x1003d36d
push 0x10
call fcn.10043c50
test eax, eax
je 0x1003d34d
mov dword [ebp - 0x34], 1
jmp 0x1003d354
mov dword [ebp - 0x34], 0
push 0
movzx ecx, byte [ebp - 0x34]
push ecx
lea edx, [ebp - 0x74]
push edx
lea eax, [ebp - 0x60]
push eax
call fcn.1004e300
add esp, 0x10
jmp 0x1003d374
mov dword [ebp - 0x64], 0
push 0x18
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov dword [ecx], 0x18
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x54]
mov dword [edx + 8], eax
cmp dword [ebp + 0x1c], 0
je 0x1003d3a1
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x38], ecx
jmp 0x1003d3a7
lea edx, [ebp - 0x74]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x38]
mov dword [eax + 0x10], ecx
mov dword [ebp - 0x40], 0xffffffff
push 0
push 0x12c
push 0x104
mov edx, dword [ebp - 0x28]
push edx
lea eax, [ebp - 0x40]
push eax
call dword [0x100e0b50]
push eax
push 0x1007bbd4
call fcn.1003d0a0
add esp, 8
mov byte [ebp - 0x19], al
mov ecx, dword [ebp - 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x64], 0
je 0x1003d406
mov eax, dword [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
movzx ecx, byte [ebp - 0x19]
test ecx, ecx
jne 0x1003d415
xor al, al
jmp 0x1003d5ac
movzx edx, byte [ebp - 0x19]
test edx, edx
je 0x1003d5a9
push str.NtCreatePort_succeeded_n
call fcn.1004ec20
add esp, 4
cmp dword [ebp + 0x14], 0x40
jbe 0x1003d43b
mov dword [ebp + 0x14], 0x40
push 0x4c
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [ebp - 0x20]
mov dword [ecx], eax
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x10
call fcn.10051ffc
add esp, 4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x1003d4b2
mov edx, dword [ebp - 0x24]
mov dword [edx], 0
mov eax, dword [ebp - 0x24]
mov dword [eax + 4], 0
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x24]
mov byte [edx + 0xc], 0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], eax
jmp 0x1003d4b9
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x3c]
mov dword [ecx + 0x48], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0x10]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 0x14]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x40]
mov dword [edx + 0x14], eax
push 0
push 0x7fffffff
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x38], eax
mov edx, dword [ebp - 0x20]
add edx, 0x20
push edx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebp - 0x4c]
push eax
push 0
mov ecx, dword [ebp - 0x20]
push ecx
push 0x1003eb70
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x40], eax
lea eax, [ebp - 0x4c]
push eax
push 0
mov ecx, dword [ebp - 0x20]
push ecx
push 0x1003e860
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x44], eax
push 7
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 1
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0x100e0b80
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x20]
push ecx
mov ecx, 0x100e0b70
call fcn.1003cf90
mov dword [ebp - 4], 0xffffffff
call fcn.1003d59d
jmp 0x1003d5a9
mov al, byte [ebp - 0x19]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret