Function at 0x1003b900
Capabilities:
Check mutex on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
imul esi, dword [ebx], 0x2c
add esi, 0x100800d8
cmp dword [esi + 0x24], 0
lea ebp, [esi + 0x24]
mov dword [esp + 0x14], ebp
jne 0x1003b944
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, eax
test edx, edx
je 0x1003b955
mov ecx, edx
xor eax, eax
lock cmpxchg dword [ebp], ecx
test eax, eax
je 0x1003b944
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x1003b95b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esi + 0x28]
test edi, edi
jne 0x1003bac1
cmp dword [esi], edi
jne 0x1003b978
push dword [ebp]
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1003ba6b
push str.Creating_connections_registry
push 0x40
push str.C:UsersJesse_source_reposSNPJuiceout_buildx86_release_depsjuice_src_srcconn.c
push 1
call fcn.10034290
push 0x14
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x1003b9c2
push str.Memory_allocation_failed_for_connections_registry
push 0x44
push str.C:UsersJesse_source_reposSNPJuiceout_buildx86_release_depsjuice_src_srcconn.c
push 5
call fcn.10034290
add esp, 0x10
push dword [ebp]
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1003ba6b
push 0x40
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [edi + 8], eax
test eax, eax
jne 0x1003b9fc
push str.Memory_allocation_failed_for_connections_array
push 0x4a
push str.C:UsersJesse_source_reposSNPJuiceout_buildx86_release_depsjuice_src_srcconn.c
push 5
call fcn.10034290
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x14
push dword [ebp]
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1003ba6b
push 0x40
push 0
push eax
mov dword [edi + 0xc], 0x10
mov dword [edi + 0x10], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [edi + 4], eax
test eax, eax
jne 0x1003ba30
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [edi + 4]
push eax
call fcn.1003be00
push dword [esp + 0x1c]
mov eax, dword [esi]
push edi
call eax
add esp, 0xc
test eax, eax
je 0x1003babc
push dword [edi + 4]
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call ebp
push dword [edi + 8]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push edi
call esi
mov eax, dword [esp + 0x1c]
add esp, 8
push dword [eax]
call ebp
push str.Creating_connection
push 0x88
push str.C:UsersJesse_source_reposSNPJuiceout_buildx86_release_depsjuice_src_srcconn.c
push 1
call fcn.10034290
imul eax, dword [ebx], 0x2c
mov ecx, dword [esp + 0x28]
push ecx
push 0
push ebx
mov eax, dword [eax + 0x100800e0]
call eax
add esp, 0x1c
test eax, eax
je 0x1003baad
push dword [4]
call ebp
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
mov dword [ebx + 0xad14], 0xffffffff
jmp 0x1003bbce
mov dword [esi + 0x28], edi
jmp 0x1003bacd
lea eax, [edi + 4]
push eax
call fcn.1003be00
add esp, 4
push dword [ebp]
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call ebp
push str.Creating_connection
push 0x88
push str.C:UsersJesse_source_reposSNPJuiceout_buildx86_release_depsjuice_src_srcconn.c
push 1
call fcn.10034290
mov ecx, dword [edi + 0xc]
lea eax, [edi + 0xc]
add esp, 0x10
mov dword [esp + 0x14], eax
xor esi, esi
test ecx, ecx
jle 0x1003bb11
mov eax, dword [edi + 8]
cmp dword [eax], 0
je 0x1003bb11
inc esi
add eax, 4
cmp esi, ecx
jl 0x1003bb04
cmp esi, ecx
jne 0x1003bb94
lea ebp, [ecx + ecx]
push ebp
push str.Reallocating_connections_array__new_size_d
push 0x90
push str.C:UsersJesse_source_reposSNPJuiceout_buildx86_release_depsjuice_src_srcconn.c
push 1
call fcn.10034290
lea eax, [ebp*4]
push eax
push dword [edi + 8]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 0x1c
test eax, eax
jne 0x1003bb71
push str.Memory_reallocation_failed_for_connections_array
push 0x96
push str.C:UsersJesse_source_reposSNPJuiceout_buildx86_release_depsjuice_src_srcconn.c
push 5
call fcn.10034290
add esp, 0x10
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
mov ecx, dword [esp + 0x14]
mov dword [edi + 8], eax
lea eax, [eax + esi*4]
mov dword [ecx], ebp
sub ebp, esi
shl ebp, 2
push ebp
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
add esp, 0xc
imul eax, dword [ebx], 0x2c
mov ecx, dword [esp + 0x18]
push ecx
push edi
push ebx
mov eax, dword [eax + 0x100800e0]
call eax
add esp, 0xc
test eax, eax
je 0x1003bbba
push dword [edi + 4]
call ebp
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
mov eax, dword [edi + 8]
mov dword [eax + esi*4], ebx
mov dword [ebx + 0xad14], esi
push dword [edi + 4]
inc dword [edi + 0x10]
call ebp
cmp dword [ebx + 0xad18], 0
je 0x1003bbe6
imul eax, dword [ebx], 0x2c
push ebx
mov eax, dword [eax + 0x100800f0]
call eax
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret