Function at 0x4166b0
Capabilities:
Check mutex on windows
Connect pipe
Read .ini file
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x478
cmp dword [0x5d53390], 0x13f7
mov eax, dword [ebp + 8]
mov ecx, dword [0x41af00]
push ebx
mov ebx, dword [eax]
mov eax, dword [eax + 4]
push esi
push edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], 0xc6ef3720
mov dword [ebp - 0x24], ecx
jne 0x4166f0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
cmp dword [0x5d53390], 0x786
mov edx, dword [0x41af04]
mov eax, dword [0x41af08]
mov ecx, dword [0x41af0c]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], ecx
jne 0x416731
push 0
lea edx, [ebp - 0x14]
push edx
push 0
lea eax, [ebp - 0x474]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CallNamedPipeA]
mov dword [ebp - 0x14], 0x20
jmp 0x416743
mov ebx, dword [ebp - 0xc]
mov edi, ebx
shl edi, 4
cmp dword [0x5d53390], 0x36f
jne 0x41675e
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
mov esi, ebx
shr esi, 5
add esi, dword [ebp - 0x28]
add edi, ecx
add edx, ebx
xor edi, edx
cmp dword [0x5d53390], 0x3f5
mov dword [0x5d529ac], 0xe9ea0636
jne 0x4167ae
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
push 0
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
xor esi, edi
cmp dword [0x5d53390], 0x6e6
jne 0x4167f5
push 0
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0x30
lea ecx, [ebp - 0x6c]
push 0
push ecx
mov dword [ebp - 0x70], 0
call fcn.00403b80
add esp, 0xc
push 0
lea edx, [ebp - 0x70]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigW]
mov ebx, dword [ebp - 0x10]
sub ebx, esi
cmp dword [0x5d53390], 0x839
mov dword [ebp - 0x10], ebx
jne 0x416815
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetTapeParameters]
mov edi, ebx
shl edi, 4
cmp dword [0x5d53390], 0x78c
jne 0x416846
push 0
push 0
call sub.KERNEL32.dll_SetSystemPowerState
push 0
lea eax, [ebp - 0x34]
push eax
push 0
lea ecx, [ebp - 0x474]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
mov edx, dword [ebp - 8]
add edi, dword [ebp - 0x24]
add ebx, edx
cmp dword [0x5d53390], 0x196
jne 0x416864
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessPriorityBoost]
mov esi, dword [ebp - 0x10]
shr esi, 5
add esi, dword [ebp - 0x1c]
cmp dword [0x5d53390], 0xec6
mov dword [0x5d529b0], 0xcbd61084
mov dword [0x5d529b4], 0xffffffff
jne 0x41689f
push 0
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateJobObjectA]
add dword [ebp - 8], 0x61c88647
xor esi, ebx
xor esi, edi
sub dword [ebp - 0xc], esi
sub dword [ebp - 0x14], 1
jne 0x416740
cmp dword [0x5d53390], 0x8d4
jne 0x4168dc
push 0
push 0
lea eax, [ebp - 0x474]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesA]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalWire]
cmp dword [0x5d53390], 0x107
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [eax], ecx
mov dword [eax + 4], edx
jne 0x4168fe
push 0
call dword [sym.imp.KERNEL32.dll_LocalLock]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4