Function at 0x402230
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x49a860
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x4cb08c]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov eax, dword [0x4cb08c]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
cmp dword [ebp + 8], 6
mov edi, dword [ebp + 0xc]
jge 0x40227f
push str.ku_arg_error._n
call fcn.00471826
jmp 0x402562
mov ecx, dword [edi + 0x14]
xor ebx, ebx
mov eax, ecx
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
lea esi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4022a0
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x44]
call fcn.00402dd0
push 5
mov dword [esp + 0x6c], ebx
mov eax, dword [esp + 0x54]
push str.kukey
push eax
push ebx
lea ecx, [esp + 0x4c]
call fcn.004029f0
test eax, eax
je 0x4022f6
push str.ku_param_error._n
call fcn.00471826
add esp, 4
cmp dword [esp + 0x54], 0x10
jb 0x402565
mov ecx, dword [esp + 0x40]
push ecx
jmp 0x40255d
push str.KUUniqueMutex0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40233f
push str.ku_not_unique__quit._n
call fcn.00471826
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x54], 0x10
jb 0x402565
mov edx, dword [esp + 0x40]
push edx
jmp 0x40255d
mov dword [esp + 0x38], esi
mov byte [esp + 0x68], 1
mov ecx, dword [edi + 4]
mov eax, ecx
mov esi, 0x25
mov byte [esp + 0x10], 0
lea ebx, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x402360
sub eax, ebx
push eax
push ecx
mov ecx, 0x4ccbe8
call fcn.00402dd0
call fcn.004020a0
mov ebx, dword [ebp + 8]
cmp ebx, 3
jle 0x4023ac
mov eax, dword [edi + 0xc]
push eax
call fcn.004716e6
add esp, 4
cmp ebx, 4
mov esi, eax
jle 0x4023ac
mov ecx, dword [edi + 0x10]
push ecx
call fcn.004716e6
add esp, 4
test eax, eax
setne dl
mov byte [esp + 0x10], dl
call fcn.00414a00
call fcn.00414c30
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.00401b50
add esp, 8
push str.update
lea ecx, [esp + 0x20]
call fcn.004025b0
mov bl, 2
lea eax, [esp + 0x10]
mov byte [esp + 0x68], bl
call fcn.00401a70
push 0x87
push str.main
mov byte [esp + 0x70], 3
mov eax, dword [eax]
push str._s__d__start
push 0x20
lea ecx, [esp + 0x2c]
mov edx, eax
call fcn.00416b70
mov ecx, eax
call fcn.00416fe0
add esp, 0x10
lea eax, [esp + 0x10]
mov byte [esp + 0x68], bl
call fcn.004027a0
mov ebx, 0x10
mov byte [esp + 0x68], 1
cmp dword [esp + 0x34], ebx
jb 0x402438
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004716d0
add esp, 4
lea esi, [esp + 0x10]
call fcn.00405bf0
mov byte [esp + 0x68], 4
call fcn.004026f0
mov eax, esi
mov byte [esp + 0x68], 1
call fcn.004027a0
mov edx, dword [edi + 8]
mov eax, dword [edi + 4]
mov ecx, dword [0x4d29e0]
push edx
push eax
push ecx
call fcn.004065b0
mov edx, dword [0x4d2a34]
mov eax, dword [0x4d2a6c]
push edx
push eax
call fcn.004154d0
push str.update
lea ecx, [esp + 0x20]
call fcn.004025b0
lea eax, [esp + 0x10]
mov byte [esp + 0x68], 5
call fcn.00401a70
push 0x8e
push str.main
mov byte [esp + 0x70], 6
mov eax, dword [eax]
push str._s__d__finish
push 0x20
lea ecx, [esp + 0x2c]
mov edx, eax
call fcn.00416b70
mov ecx, eax
call fcn.00416fe0
add esp, 0x10
lea eax, [esp + 0x10]
mov byte [esp + 0x68], 5
call fcn.004027a0
mov byte [esp + 0x68], 1
cmp dword [esp + 0x34], ebx
jb 0x4024ec
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004716d0
add esp, 4
mov ebx, dword [0x4d2a78]
call fcn.00427650
mov edx, dword [0x4d29e0]
push edx
call fcn.00406a60
call fcn.00402750
call fcn.00414cc0
call fcn.00414a70
lea eax, [esp + 0x10]
call fcn.00401a70
mov byte [esp + 0x68], 7
mov edi, dword [eax]
mov ebx, 0x4d2ad8
call fcn.00427650
call fcn.00416a00
lea eax, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.004027a0
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x54], 0x10
jb 0x402565
mov eax, dword [esp + 0x40]
push eax
call fcn.004716d0
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00471497
mov esp, ebp
pop ebp
ret