Function at 0x4067f0
Capabilities:
Create thread
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
push ebx
mov ebx, ecx
mov dword [esp + 0xac], 1
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebx]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x74], esi
nop dword [eax]
push 0xffffffffffffffff
push dword [ebx + 0x1c]
xorps xmm0, xmm0
mov dword [esp + 0x94], 0
movlpd qword [esp + 0x98], xmm0
mov dword [esp + 0x80], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x84], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x406872
call edi
test eax, eax
je 0x4077cf
test eax, eax
jne 0x4077db
cmp dword [esi + 0x24], eax
jne 0x4077d9
mov edi, dword [esi + 0x34]
mov eax, edi
mov edx, dword [esi + 0x30]
mov ecx, edx
push edi
push edx
push 0
add ecx, 1
mov dword [esp + 0x58], edx
push 0
push 0
adc eax, 0
mov dword [esi + 0x30], ecx
push 0
lea edx, [esp + 0x60]
mov dword [esp + 0x88], edi
mov ecx, esi
mov dword [esi + 0x34], eax
call fcn.00406720
mov edx, dword [esp + 0x48]
xor ecx, ecx
mov edi, eax
mov dword [esp + 0x40], ecx
mov eax, dword [esi + 0x70]
xorps xmm0, xmm0
mov dword [esp + 0xc], eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x20], ecx
movlpd qword [esp + 0x60], xmm0
mov dword [esp + 0x1c], edx
test edi, edi
jne 0x406e24
test edx, edx
jne 0x406e24
mov eax, dword [ebx + 8]
mov ebx, dword [esi + 0x64]
sub ebx, dword [esi + 0x60]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x38], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ebx
test eax, eax
jne 0x40696e
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 + 0x38], eax
test eax, eax
je 0x406c8b
mov ecx, dword [esp + 0x34]
mov dword [eax], 0
test ecx, ecx
je 0x406967
mov dword [ecx], eax
jmp 0x40696e
mov ecx, dword [esp + 0x24]
mov dword [ecx + 8], eax
add eax, 0x10
mov dword [esp + 0x80], eax
mov dword [esp + 0x30], eax
test ebx, ebx
je 0x4069a2
mov eax, dword [esi + 0x60]
add eax, 0x10
mov dword [esp + 0x10], ebx
add eax, dword [esi + 0x5c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], eax
jmp 0x406aba
mov edi, dword [esi]
mov ecx, eax
mov eax, dword [esi + 0xc]
xor ebx, ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0xa4], eax
test edi, edi
je 0x4069fa
nop word [eax + eax]
lea edx, [esp + 0x58]
mov dword [esp + 0x58], edi
push edx
push ecx
push eax
mov eax, dword [eax]
call eax
mov ecx, dword [esp + 0x28]
mov edx, eax
mov eax, dword [esp + 0x58]
add ebx, eax
add ecx, eax
mov dword [esp + 0x3c], edx
sub edi, eax
mov dword [esp + 0x28], ecx
test edx, edx
jne 0x406a00
test eax, eax
je 0x4069fa
mov eax, dword [esp + 0xa4]
test edi, edi
jne 0x4069c0
xor edx, edx
mov dword [esp + 0x3c], edx
add dword [esp + 0x10], ebx
mov eax, ebx
adc dword [esp + 0x14], 0
cmp dword [esp + 0x34], 0
cmovne eax, dword [esp + 0x20]
add dword [esi + 0x68], ebx
mov dword [esp + 0x20], eax
adc dword [esi + 0x6c], 0
xor ecx, ecx
cmp ebx, dword [esi]
setne cl
mov dword [esp + 0xc], ecx
je 0x406a34
mov dword [esi + 0x70], 1
test edx, edx
je 0x406a4e
mov dword [esi + 0x48], edx
xor edi, edi
mov dword [esi + 0x70], 1
mov dword [esp + 0xc], 1
jmp 0x406a52
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
sub ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
sbb eax, dword [esp + 0x44]
mov dword [esp + 0x64], eax
jne 0x406a6d
cmp ecx, 1
jb 0x406aba
push dword [esp + 0x70]
lea edx, [esp + 0x4c]
mov ecx, esi
push dword [esp + 0x50]
push 0
push 0
push 0
push 0
call fcn.00406720
mov edx, dword [esp + 0x48]
mov edi, eax
mov dword [esp + 0x1c], edx
test edi, edi
jne 0x406d20
test edx, edx
jne 0x406d20
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0xc0], ebx
cmp dword [esp + 0x34], eax
lea ecx, [esp + 0xb8]
push ecx
mov ecx, dword [esp + 0x28]
sete al
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0x10]
push dword [ecx + 4]
mov dword [esp + 0xcc], eax
mov eax, dword [esi + 0x18]
push dword [esi + 0x1c]
mov dword [esp + 0xd8], 1
mov eax, dword [eax]
call eax
mov ecx, dword [esp + 0xc8]
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x6c], 1
mov dword [esp + 0x7c], eax
cmp ecx, 1
je 0x406ce9
mov edx, dword [esp + 0x18]
test edx, edx
je 0x406b67
push dword [esp + 0xc0]
push dword [esp + 0x34]
push dword [esp + 0x88]
call fcn.0044b640
mov eax, dword [esp + 0xcc]
add esp, 0xc
add dword [esi + 0x60], eax
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0x18]
jmp 0x406b6e
mov eax, dword [esp + 0xc0]
test ecx, ecx
jne 0x406bcf
mov esi, dword [esp + 0x74]
cmp dword [esp + 0xc], ecx
jne 0x406be6
cmp eax, ebx
jne 0x406ba7
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x34], eax
mov eax, dword [eax]
mov dword [esp + 0x38], eax
test ebx, ebx
je 0x406937
xor ebx, ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
jmp 0x406933
mov edi, 0xb
xor eax, eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x18], eax
jmp 0x406f0f
mov esi, dword [esp + 0xc]
cmp ecx, 3
cmove esi, dword [esp + 0xb4]
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x40], 1
cmp eax, ebx
jne 0x406c09
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x60], 0
mov dword [esi + 0x64], 0
jmp 0x406d28
cmp ecx, 3
jne 0x406c4f
mov ecx, dword [esp + 0x30]
add ecx, eax
mov dword [esp + 0x8c], ecx
mov ecx, ebx
sub ecx, eax
xor ebx, ebx
test edx, edx
mov dword [esp + 0x78], ecx
mov edx, dword [esp + 0x1c]
setne bl
sub dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x20]
sbb dword [esp + 0x14], 0
cmp dword [esp + 0x34], 0
mov dword [esp + 0x84], ebx
cmove ecx, eax
jmp 0x406d24
test edx, edx
je 0x406c61
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0
jmp 0x406ccf
mov ecx, dword [esi + 0x5c]
test ecx, ecx
jne 0x406c86
mov ecx, dword [esi + 0x14]
mov eax, dword [esi]
add eax, 0x10
push eax
mov eax, dword [ecx]
push ecx
call eax
mov ecx, eax
test ecx, ecx
je 0x406c8b
mov eax, dword [esp + 0xc0]
mov dword [esi + 0x5c], ecx
add ecx, 0x10
jne 0x406ca4
mov edx, dword [esp + 0x1c]
mov dword [esp + 0xc], 1
mov dword [esp + 0x68], 1
jmp 0x406d28
sub ebx, eax
mov dword [esi + 0x60], 0
sub dword [esp + 0x10], ebx
push ebx
sbb dword [esp + 0x18], 0
add eax, dword [esp + 0x34]
push eax
push ecx
mov dword [esi + 0x64], ebx
call fcn.0044b640
mov eax, dword [esp + 0xcc]
add esp, 0xc
cmp dword [esp + 0x34], 0
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
cmove ecx, eax
mov dword [esp + 0xc], 0
jmp 0x406d24
cmp dword [esp + 0x18], 0
mov dword [esp + 0xc], 1
mov dword [esp + 0x88], 1
je 0x406bf2
push ebx
push dword [esp + 0x34]
push dword [esp + 0x88]
call fcn.0044b640
add esp, 0xc
jmp 0x406bf2
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x20], ecx
test edi, edi
jne 0x406d7d
lea ebx, [esi + 0xb0]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], edi
je 0x406d62
mov eax, dword [esp + 0x70]
cmp eax, dword [esi + 0x94]
jb 0x406d62
ja 0x406d5b
mov eax, dword [esp + 0x4c]
cmp eax, dword [esi + 0x90]
jbe 0x406d62
mov eax, 1
jmp 0x406d64
xor eax, eax
mov edi, dword [esi + 0x9c]
push ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x18], 0
test edi, edi
jne 0x406bac
test ecx, ecx
je 0x406e39
test edx, edx
jne 0x406bac
mov eax, dword [esi + 0x18]
push dword [ebx + 4]
push dword [esi + 0x1c]
mov eax, dword [eax + 4]
call eax
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x406e41
xorps xmm0, xmm0
mov dword [esp + 0x40], edi
movlpd qword [esp + 0x90], xmm0
mov eax, dword [esp + 0x94]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x90]
movlpd qword [esp + 0x60], xmm0
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0xc], 1
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], edi
movlpd qword [esp + 0x98], xmm0
movlpd qword [esp + 0xa8], xmm0
mov dword [esp + 0x54], eax
jmp 0x407401
mov eax, dword [esp + 0x64]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x10], eax
jmp 0x406d85
test edx, edx
jne 0x406bac
cmp dword [esp + 0xc], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
jne 0x406f0b
mov ecx, dword [esi + 0x58]
mov eax, ecx
cmp ecx, dword [esi + 0x54]
jae 0x4071b1
cmp dword [esp + 0x7c], 0
je 0x4071b1
add ecx, 5
lea eax, [ecx + ecx*4]
lea ebx, [esi + eax*8]
mov ecx, ebx
call fcn.00406600
mov ecx, eax
test ecx, ecx
jne 0x406ed4
cmp dword [ebx + 0x18], eax
jne 0x40719d
lea eax, [esp + 0xdc]
push eax
push ecx
push ebx
push fcn.004077f0
push ecx
push ecx
call fcn.0044f4d1
add esp, 0x18
mov dword [ebx + 0x18], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4071a3
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
je 0x4071a3
jmp 0x406eda
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test ecx, ecx
jle 0x406ee9
movzx ecx, cx
or ecx, 0x80070000
test ecx, ecx
je 0x4071a3
mov eax, dword [esi + 0x58]
cmp eax, 1
jne 0x4071ac
mov dword [esp + 0xc], eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
xorps xmm0, xmm0
mov esi, dword [esp + 0x68]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x84]
mov dword [esp + 0xa4], ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0xc]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x7c], edi
movlpd qword [esp + 0x90], xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x98], xmm0
movlpd qword [esp + 0xa8], xmm0
test edi, edi
jne 0x4073d7
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x8c], esi
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x78], esi
mov esi, dword [esp + 0xa4]
mov dword [esp + 0x84], esi
mov esi, dword [esp + 0x80]
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0x44]
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x88], esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x7c]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
movlpd qword [esp + 0x90], xmm0
movlpd qword [esp + 0x60], xmm0
test ecx, ecx
je 0x4073d7
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x8c], esi
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x78], esi
mov esi, dword [esp + 0xa4]
mov dword [esp + 0x84], esi
mov esi, dword [esp + 0x80]
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0x44]
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x88], esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x7c]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
movlpd qword [esp + 0x90], xmm0
movlpd qword [esp + 0x60], xmm0
test eax, eax
jne 0x4073d7
mov edi, dword [esp + 0x24]
mov eax, 1
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x54]
mov edi, dword [edi + 8]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x8c], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x88], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x20], ecx
movlpd qword [esp + 0x90], xmm0
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x90]
movlpd qword [esp + 0x60], xmm0
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x58], edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x7c]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x98]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0x14], ebx
nop dword [eax]
test eax, eax
je 0x4071fd
mov ebx, dword [esp + 0x20]
jmp 0x407227
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x58]
inc eax
mov dword [esi + 0x58], eax
jmp 0x4071b7
mov dword [esi + 0x54], eax
jmp 0x4071b7
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x24]
mov ecx, dword [ecx + 4]
inc ecx
cmp ecx, eax
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 + 0x38], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x406f0b
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x4077ad
jmp 0x406f0b
mov eax, dword [esp + 0x10]
sub eax, edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], eax
mov eax, ebx
mov ebx, dword [esi]
sbb eax, ecx
cmp dword [esp + 0x2c], eax
jb 0x407227
mov eax, dword [esp + 0x28]
ja 0x407225
cmp ebx, eax
jbe 0x407227
mov ebx, eax
add edx, ebx
mov dword [esp + 0x28], 1
mov dword [esp + 0x98], edx
adc ecx, 0
mov dword [esp + 0x9c], ecx
cmp edx, dword [esp + 0x10]
jne 0x407255
cmp ecx, dword [esp + 0x14]
jne 0x407255
mov eax, 1
jmp 0x407257
xor eax, eax
mov ecx, dword [esi + 0x18]
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0xac]
push edx
lea edx, [esp + 0xa0]
push edx
push eax
mov eax, dword [esp + 0x68]
push ebx
add eax, 0x10
push eax
mov eax, dword [esp + 0x3c]
push dword [eax + 4]
mov eax, dword [ecx + 8]
push dword [esi + 0x1c]
call eax
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x40737e
cmp dword [esp + 0x28], eax
jne 0x407401
mov edx, dword [esp + 0x98]
mov ecx, dword [esp + 0x9c]
cmp edx, dword [esp + 0x10]
jne 0x4072be
cmp ecx, dword [esp + 0x14]
je 0x407401
mov esi, dword [esp + 0xac]
mov eax, edx
sub eax, dword [esp + 0x5c]
mov ebx, ecx
sbb ebx, dword [esp + 0x50]
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0xa8]
sub ebx, dword [esp + 0x54]
sbb esi, dword [esp + 0x38]
cmp dword [esp + 0x44], 0
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x74]
ja 0x407306
jb 0x4072fa
cmp eax, 1
jae 0x407306
cmp dword [esp + 0x2c], 0
ja 0x407306
cmp ebx, 1
jb 0x407369
push dword [esp + 0x70]
lea edx, [esp + 0x4c]
mov ecx, esi
push dword [esp + 0x50]
push dword [esp + 0x34]
push ebx
push dword [esp + 0x54]
push eax
call fcn.00406720
mov edi, eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
test edi, edi
jne 0x4073fd
test eax, eax
jne 0x4073fd
mov edx, dword [esp + 0x98]
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0xa8]
mov ebx, dword [esp + 0xac]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x38], ebx
mov eax, dword [esp + 0x58]
mov ebx, dword [esp + 0x14]
mov eax, dword [eax]
mov dword [esp + 0x58], eax
xor eax, eax
jmp 0x407190
lea ebx, [esi + 0xb0]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], 0
je 0x4073b0
mov eax, dword [esp + 0x70]
cmp eax, dword [esi + 0x94]
ja 0x4073ce
mov eax, dword [esp + 0x4c]
jb 0x4073b4
cmp eax, dword [esi + 0x90]
jae 0x4073ce
jmp 0x4073b4
mov eax, dword [esp + 0x4c]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x70]
mov dword [esi + 0x94], eax
mov dword [esi + 0x88], 1
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4073fd
mov eax, dword [esp + 0x94]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x54], eax
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
push 0xffffffffffffffff
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x407423
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4077cf
test eax, eax
jne 0x4077db
cmp dword [esi + 0x24], 0
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x58], 1
mov dword [esp + 0x3c], eax
jne 0x4077d9
cmp dword [esi + 0x50], 0
je 0x40745e
mov eax, 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x48], eax
jmp 0x4074d3
mov ecx, dword [esp + 0x68]
test ebx, ebx
je 0x40747b
cmp ebx, 2
mov dword [esi + 0x50], 1
mov eax, 1
mov dword [esi + 0x4c], ebx
cmove ecx, eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x407495
mov dword [esi + 0x50], 1
mov dword [esi + 0x40], eax
mov dword [esp + 0x3c], 0
test ecx, ecx
je 0x4074af
mov dword [esi + 0x50], 1
mov dword [esi + 0x38], 1
mov dword [esp + 0x3c], 0
cmp dword [esp + 0x88], 0
mov eax, dword [esp + 0x1c]
je 0x4074d3
mov dword [esi + 0x50], 1
mov dword [esi + 0x3c], 1
mov dword [esp + 0x3c], 0
cmp dword [esp + 0x40], 0
je 0x4075b8
test eax, eax
je 0x4074f7
xorps xmm0, xmm0
movlpd qword [esp + 0x98], xmm0
movlpd qword [esp + 0xa8], xmm0
mov eax, dword [esp + 0x98]
sub eax, dword [esp + 0x5c]
mov edi, dword [esp + 0x9c]
sbb edi, dword [esp + 0x50]
mov ebx, dword [esp + 0xac]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xa8]
sub eax, dword [esp + 0x54]
mov dword [esp + 0x44], eax
lea eax, [esi + 0xb0]
sbb ebx, dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x2c]
add ecx, dword [esi + 0xa0]
mov eax, dword [esi + 0xa4]
mov edx, dword [esp + 0x44]
adc eax, edi
add edx, dword [esi + 0xa8]
mov edi, dword [esi + 0xac]
adc edi, ebx
mov dword [esp + 0x2c], eax
cmp dword [esi + 0x9c], 0
mov dword [esi + 0xa0], ecx
mov dword [esi + 0xa4], eax
mov dword [esi + 0xa8], edx
mov dword [esi + 0xac], edi
jne 0x4075a5
mov eax, dword [esi + 0x98]
test eax, eax
je 0x4075a5
push edi
push edx
push dword [esp + 0x34]
push ecx
push eax
mov eax, dword [eax]
call eax
test eax, eax
je 0x4075a5
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 + 0xc]
xor ecx, ecx
test ebx, ebx
sete cl
cmp dword [esp + 0x6c], 0
mov dword [esp + 0xb0], ecx
je 0x4076a9
test edi, edi
jne 0x4075ea
cmp dword [esp + 0x3c], edi
je 0x4075ea
cmp dword [esp + 0x1c], edi
jne 0x4075ea
lea ecx, [edi + 1]
jmp 0x4075ec
xor ecx, ecx
mov eax, dword [esi + 0x18]
lea edx, [esp + 0x58]
push edx
lea edx, [esp + 0xb4]
push edx
push dword [esp + 0x8c]
mov eax, dword [eax + 0xc]
push dword [esp + 0x84]
push dword [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x3c]
push dword [ecx + 4]
push dword [esi + 0x1c]
call eax
mov edi, eax
test edi, edi
je 0x407638
mov dword [esp + 0x28], 1
mov dword [esi + 0x50], 1
jmp 0x407647
mov ecx, dword [esp + 0xb0]
test ecx, ecx
jne 0x4076a9
test ebx, ebx
jne 0x4076a9
lea ebx, [esi + 0xb0]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], 0
je 0x407679
mov eax, dword [esp + 0x70]
cmp eax, dword [esi + 0x94]
ja 0x407697
mov eax, dword [esp + 0x4c]
jb 0x40767d
cmp eax, dword [esi + 0x90]
jae 0x407697
jmp 0x40767d
mov eax, dword [esp + 0x4c]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x70]
mov dword [esi + 0x94], eax
mov dword [esi + 0x88], 1
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xb0]
mov ebx, dword [esp + 0xc]
cmp dword [esp + 0x58], 0
je 0x40771f
cmp dword [esp + 0x40], 0
je 0x4076da
test edi, edi
jne 0x4076da
cmp dword [esi + 0x50], edi
jne 0x4076da
cmp dword [esp + 0x18], edi
jne 0x4076da
cmp dword [esp + 0x1c], edi
jne 0x4076da
cmp dword [esi + 0x84], edi
jne 0x4076f0
cmp dword [esp + 0x28], edi
je 0x40771f
cmp dword [esi + 0x84], 0
jne 0x4076f0
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 4]
mov dword [esi + 0x80], eax
mov edi, dword [esp + 0x10]
mov eax, edi
mov edx, dword [esp + 0x14]
or eax, edx
jne 0x407702
test ebx, ebx
jne 0x407757
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov dword [esi + 0xc], eax
mov eax, esi
mov esi, dword [esp + 0x74]
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], edx
inc dword [esi + 0x84]
test ebx, ebx
jne 0x407757
mov eax, dword [esp + 0x34]
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x406820
call edi
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x4077ad
jmp 0x406820
test ecx, ecx
je 0x4077b6
push dword [esi + 0xe8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x407781
call edi
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x4077ad
mov ebx, dword [esp + 0x24]
push dword [esi + 0xe4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x406820
call edi
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
je 0x406820
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x24]
cmp dword [ebx + 4], 0
je 0x4077d9
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x24], 1
jmp 0x407785
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret