Function at 0x10058a20
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100dd7b6
mov eax, dword fs:[0]
push eax
sub esp, 0x110
mov eax, dword [0x1010e07c]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push esi
push edi
mov eax, dword [0x1010e07c]
xor eax, esp
push eax
lea eax, [esp + 0x120]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
mov esi, dword [ebp + 0xc]
mov ebx, ecx
mov ecx, dword [ebp + 0x14]
lea edi, [ebx + 4]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edi
mov eax, dword [edi + 4]
sub eax, 0
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], 0
je 0x10058ab5
dec eax
je 0x10058a99
or eax, 0xffffffff
jmp 0x10058ac1
mov eax, dword [edi + 8]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x10058abf
cmp eax, 0x80
je 0x10058abf
or eax, 0xffffffff
jmp 0x10058ac1
lea ecx, [edi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x128], 0
or ecx, 0xffffffff
cmp eax, ecx
je 0x10058f0c
cmp byte [ebx], 0
jne 0x10058b18
mov dword [esp + 0x128], ecx
mov eax, dword [edi + 4]
sub eax, 0
mov dword [esp + 0x14], ecx
je 0x10058b09
dec eax
jne 0x10058f13
mov edx, dword [edi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x10058f13
add edi, 8
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10058f13
push 1
push 2
lea ecx, [esp + 0x34]
call fcn.10004d10
mov byte [esp + 0x128], 1
push 1
push 0xffffffffffffffff
push 0x100f4c8c
mov ecx, esi
call fcn.10059900
push 0xffffffffffffffff
push 0
push esi
lea ecx, [esp + 0xec]
mov edi, eax
mov dword [esp + 0x100], 0xf
mov dword [esp + 0xfc], 0
mov byte [esp + 0xec], 0
call fcn.10005b80
mov byte [esp + 0x128], 2
test edi, edi
jle 0x10058be9
push 0xffffffffffffffff
lea eax, [esp + 0xc8]
lea ecx, [edi + 1]
push eax
mov edx, esi
call fcn.10059090
mov byte [esp + 0x128], 3
push eax
lea ecx, [esp + 0xe4]
call fcn.100058f0
mov byte [esp + 0x128], 2
mov esi, 0x10
cmp dword [esp + 0xd8], esi
jb 0x10058bc9
mov ecx, dword [esp + 0xc4]
push ecx
call fcn.100b2678
add esp, 4
mov dword [esp + 0xd8], 0xf
mov dword [esp + 0xd4], 0
mov byte [esp + 0xc4], 0
jmp 0x10058bee
mov esi, 0x10
lea edx, [esp + 0x24]
push edx
call fcn.100b6a9e
mov eax, dword [esp + 0x24]
add esp, 4
push eax
push ecx
mov edx, dword [esp + 0x24]
push 0x100f4c90
push ecx
mov ecx, dword [esp + 0x28]
push ecx
push ecx
push 0x100f4c98
push ecx
push edx
mov edx, dword [esp + 0x4c]
push ecx
push 0x100f4c9c
push ecx
lea eax, [esp + 0x110]
push eax
push ecx
push 0x100f4ca0
push ecx
mov ecx, dword [esp + 0x64]
sub ecx, dword [ebx + 0xf0]
lea eax, [esp + 0x6c]
sbb edx, dword [ebx + 0xf4]
push edx
push ecx
push str.DEBUG_
push eax
call fcn.10007790
add esp, 8
push eax
call fcn.100592e0
add esp, 4
push eax
call fcn.10007790
add esp, 0xc
push eax
call fcn.100079e0
add esp, 0xc
push eax
call fcn.10007790
add esp, 0xc
mov ecx, eax
call fcn.1000b350
add esp, 4
push eax
call fcn.10007790
add esp, 0xc
push eax
call fcn.100079e0
add esp, 0xc
push eax
call fcn.10007790
add esp, 0xc
push eax
call fcn.100079e0
add esp, 8
test byte [ebx + 0x44], 1
je 0x10058d58
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebx + 0xf8]
ja 0x10058d58
lea edx, [esp + 0xc4]
push edx
lea ecx, [esp + 0x30]
call fcn.10004e30
mov byte [esp + 0x128], 4
cmp dword [eax + 0x14], esi
jb 0x10058ce1
mov eax, dword [eax]
push eax
lea eax, [ebx + 0x48]
push eax
call fcn.10007790
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.100594d0
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x10058d1e
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x10058d1e
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x10058d3f
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x10058d37
or eax, 4
push 0
push eax
call fcn.10001f30
mov byte [esp + 0x128], 2
lea ecx, [esp + 0xc4]
call fcn.10003930
mov esi, 0x10
test byte [ebx + 0x44], 4
je 0x10058e09
mov edx, dword [ebp + 8]
cmp edx, dword [ebx + 0xfc]
ja 0x10058e09
lea eax, [esp + 0xc4]
push eax
lea ecx, [esp + 0x30]
call fcn.10004e30
mov byte [esp + 0x128], 5
cmp dword [eax + 0x14], esi
jb 0x10058d91
mov eax, dword [eax]
push eax
push 0x10111a20
call fcn.10007790
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.100594d0
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x10058dcf
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x10058dcf
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x10058df0
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x10058de8
or eax, 4
push 0
push eax
call fcn.10001f30
mov byte [esp + 0x128], 2
lea ecx, [esp + 0xc4]
call fcn.10003930
mov esi, 0x10
test byte [ebx + 0x44], 0x10
je 0x10058e87
mov edx, dword [ebp + 8]
cmp edx, dword [ebx + 0x100]
ja 0x10058e87
lea eax, [esp + 0xfc]
push eax
lea ecx, [esp + 0x30]
call fcn.10004e30
mov byte [esp + 0x128], 6
push 0x100f4cac
push eax
lea ecx, [esp + 0xcc]
push ecx
call fcn.10059c30
add esp, 0xc
mov byte [esp + 0x128], 7
cmp dword [eax + 0x14], esi
jb 0x10058e58
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov byte [esp + 0x128], 6
lea ecx, [esp + 0xc4]
call fcn.10003930
mov byte [esp + 0x128], 2
lea ecx, [esp + 0xfc]
call fcn.10003930
mov byte [esp + 0x128], 1
cmp dword [esp + 0xf4], esi
jb 0x10058ea8
mov edx, dword [esp + 0xe0]
push edx
call fcn.100b2678
add esp, 4
mov dword [esp + 0xf4], 0xf
mov dword [esp + 0xf0], 0
mov byte [esp + 0xe0], 0
mov byte [esp + 0x128], 0
lea ecx, [esp + 0x2c]
call fcn.10002a50
or eax, 0xffffffff
mov dword [esp + 0x128], eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [ecx + 4]
sub eax, 0
je 0x10058f00
dec eax
jne 0x10058f13
mov eax, dword [ecx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x10058f13
add ecx, 8
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10058f13
mov dword [esp + 0x128], ecx
mov ecx, dword [esp + 0x120]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.100b2b2c
mov esp, ebp
pop ebp
ret 0x14