Function at 0x438c20
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x40], ebx
jne 0x438c3e
pop esi
mov eax, 0x80004005
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
lea edi, [esi + 0x14]
push edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp + 8]
cmp ecx, eax
je 0x438d48
mov dword [ebp + 8], ebx
jge 0x438d9f
sub eax, ecx
mov dword [ebp - 4], eax
cmp eax, ebx
jle 0x438d48
mov eax, dword [esi + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
lea edi, [esi + 0x38]
push edi
call ebx
mov ecx, dword [esi + 0x40]
push 0xffffffffffffffff
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov edx, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x438cda
push 0
push edi
call ebx
test eax, eax
je 0x438cde
push 0x102
call fcn.004366f0
mov ecx, dword [ebp - 0x14]
add esp, 4
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
test eax, eax
jne 0x438d5a
mov ecx, dword [esi + 0xc]
xor edi, edi
test ecx, ecx
jle 0x438d35
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 4]
lea ecx, [ecx]
cmp dword [eax], edx
je 0x438cfe
inc edi
add eax, 4
cmp edi, ecx
jl 0x438cf0
jmp 0x438d35
cmp edi, 0xffffffff
je 0x438d35
test edi, edi
js 0x438d8e
cmp edi, ecx
jge 0x438d8e
mov eax, dword [esi + 8]
mov ebx, dword [eax + edi*4]
push 0xea60
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x438d76
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
lea ecx, [esi + 4]
call fcn.00437560
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
cmp eax, dword [ebp - 4]
jl 0x438c70
mov edi, dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
call fcn.00436950
mov edx, dword [ebp - 0x14]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0
push 0
push 1
push 0xc000008c
call dword [sym.imp.KERNEL32.dll_RaiseException]
sub ecx, eax
mov dword [ebp - 0xc], ecx
cmp ecx, ebx
jle 0x438d48
mov ebx, dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edi, edi
mov ecx, dword [esi + 0x3c]
push ecx
call ebx
mov eax, dword [esi + 0x2c]
lea edx, [ebp - 8]
push edx
push 0
push esi
push 0x437ec0
push eax
push 0
call dword [sym.imp.MSVCR100.dll__beginthreadex]
mov edi, eax
add esp, 0x18
test edi, edi
je 0x438e18
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x438e34
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 8]
lea ecx, [esi + 4]
push eax
mov dword [ebp - 4], edi
call fcn.004386b0
test eax, eax
jne 0x438e07
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
cmp eax, dword [ebp - 0xc]
jl 0x438db0
jmp 0x438d45
call fcn.00436950
mov ecx, dword [ebp - 0x14]
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp eax, 0x102
jne 0x438e5a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, 0x80070102
pop ebx
mov esp, ebp
pop ebp
ret 8
call fcn.00436950
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8