Function at 0x417940
Capabilities:
Accept command line arguments
Check mutex on windows
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59de00
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x61de38]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 0x2c], 0
je 0x417989
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0xb
push str.R2_QUEEN___
lea ecx, [edi + 0x44]
call fcn.00411530
push str.R2_QUEEN___
lea eax, [ebp - 0x28]
push str._s_sym
push eax
call fcn.00402ec0
add esp, 0xc
push dword [eax]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [edi + 0x38]
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test ecx, ecx
je 0x4179e2
cmp dword [edi + 0x3c], 0
je 0x4179db
push ecx
mov dword [edi + 0x3c], 0
call eax
mov ecx, dword [edi + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], 0
mov dword [edi + 0x38], esi
je 0x4179f9
push dword [ebp - 0x28]
call fcn.0041a8f9
mov esi, dword [edi + 0x38]
add esp, 4
test esi, esi
jne 0x417a13
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edx, eax
mov dword [ebp - 0x18], 0
xor ecx, ecx
mov eax, 0x6279a8
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], eax
test edx, edx
je 0x417a51
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417a38
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x1c]
call fcn.00411530
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
lea esi, [eax + ecx]
mov dword [ebp - 4], 0
push 2
push 0x5fc3c8
mov edx, esi
mov ecx, eax
call fcn.00587470
mov ecx, dword [ebp - 0x1c]
mov edx, esi
push 2
push 0x5fc3c4
mov ebx, eax
call fcn.00587470
add esp, 0x10
test ebx, ebx
je 0x417a93
test eax, eax
je 0x417a93
push eax
push ebx
lea ecx, [ebp - 0x1c]
call fcn.00411a20
lea eax, [edi + 0x58]
push eax
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00412190
push 0xb
push str.R2_QUEEN___
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 0x6279a8
call fcn.00411530
push 0xb
push str.shared_data
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00411610
lea ecx, [edi + 4]
call fcn.004131a0
push dword [ebp - 0x28]
lea ecx, [edi + 0x14]
sub esp, 0xc
call fcn.00402b40
test eax, eax
jne 0x417b12
cmp dword [edi + 0x18], 0xb7
jne 0x417d37
push dword [ebp - 0x28]
push ecx
lea ecx, [edi + 0x14]
call fcn.00413080
test eax, eax
je 0x417d37
sub esp, 0xc
mov dword [edi + 0x28], 0
lea ecx, [edi + 0x14]
mov dword [edi + 0xc], 0xc
call fcn.00402bc0
push 4
mov dword [edi + 8], eax
call fcn.0041a8c1
mov dword [edi + 0x10], eax
add esp, 4
mov dword [eax], 0
cmp dword [edi + 8], 0
je 0x417d37
push 0xffffffffffffffff
push dword [edi + 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x417b61
mov dword [edi + 0x3c], 1
cmp dword [edi + 0x28], 1
mov eax, dword [edi + 8]
mov dword [edi], eax
jne 0x417b79
mov dword [eax], 0
mov dword [eax + 8], 0
cmp dword [edi + 0x3c], 0
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
je 0x417b91
push dword [edi + 0x38]
mov dword [edi + 0x3c], 0
call ebx
push str.R2_QUEEN___
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [edi + 0x30]
mov esi, eax
test ecx, ecx
je 0x417bc7
cmp dword [edi + 0x34], 0
je 0x417bbc
push ecx
mov dword [edi + 0x34], 0
call ebx
mov ecx, dword [edi + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call ebx
jmp 0x417bcd
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x30], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x417c29
mov eax, dword [edi + 0x30]
test eax, eax
je 0x417c06
cmp dword [edi + 0x34], 0
je 0x417bfc
push eax
mov eax, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [edi + 0x34], 0
call eax
mov eax, dword [edi + 0x30]
push eax
call ebx
mov dword [edi + 0x30], 0
mov eax, dword [edi]
cmp dword [eax], 2
jne 0x417c20
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x417b91
mov dword [edi + 0x40], 1
jmp 0x417c30
mov dword [edi + 0x40], 0
lea ebx, [edi + 0x80]
mov ecx, ebx
call fcn.00414ff0
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 1
push 0
call esi
push 0
push 0
push 1
push 0
mov dword [edi + 0x68], eax
call esi
push 0
push 0
push 1
push 0
mov dword [edi + 0x6c], eax
call esi
cmp dword [edi + 0x68], 0
mov dword [edi + 0x70], eax
je 0x417c81
cmp dword [edi + 0x6c], 0
je 0x417c81
test eax, eax
je 0x417c81
mov esi, 1
jmp 0x417c83
xor esi, esi
test ebx, ebx
je 0x417c8e
mov ecx, ebx
call fcn.00415060
test esi, esi
je 0x417d37
mov ecx, ebx
lea esi, [edi + 0x60]
call fcn.00414ff0
mov ecx, ebx
call fcn.00414ff0
cmp dword [esi + 4], 0xffffffff
je 0x417cbc
test ebx, ebx
je 0x417cb8
mov ecx, ebx
call fcn.00415060
xor esi, esi
jmp 0x417d12
cmp dword [esi + 8], 0
jne 0x417ccd
mov ecx, esi
call fcn.00415160
test eax, eax
je 0x417cad
lea eax, [ebp - 0x10]
mov dword [esi + 0x14], 0x417d80
push eax
push 0
push esi
push 0x415310
push 0
push 0
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], 0x1f4
call fcn.005680d2
add esp, 0x18
mov dword [esi + 4], eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test ebx, ebx
je 0x417d0d
mov ecx, ebx
call fcn.00415060
mov esi, 1
test ebx, ebx
je 0x417d1d
mov ecx, ebx
call fcn.00415060
test esi, esi
je 0x417d37
mov eax, dword [edi]
mov esi, 1
mov dword [eax], 1
mov dword [edi + 0x2c], 1
jmp 0x417d39
xor esi, esi
cmp dword [ebp - 0x24], 0
je 0x417d4a
push dword [ebp - 0x28]
call fcn.0041a8f9
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x417d5b
push dword [ebp - 0x1c]
call fcn.0041a8f9
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4