Function at 0x40e6b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xac
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0xa8], eax
push ebx
push esi
mov eax, ecx
mov dword [esp + 0x64], 0
push edi
push 0xffffffffffffffff
xorps xmm0, xmm0
mov dword [esp + 0x24], eax
push dword [eax + 0x1c]
mov esi, dword [eax]
movlpd qword [esp + 0x48], xmm0
mov dword [esp + 0x74], 0
mov dword [esp + 0x6c], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40f32b
lea esp, [esp]
cmp dword [esi + 0x24], 0
jne 0x40f329
mov ebx, dword [esi + 0x34]
mov eax, ebx
mov edx, dword [esi + 0x30]
mov ecx, edx
push ebx
push edx
push 0
add ecx, 1
mov dword [esp + 0x54], edx
push 0
push 0
adc eax, 0
mov dword [esi + 0x30], ecx
push 0
lea edx, [esp + 0x28]
mov dword [esp + 0x64], ebx
mov ecx, esi
mov dword [esi + 0x34], eax
call fcn.0040e590
mov edi, eax
xor ecx, ecx
mov eax, dword [esi + 0x70]
xorps xmm0, xmm0
mov dword [esp + 0x74], eax
xor eax, eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x34], eax
movlpd qword [esp + 0x50], xmm0
test edi, edi
jne 0x40ec52
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ec40
mov ecx, dword [esp + 0x44]
xor ebx, ebx
mov eax, dword [esp + 0x20]
mov edi, dword [esi + 0x64]
sub edi, dword [esi + 0x60]
mov dword [esp + 0x98], ecx
mov ecx, dword [esp + 0x40]
mov eax, dword [eax + 8]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], edi
lea ecx, [ecx]
test eax, eax
jne 0x40e809
mov ecx, dword [esi + 0x14]
mov eax, dword [esi]
add eax, 0x10
push eax
mov eax, dword [ecx]
push ecx
call eax
mov dword [esp + 0x3c], eax
test eax, eax
je 0x40eb0c
mov ecx, dword [esp + 0x28]
mov ebx, ecx
mov dword [eax], 0
test ecx, ecx
je 0x40e802
mov dword [ecx], eax
jmp 0x40e809
mov ecx, dword [esp + 0x20]
mov dword [ecx + 8], eax
add eax, 0x10
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], eax
test edi, edi
je 0x40e840
mov eax, dword [esi + 0x60]
mov edx, edi
add eax, 0x10
mov dword [esp + 0x14], edi
add eax, dword [esi + 0x5c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], eax
jmp 0x40e955
mov edi, dword [esi]
xor edx, edx
mov dword [esp + 0x30], edx
mov ebx, eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x50], eax
test edi, edi
je 0x40e88c
lea ecx, [esp + 0x74]
mov dword [esp + 0x74], edi
push ecx
push ebx
push eax
mov eax, dword [eax]
call eax
mov edx, dword [esp + 0x30]
mov ecx, eax
mov eax, dword [esp + 0x74]
add edx, eax
add ebx, eax
mov dword [esp + 0x18], ecx
sub edi, eax
mov dword [esp + 0x30], edx
test ecx, ecx
jne 0x40e892
test eax, eax
je 0x40e88c
mov eax, dword [esp + 0x50]
test edi, edi
jne 0x40e855
xor ecx, ecx
mov dword [esp + 0x18], ecx
add dword [esp + 0x14], edx
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x28]
adc edi, 0
mov eax, dword [esp + 0x34]
test ebx, ebx
mov dword [esp + 0x1c], edi
cmove eax, edx
add dword [esi + 0x68], edx
mov dword [esp + 0x34], eax
adc dword [esi + 0x6c], 0
xor eax, eax
cmp edx, dword [esi]
setne al
mov dword [esp + 0x74], eax
test eax, eax
je 0x40e8cf
mov dword [esi + 0x70], 1
test ecx, ecx
je 0x40e8eb
xor eax, eax
mov dword [esi + 0x48], ecx
mov dword [esi + 0x70], 1
mov dword [esp + 0x74], 1
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x14]
mov eax, edi
sub ecx, dword [esp + 0x40]
sbb eax, dword [esp + 0x98]
mov dword [esp + 0x54], eax
jne 0x40e907
cmp ecx, 1
jb 0x40e951
push dword [esp + 0x4c]
lea edx, [esp + 0x14]
mov ecx, esi
push dword [esp + 0x4c]
push 0
push 0
push 0
push 0
call fcn.0040e590
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x40ebfb
cmp dword [esp + 0x10], eax
jne 0x40eba4
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x98], eax
mov edi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 0x80], edx
test ebx, ebx
mov dword [esp + 0x8c], 1
lea ecx, [esp + 0x78]
sete al
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x88], eax
mov eax, dword [esi + 0x18]
push dword [ecx + 4]
push dword [esi + 0x1c]
mov eax, dword [eax]
call eax
mov ebx, dword [esp + 0x88]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x70], 1
mov dword [esp + 0x64], eax
cmp ebx, 1
je 0x40eb65
test edi, edi
mov edi, dword [esp + 0x80]
je 0x40e9e0
push edi
push dword [esp + 0x28]
push dword [esp + 0x40]
call fcn.004e4930
add esp, 0xc
add dword [esi + 0x60], edi
test ebx, ebx
jne 0x40ea36
cmp dword [esp + 0x74], ebx
jne 0x40ea49
cmp edi, dword [esp + 0x30]
jne 0x40ea19
mov eax, dword [esp + 0x3c]
mov ebx, eax
mov edi, dword [esp + 0xc]
mov dword [esp + 0x28], ebx
mov eax, dword [eax]
mov dword [esp + 0x3c], eax
test edi, edi
je 0x40e7d0
xor edi, edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
jmp 0x40e7c9
mov edi, 0xb
xor ebx, ebx
mov eax, 1
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x74], eax
jmp 0x40ec7b
mov ecx, dword [esp + 0x74]
cmp ebx, 3
mov eax, 1
cmove ecx, eax
mov dword [esp + 0x74], ecx
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x2c], 1
cmp edi, ebx
je 0x40eb8e
cmp dword [esp + 0x88], 3
jne 0x40eacd
cmp dword [esp + 0xc], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x64], 0
je 0x40ea9e
mov eax, ebx
sub eax, edi
push eax
mov eax, dword [esp + 0x28]
add eax, edi
push eax
mov eax, dword [esp + 0x40]
add eax, edi
push eax
call fcn.004e4930
mov edi, dword [esp + 0x8c]
add esp, 0xc
mov eax, dword [esp + 0x24]
mov ecx, ebx
sub ecx, edi
add eax, edi
sub dword [esp + 0x14], ecx
mov dword [esp + 0x6c], ecx
sbb dword [esp + 0x1c], 0
cmp dword [esp + 0x28], 0
mov dword [esp + 0x68], eax
jne 0x40eb9c
mov dword [esp + 0x34], edi
jmp 0x40eb9c
cmp dword [esp + 0xc], 0
je 0x40eae2
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], 0
jmp 0x40eb4b
mov eax, dword [esi + 0x5c]
test eax, eax
jne 0x40eb05
mov ecx, dword [esi + 0x14]
mov eax, dword [esi]
add eax, 0x10
push eax
mov eax, dword [ecx]
push ecx
call eax
test eax, eax
je 0x40eb0c
mov edi, dword [esp + 0x80]
mov dword [esi + 0x5c], eax
lea ecx, [eax + 0x10]
test ecx, ecx
jne 0x40eb1e
mov dword [esp + 0x74], 1
mov dword [esp + 0x58], 1
jmp 0x40eb9c
mov eax, dword [esp + 0x24]
sub ebx, edi
sub dword [esp + 0x14], ebx
push ebx
sbb dword [esp + 0x20], 0
add eax, edi
push eax
push ecx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x60], 0
call fcn.004e4930
mov edi, dword [esp + 0x8c]
add esp, 0xc
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x28], 0
mov dword [esp + 0x74], 0
cmove ecx, edi
mov dword [esp + 0x34], ecx
jmp 0x40eb9c
mov dword [esp + 0x74], 1
mov dword [esp + 0x5c], 1
test edi, edi
je 0x40eb8e
mov ebx, dword [esp + 0x30]
push ebx
push dword [esp + 0x28]
push dword [esp + 0x40]
call fcn.004e4930
add esp, 0xc
mov dword [esi + 0x64], 0
mov dword [esi + 0x60], 0
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x40ebfb
lea edi, [esi + 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], 0
je 0x40ebde
mov eax, dword [esp + 0x4c]
cmp eax, dword [esi + 0x94]
jb 0x40ebde
ja 0x40ebd4
mov eax, dword [esp + 0x48]
cmp eax, dword [esi + 0x90]
jbe 0x40ebde
mov dword [esp + 0x10], 1
jmp 0x40ebe6
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x9c]
push edi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
xor ebx, ebx
mov dword [esp + 0x24], ebx
test edi, edi
jne 0x40ec6c
test ecx, ecx
je 0x40ec68
test eax, eax
jne 0x40ec6c
mov ecx, dword [esp + 0x20]
mov eax, dword [esi + 0x18]
push dword [ecx + 4]
mov eax, dword [eax + 4]
push dword [esi + 0x1c]
call eax
mov ebx, eax
mov dword [esp + 0x24], ebx
test ebx, ebx
je 0x40ec77
mov eax, 1
mov dword [esp + 0x2c], edi
mov dword [esp + 0x74], eax
jmp 0x40ec7b
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x14], ecx
jmp 0x40ebff
mov eax, dword [esp + 0x54]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
jmp 0x40ec03
test eax, eax
je 0x40ec77
mov eax, 1
mov dword [esp + 0x74], eax
jmp 0x40ec7b
mov eax, dword [esp + 0x74]
mov dword [esp + 0x50], 0
mov dword [esp + 0x60], 0
test eax, eax
jne 0x40ed18
mov eax, dword [esi + 0x58]
cmp eax, dword [esi + 0x54]
jae 0x40ecd6
cmp dword [esp + 0x64], 0
je 0x40ecd6
lea eax, [eax + eax*4]
lea eax, [eax + 0x19]
lea ecx, [esi + eax*8]
call fcn.0040e380
mov ecx, eax
test ecx, ecx
jne 0x40ecbb
inc dword [esi + 0x58]
jmp 0x40ecd6
mov eax, dword [esi + 0x58]
cmp eax, 1
jne 0x40ecd3
mov dword [esp + 0x74], eax
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x60], ecx
jmp 0x40ed1c
mov dword [esi + 0x54], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 4]
inc ecx
cmp ecx, dword [esi + 0x58]
sbb eax, eax
and eax, ecx
add eax, 5
lea eax, [eax + eax*4]
push dword [esi + eax*8 + 0x1c]
lea eax, [esi + eax*8]
mov dword [esp + 0x54], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x40ed18
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x40f28c
mov eax, dword [esp + 0x2c]
xorps xmm0, xmm0
movlpd qword [esp + 0x40], xmm0
movlpd qword [esp + 0x98], xmm0
movlpd qword [esp + 0xa0], xmm0
movlpd qword [esp + 0xa8], xmm0
test edi, edi
jne 0x40ef6d
test eax, eax
je 0x40ef6d
test ebx, ebx
jne 0x40ef6d
mov ecx, dword [esp + 0x20]
lea eax, [edi + 1]
mov edx, dword [esp + 0xa0]
mov ebx, dword [ecx + 8]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x98]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0xc], ebx
test eax, eax
je 0x40eda4
mov edi, dword [esp + 0x34]
jmp 0x40edd2
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
sub ebx, edx
mov edi, dword [esi]
sbb eax, ecx
mov dword [esp + 0x98], 0
cmp dword [esp + 0x98], eax
jb 0x40edce
ja 0x40edcc
cmp edi, ebx
jbe 0x40edce
mov edi, ebx
mov ebx, dword [esp + 0xc]
add edx, edi
mov dword [esp + 0x98], 1
mov dword [esp + 0xa0], edx
adc ecx, 0
mov dword [esp + 0xa4], ecx
cmp edx, dword [esp + 0x14]
jne 0x40ee03
cmp ecx, dword [esp + 0x1c]
jne 0x40ee03
mov eax, 1
jmp 0x40ee05
xor eax, eax
mov ecx, dword [esi + 0x18]
lea edx, [esp + 0x98]
push edx
lea edx, [esp + 0xac]
push edx
lea edx, [esp + 0xa8]
push edx
push eax
push edi
lea eax, [ebx + 0x10]
push eax
mov eax, dword [esp + 0x38]
push dword [eax + 4]
mov eax, dword [ecx + 8]
push dword [esi + 0x1c]
call eax
mov ebx, eax
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x40ef0e
cmp dword [esp + 0x98], eax
jne 0x40ef1d
mov edx, dword [esp + 0xa0]
mov ecx, dword [esp + 0xa4]
cmp edx, dword [esp + 0x14]
jne 0x40ee6e
cmp ecx, dword [esp + 0x1c]
je 0x40ef1d
mov edi, dword [esp + 0xa8]
mov eax, edx
sub eax, dword [esp + 0x30]
mov ebx, ecx
sbb ebx, dword [esp + 0x28]
sub edi, dword [esp + 0x38]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0xac]
sbb ebx, dword [esp + 0x3c]
cmp dword [esp + 0x40], 0
ja 0x40eeab
jb 0x40eea2
cmp eax, 1
jae 0x40eeab
test ebx, ebx
jne 0x40eeab
cmp edi, 1
jb 0x40ef01
push dword [esp + 0x4c]
lea edx, [esp + 0x14]
mov ecx, esi
push dword [esp + 0x4c]
push ebx
push edi
push dword [esp + 0x50]
push eax
call fcn.0040e590
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x40ef21
cmp dword [esp + 0x10], eax
jne 0x40ef21
mov edx, dword [esp + 0xa0]
mov ecx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa8]
mov edi, dword [esp + 0xac]
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edi
mov ebx, dword [esp + 0xc]
xor eax, eax
mov ebx, dword [ebx]
jmp 0x40ed96
push dword [esp + 0x4c]
mov ecx, esi
push dword [esp + 0x4c]
call fcn.0040e650
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push 0xffffffffffffffff
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40f32b
mov eax, dword [esp + 0x70]
xor ebx, ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x98], 1
mov dword [esp + 0xc], eax
cmp dword [esi + 0x24], ebx
jne 0x40f329
cmp dword [esi + 0x50], ebx
je 0x40ef95
mov eax, 1
mov dword [esp + 0x10], eax
jmp 0x40effe
mov eax, dword [esp + 0x44]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x38], eax
jmp 0x40ef21
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x58]
test eax, eax
je 0x40efb6
cmp eax, 2
mov dword [esi + 0x4c], eax
mov eax, 1
mov dword [esi + 0x50], 1
cmove ecx, eax
mov eax, dword [esp + 0x60]
test eax, eax
je 0x40efcc
mov dword [esi + 0x50], 1
mov dword [esi + 0x40], eax
mov dword [esp + 0xc], ebx
test ecx, ecx
je 0x40efe2
mov dword [esi + 0x50], 1
mov dword [esi + 0x38], 1
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x5c], ebx
je 0x40effe
mov dword [esi + 0x50], 1
mov dword [esi + 0x3c], 1
mov dword [esp + 0xc], ebx
cmp dword [esp + 0x2c], ebx
je 0x40f0d7
test eax, eax
je 0x40f021
xorps xmm0, xmm0
movlpd qword [esp + 0xa0], xmm0
movlpd qword [esp + 0xa8], xmm0
mov eax, dword [esp + 0xa0]
sub eax, dword [esp + 0x30]
mov edi, dword [esp + 0xa8]
mov ebx, dword [esp + 0xac]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0xa4]
sbb eax, dword [esp + 0x28]
sub edi, dword [esp + 0x38]
mov dword [esp + 0x60], eax
lea eax, [esi + 0xb0]
sbb ebx, dword [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x5c]
add dword [esi + 0xa0], eax
mov eax, dword [esp + 0x60]
adc dword [esi + 0xa4], eax
add dword [esi + 0xa8], edi
adc dword [esi + 0xac], ebx
cmp dword [esi + 0x9c], 0
jne 0x40f0c0
mov eax, dword [esi + 0x98]
test eax, eax
je 0x40f0c0
push dword [esi + 0xac]
push dword [esi + 0xa8]
push dword [esi + 0xa4]
push dword [esi + 0xa0]
push eax
mov eax, dword [eax]
call eax
test eax, eax
je 0x40f0c0
mov dword [esi + 0x9c], 0xa
mov edi, dword [esi + 0x9c]
lea eax, [esi + 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x74]
xor ecx, ecx
test edx, edx
sete cl
cmp dword [esp + 0x70], 0
mov dword [esp + 0xb0], ecx
je 0x40f1c3
test edi, edi
jne 0x40f109
cmp dword [esp + 0xc], edi
je 0x40f109
cmp dword [esp + 0x10], edi
jne 0x40f109
lea ecx, [edi + 1]
jmp 0x40f10b
xor ecx, ecx
mov eax, dword [esi + 0x18]
lea edx, [esp + 0x98]
push edx
lea edx, [esp + 0xb4]
push edx
push dword [esp + 0x74]
mov eax, dword [eax + 0xc]
push dword [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x34]
push dword [ecx + 4]
push dword [esi + 0x1c]
call eax
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
je 0x40f14a
mov ebx, 1
mov dword [esi + 0x50], ebx
jmp 0x40f15d
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0x74]
test ecx, ecx
jne 0x40f1c3
test edx, edx
jne 0x40f1c3
lea edi, [esi + 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], 0
je 0x40f18f
mov eax, dword [esp + 0x4c]
cmp eax, dword [esi + 0x94]
ja 0x40f1ad
mov eax, dword [esp + 0x48]
jb 0x40f193
cmp eax, dword [esi + 0x90]
jae 0x40f1ad
jmp 0x40f193
mov eax, dword [esp + 0x48]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x4c]
mov dword [esi + 0x94], eax
mov dword [esi + 0x88], 1
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xb0]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x74]
cmp dword [esp + 0x98], 0
je 0x40f238
cmp dword [esp + 0x2c], 0
je 0x40f1f5
test edi, edi
jne 0x40f1f5
cmp dword [esi + 0x50], edi
jne 0x40f1f5
cmp dword [esp + 0x24], edi
jne 0x40f1f5
cmp dword [esp + 0x10], edi
jne 0x40f1f5
cmp dword [esi + 0x84], edi
jne 0x40f20b
test ebx, ebx
je 0x40f238
cmp dword [esi + 0x84], 0
jne 0x40f20b
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 4]
mov dword [esi + 0x80], eax
mov edi, dword [esp + 0x14]
mov eax, edi
mov ebx, dword [esp + 0x1c]
or eax, ebx
jne 0x40f21d
test edx, edx
jne 0x40f260
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x74]
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], ebx
inc dword [esi + 0x84]
test edx, edx
jne 0x40f260
mov eax, dword [esp + 0x50]
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x40f2dc
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov ecx, 1
jmp 0x40f2d3
test ecx, ecx
je 0x40f2a3
push dword [esi + 0xe8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40f2ba
call ebx
mov edi, 1
test eax, eax
mov ecx, edi
cmovne ecx, eax
test ecx, ecx
je 0x40f2bf
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x20]
cmp dword [eax + 4], 0
je 0x40f329
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x24], 1
mov edi, 1
push dword [esi + 0xe4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x40f2dc
call ebx
mov ecx, edi
test eax, eax
cmovne ecx, eax
test ecx, ecx
jne 0x40f28c
mov eax, dword [esp + 0x20]
xorps xmm0, xmm0
push 0xffffffffffffffff
movlpd qword [esp + 0x44], xmm0
mov dword [esp + 0x6c], 0
push dword [eax + 0x1c]
mov dword [esp + 0x74], 0
mov dword [esp + 0x6c], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40e710
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret