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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xf4
mov eax, dword [0x472008]
xor eax, esp
mov dword [esp + 0xf0], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x38], edi
mov esi, dword [edi]
mov dword [esp + 0x7c], esi
lea esp, [esp]
push 0xffffffffffffffff
push dword [edi + 0x1c]
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x74], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x407f61
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40910f
test eax, eax
jne 0x409129
cmp dword [esi + 0x24], eax
jne 0x409127
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 + 0x94], edx
push 0
adc eax, 0
mov dword [esi + 0x30], ecx
push 0
push 0
lea edx, [esp + 0x70]
mov dword [esp + 0x9c], ebx
mov ecx, esi
mov dword [esi + 0x34], eax
call fcn.00407e00
mov ebx, eax
mov dword [esp + 0x48], 0
mov eax, dword [esi + 0x70]
add esp, 0x18
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x50], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
test ebx, ebx
jne 0x40889f
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x34], ecx
test ecx, ecx
jne 0x4087a7
mov eax, dword [edi + 8]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esi + 0x64]
sub ecx, dword [esi + 0x60]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], ecx
test eax, eax
jne 0x408066
mov eax, dword [esi]
mov edi, dword [esi + 0x14]
add eax, 0x10
push eax
push edi
mov edi, dword [edi]
mov ecx, edi
call dword [0x4642a0]
call edi
add esp, 8
mov dword [esp + 0x3c], eax
test eax, eax
je 0x4082d2
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
mov dword [eax], 0
test edx, edx
je 0x40805f
mov dword [edx], eax
jmp 0x408066
mov edi, dword [esp + 0x38]
mov dword [edi + 8], eax
add eax, 0x10
mov dword [esp + 0x70], eax
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x40809d
mov eax, dword [esi + 0x60]
mov edx, ecx
add eax, 0x10
mov dword [esp + 0x18], ecx
add eax, dword [esi + 0x5c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x40], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], eax
jmp 0x4081df
mov ebx, dword [esi]
mov edi, eax
mov eax, dword [esi + 0xc]
xor edx, edx
mov dword [esp + 0x54], edi
mov dword [esp + 0xe8], eax
mov dword [esp + 0x28], edx
test ebx, ebx
je 0x40811a
lea esp, [esp]
lea ecx, [esp + 0xac]
mov dword [esp + 0xac], ebx
push ecx
push edi
mov edi, dword [eax]
mov ecx, edi
push eax
call dword [0x4642a0]
call edi
mov edx, dword [esp + 0x34]
mov ecx, eax
mov eax, dword [esp + 0xb8]
add esp, 0xc
mov edi, dword [esp + 0x54]
add edx, eax
add edi, eax
mov dword [esp + 0x10], ecx
sub ebx, eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x54], edi
test ecx, ecx
jne 0x4082c9
test eax, eax
je 0x40811a
mov eax, dword [esp + 0xe8]
test ebx, ebx
jne 0x4080c0
xor ebx, ebx
mov dword [esp + 0x10], ebx
add dword [esp + 0x18], edx
mov edi, dword [esp + 0x1c]
adc edi, 0
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x1c], edi
jne 0x40813a
mov dword [esp + 0x40], edx
add dword [esi + 0x68], edx
adc dword [esi + 0x6c], 0
xor ecx, ecx
cmp edx, dword [esi]
setne cl
mov dword [esp + 0x14], ecx
je 0x408155
mov dword [esi + 0x70], 1
test ebx, ebx
je 0x408171
xor ecx, ecx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x70], 1
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x18]
mov eax, edi
sub ecx, dword [esp + 0x78]
sbb eax, dword [esp + 0x74]
mov dword [esp + 0xec], eax
jne 0x40818d
cmp ecx, 1
jb 0x4081df
push dword [esp + 0x84]
lea edx, [esp + 0x5c]
mov ecx, esi
push dword [esp + 0x8c]
push 0
push 0
push 0
push 0
call fcn.00407e00
mov ebx, eax
add esp, 0x18
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x40889f
mov eax, dword [esp + 0x58]
mov dword [esp + 0x34], eax
test eax, eax
jne 0x40874f
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x78], eax
mov dword [esp + 0x74], edi
mov edi, dword [esi + 0x18]
xor eax, eax
cmp dword [esp + 0x2c], eax
mov ebx, dword [esp + 0x14]
sete al
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xb4], eax
lea eax, [esp + 0xb0]
push eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc0], ebx
mov dword [esp + 0xc8], 1
mov edi, dword [edi]
mov ecx, edi
push dword [eax + 4]
push dword [esi + 0x1c]
call dword [0x4642a0]
call edi
mov eax, dword [esp + 0xd0]
add esp, 0xc
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x50], 1
cmp eax, 1
je 0x408710
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0xb8]
test ecx, ecx
je 0x40828c
push edi
push dword [esp + 0x24]
push dword [esp + 0x78]
call sub.msvcrt.dll_memcpy
mov ecx, dword [esp + 0x30]
add esp, 0xc
add dword [esi + 0x60], edi
mov eax, dword [esp + 0xc0]
test eax, eax
jne 0x40860f
test ebx, ebx
jne 0x408624
cmp edi, dword [esp + 0x28]
jne 0x4082e7
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
mov eax, dword [eax]
mov dword [esp + 0x3c], eax
test ecx, ecx
je 0x408020
xor ecx, ecx
mov dword [esi + 0x60], ecx
mov dword [esi + 0x64], ecx
jmp 0x40801c
mov ebx, dword [esp + 0x10]
jmp 0x408120
mov dword [esp + 0x14], 1
mov dword [esp + 0x44], 1
jmp 0x40874b
mov ebx, 0xb
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x10], 0
mov edi, 1
mov dword [esp + 0x14], edi
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0xe8], eax
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x60]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x64]
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xac], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x68]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x3c], ecx
xor ecx, ecx
mov dword [esp + 0xa0], edx
xor edx, edx
mov dword [esp + 0x94], eax
mov eax, edi
mov dword [esp + 0x90], ebx
mov dword [esp + 0xd4], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0xd8], edx
mov dword [esp + 0xdc], ecx
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], ecx
test ebx, ebx
jne 0x408831
mov esi, dword [esp + 0x70]
mov ebx, dword [esp + 0x98]
mov edi, dword [esp + 0x80]
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x9c]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x78]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0xa0]
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x68], ebx
mov ebx, dword [esp + 0x8c]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x54]
mov dword [esp + 0x64], ebx
mov ebx, dword [esp + 0x6c]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0xac]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x60], ebx
mov ebx, dword [esp + 0x90]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
test eax, eax
je 0x408835
mov eax, dword [esp + 0xd4]
mov esi, dword [esp + 0x54]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0xac]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
cmp dword [esp + 0xe8], ecx
jne 0x408835
mov esi, dword [esp + 0x94]
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0xd4]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x98]
mov ebx, dword [ebx + 8]
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x9c]
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0xa0]
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x8c]
mov dword [esp + 0x64], esi
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x60], esi
mov esi, dword [esp + 0x70]
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x78]
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x54]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0xac]
mov dword [esp + 0x80], ebx
mov ebx, dword [esp + 0x90]
mov dword [esp + 0x40], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x14], edi
add edx, eax
mov dword [esp + 0xd4], 1
mov dword [esp + 0xd8], edx
adc ecx, 0
cmp edx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0xdc], ecx
jne 0x4089aa
cmp ecx, edx
jne 0x4089aa
mov ecx, 1
jmp 0x4089ac
cmp eax, 3
jne 0x408624
mov eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc0]
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x30], 1
cmp edi, ebx
je 0x408739
cmp eax, 3
jne 0x408677
mov eax, dword [esp + 0x20]
xor edx, edx
add eax, edi
mov dword [esp + 0x68], eax
mov eax, ebx
sub eax, edi
test ecx, ecx
mov dword [esp + 0x64], eax
setne dl
sub dword [esp + 0x18], eax
mov dword [esp + 0x60], edx
sbb dword [esp + 0x1c], 0
cmp dword [esp + 0x2c], 0
jne 0x408747
mov dword [esp + 0x40], edi
jmp 0x408747
test ecx, ecx
je 0x408689
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], 0
jmp 0x4086fd
mov eax, dword [esi + 0x5c]
test eax, eax
jne 0x4086b7
mov eax, dword [esi]
mov edi, dword [esi + 0x14]
add eax, 0x10
push eax
push edi
mov edi, dword [edi]
mov ecx, edi
call dword [0x4642a0]
call edi
add esp, 8
test eax, eax
je 0x4086be
mov edi, dword [esp + 0xb8]
mov dword [esi + 0x5c], eax
lea ecx, [eax + 0x10]
test ecx, ecx
jne 0x4086d0
mov eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x44], eax
jmp 0x408747
mov eax, dword [esp + 0x20]
sub ebx, edi
sub dword [esp + 0x18], 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 sub.msvcrt.dll_memcpy
mov edi, dword [esp + 0xc4]
add esp, 0xc
cmp dword [esp + 0x2c], 0
jne 0x408708
mov dword [esp + 0x40], edi
xor eax, eax
mov dword [esp + 0x14], eax
jmp 0x408747
cmp dword [esp + 0x24], 0
mov eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x5c], eax
je 0x408739
mov ebx, dword [esp + 0x28]
push ebx
push dword [esp + 0x24]
push dword [esp + 0x78]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [esi + 0x64], 0
mov dword [esi + 0x60], 0
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x4087a3
lea edi, [esi + 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], 0
je 0x40878c
mov eax, dword [esp + 0x84]
cmp eax, dword [esi + 0x94]
jb 0x40878c
ja 0x408785
mov eax, dword [esp + 0x88]
cmp eax, dword [esi + 0x90]
jbe 0x40878c
mov eax, 1
jmp 0x40878e
xor eax, eax
mov ebx, dword [esi + 0x9c]
push edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x5c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x34]
xor eax, eax
mov dword [esp + 0x20], eax
test ebx, ebx
jne 0x4082f4
cmp dword [esp + 0x30], eax
je 0x4088ac
test ecx, ecx
jne 0x4082f4
mov eax, dword [esp + 0x38]
mov edi, dword [esi + 0x18]
push dword [eax + 4]
mov edi, dword [edi + 4]
mov ecx, edi
push dword [esi + 0x1c]
call dword [0x4642a0]
call edi
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
je 0x4088b4
mov edi, 1
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xe0], ebx
mov dword [esp + 0xe4], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x38]
push 0xffffffffffffffff
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x408857
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40910f
test eax, eax
jne 0x409129
cmp dword [esi + 0x24], 0
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xe8], 1
mov dword [esp + 0x3c], eax
jne 0x409127
cmp dword [esi + 0x50], 0
je 0x408d82
mov eax, 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x58], eax
jmp 0x408df3
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x34], ecx
jmp 0x4087a7
test ecx, ecx
jne 0x4082f4
mov edi, dword [esp + 0x14]
mov dword [esp + 0x24], 0
mov dword [esp + 0x10], 0
test edi, edi
jne 0x40830d
mov eax, dword [esi + 0x58]
mov edx, eax
cmp eax, dword [esi + 0x54]
jae 0x408978
cmp dword [esp + 0x6c], edi
je 0x408978
lea eax, [eax + eax*4]
lea eax, [eax + 0x19]
lea eax, [esi + eax*8]
mov ecx, eax
mov dword [esp + 0xac], eax
call fcn.00407ce0
test eax, eax
jne 0x408946
mov eax, dword [esp + 0xac]
cmp dword [eax + 0x18], edi
jne 0x408954
lea ecx, [esp + 0xf8]
push ecx
push edi
push eax
push fcn.00409140
push edi
push edi
call dword [sym.imp.msvcrt.dll__beginthreadex]
mov ecx, dword [esp + 0xc4]
add esp, 0x18
mov dword [ecx + 0x18], eax
test eax, eax
jne 0x408954
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x408946
lea eax, [edi + 1]
jmp 0x408948
jle 0x408950
movzx eax, ax
or eax, 0x80070000
test eax, eax
jne 0x40895c
inc dword [esi + 0x58]
mov edx, dword [esi + 0x58]
jmp 0x408978
mov edx, dword [esi + 0x58]
cmp edx, 1
jne 0x408975
mov dword [esp + 0x30], 0
mov dword [esp + 0x10], eax
jmp 0x408304
mov dword [esi + 0x54], edx
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 4]
inc ecx
cmp ecx, edx
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 + 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x4090eb
jmp 0x40830d
xor ecx, ecx
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x94], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x98], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x9c], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0xa0], edx
mov edx, dword [esp + 0x60]
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x64]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x68]
mov dword [esp + 0x70], edx
lea edx, [esp + 0xd4]
push edx
lea edx, [esp + 0xe4]
mov dword [esp + 0xec], edi
mov edi, dword [esp + 0x28]
push edx
lea edx, [esp + 0xe0]
mov dword [esp + 0xb0], edi
mov edi, dword [esp + 0x38]
push edx
push ecx
push eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0xb8], edi
add eax, 0x10
mov edi, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xa8], edi
mov edi, dword [esp + 0x30]
mov dword [esp + 0xc4], edi
mov edi, dword [esi + 0x18]
push dword [eax + 4]
push dword [esi + 0x1c]
mov edi, dword [edi + 8]
mov ecx, edi
call dword [0x4642a0]
call edi
mov edi, eax
add esp, 0x20
mov dword [esp + 0x20], edi
test edi, edi
jne 0x408d16
cmp dword [esp + 0xd4], eax
jne 0x408835
mov edx, dword [esp + 0xd8]
mov ecx, dword [esp + 0xdc]
cmp edx, dword [esp + 0x18]
jne 0x408aa9
cmp ecx, dword [esp + 0x1c]
je 0x408835
mov edi, dword [esp + 0xe0]
mov eax, edx
sub eax, dword [esp + 0x2c]
mov esi, ecx
sbb esi, dword [esp + 0x28]
sub edi, dword [esp + 0x48]
mov dword [esp + 0x74], esi
mov esi, dword [esp + 0xe4]
sbb esi, dword [esp + 0x4c]
cmp dword [esp + 0x74], 0
mov dword [esp + 0x78], esi
mov esi, dword [esp + 0x7c]
ja 0x408af1
jb 0x408ae5
cmp eax, 1
jae 0x408af1
cmp dword [esp + 0x78], 0
ja 0x408af1
cmp edi, 1
jb 0x408b61
push dword [esp + 0x84]
lea edx, [esp + 0x5c]
mov ecx, esi
push dword [esp + 0x8c]
push dword [esp + 0x80]
push edi
push dword [esp + 0x84]
push eax
call fcn.00407e00
mov ebx, eax
add esp, 0x18
mov eax, dword [esp + 0x58]
mov dword [esp + 0x34], eax
test ebx, ebx
jne 0x408831
test eax, eax
jne 0x408831
mov esi, dword [esp + 0xe0]
mov edx, dword [esp + 0xd8]
mov eax, edx
mov ecx, dword [esp + 0xdc]
mov edi, ecx
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0xe4]
mov dword [esp + 0x4c], esi
jmp 0x408b69
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x48]
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x4c], esi
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x80]
mov edi, dword [esi]
mov esi, dword [esp + 0x70]
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x6c]
mov eax, dword [eax]
mov dword [esp + 0x64], esi
mov esi, dword [esp + 0x8c]
mov dword [esp + 0x60], esi
mov esi, dword [esp + 0xa0]
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x9c]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x98]
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x94]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 0x40], esi
sub eax, edx
mov esi, dword [esp + 0xa4]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0xa8]
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x24], esi
sbb eax, ecx
mov esi, dword [esp + 0xe8]
mov dword [esp + 0x10], esi
xor esi, esi
mov dword [esp + 0x3c], edi
cmp esi, eax
mov edi, dword [esp + 0xac]
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x90]
mov eax, dword [esi]
mov dword [esp + 0x14], edi
jb 0x4085d1
ja 0x408c5a
mov eax, dword [esp + 0x3c]
cmp eax, dword [esp + 0xd4]
jbe 0x4085d1
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0xd4]
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x64], esi
mov esi, dword [esp + 0x8c]
mov dword [esp + 0x60], esi
mov esi, dword [esp + 0xa0]
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x28]
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x9c]
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x98]
mov dword [esp + 0x48], edi
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x94]
mov dword [esp + 0x4c], edi
mov edi, dword [esp + 0x80]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0xa4]
mov dword [esp + 0x80], edi
mov edi, dword [esp + 0xac]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0xa8]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0xe8]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x90]
mov dword [esp + 0x10], esi
jmp 0x4085c9
lea eax, [esi + 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], 0
je 0x408d4c
mov eax, dword [esp + 0x84]
cmp eax, dword [esi + 0x94]
ja 0x408d70
jb 0x408d4c
mov eax, dword [esp + 0x88]
cmp eax, dword [esi + 0x90]
jae 0x408d70
mov eax, dword [esp + 0x88]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x84]
mov dword [esi + 0x94], eax
mov dword [esi + 0x88], 1
lea eax, [esi + 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x408835
test edi, edi
je 0x408d9a
mov dword [esi + 0x50], 1
mov ecx, 1
mov dword [esi + 0x4c], edi
cmp edi, 2
je 0x408d9e
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x408db8
mov dword [esi + 0x50], 1
mov dword [esi + 0x40], eax
mov dword [esp + 0x3c], 0
test ecx, ecx
je 0x408dd2
mov dword [esi + 0x50], 1
mov dword [esi + 0x38], 1
mov dword [esp + 0x3c], 0
cmp dword [esp + 0x5c], 0
mov eax, dword [esp + 0x34]
je 0x408df3
mov dword [esi + 0x50], 1
mov dword [esi + 0x3c], 1
mov dword [esp + 0x3c], 0
cmp dword [esp + 0x30], 0
je 0x408ef5
test eax, eax
je 0x408e28
xor edi, edi
xor ebx, ebx
xor eax, eax
mov dword [esp + 0xd8], edi
xor ecx, ecx
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xe0], eax
mov dword [esp + 0xe4], ecx
jmp 0x408e44
mov ebx, dword [esp + 0xdc]
mov edi, dword [esp + 0xd8]
mov ecx, dword [esp + 0xe4]
mov eax, dword [esp + 0xe0]
sub edi, dword [esp + 0x2c]
sbb ebx, dword [esp + 0x28]
sub eax, dword [esp + 0x48]
mov dword [esp + 0xa4], eax
lea eax, [esi + 0xb0]
sbb ecx, dword [esp + 0x4c]
push eax
mov dword [esp + 0xd8], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add edi, dword [esi + 0xa0]
mov eax, dword [esp + 0xa4]
adc ebx, dword [esi + 0xa4]
add eax, dword [esi + 0xa8]
mov ecx, dword [esp + 0xd4]
adc ecx, dword [esi + 0xac]
cmp dword [esi + 0x9c], 0
mov dword [esi + 0xa0], edi
mov dword [esi + 0xa4], ebx
mov dword [esi + 0xa8], eax
mov dword [esi + 0xac], ecx
jne 0x408ee2
mov edx, dword [esi + 0x98]
test edx, edx
je 0x408ee2
push ecx
push eax
push ebx
push edi
mov edi, dword [edx]
mov ecx, edi
push edx
call dword [0x4642a0]
call edi
add esp, 0x14
test eax, eax
je 0x408ee2
mov dword [esi + 0x9c], 0xa
mov ebx, dword [esi + 0x9c]
lea eax, [esi + 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x14]
xor eax, eax
test ecx, ecx
sete al
cmp dword [esp + 0x50], 0
mov dword [esp + 0xa4], eax
mov dword [esp + 0xf4], eax
je 0x40900d
test ebx, ebx
jne 0x408f2e
cmp dword [esp + 0x3c], ebx
je 0x408f2e
cmp dword [esp + 0x34], ebx
jne 0x408f2e
lea eax, [ebx + 1]
jmp 0x408f30
xor eax, eax
mov edi, dword [esi + 0x18]
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0xf8]
push ecx
push dword [esp + 0x68]
mov edi, dword [edi + 0xc]
mov ecx, edi
push dword [esp + 0x70]
push dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x50]
push dword [eax + 4]
push dword [esi + 0x1c]
call dword [0x4642a0]
call edi
mov ebx, eax
add esp, 0x20
test ebx, ebx
je 0x408f84
mov dword [esp + 0xa8], 1
mov dword [esi + 0x50], 1
jmp 0x408f9f
mov edi, dword [esp + 0xf4]
mov ecx, dword [esp + 0x14]
test edi, edi
jne 0x409014
test ecx, ecx
jne 0x409014
lea edi, [esi + 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], 0
je 0x408fd5
mov eax, dword [esp + 0x84]
cmp eax, dword [esi + 0x94]
ja 0x408ff9
jb 0x408fd5
mov eax, dword [esp + 0x88]
cmp eax, dword [esi + 0x90]
jae 0x408ff9
mov eax, dword [esp + 0x88]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x84]
mov dword [esi + 0x94], eax
mov dword [esi + 0x88], 1
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0xf4]
mov ecx, dword [esp + 0x14]
jmp 0x409014
mov edi, dword [esp + 0xa4]
cmp dword [esp + 0xe8], 0
je 0x40908e
cmp dword [esp + 0x30], 0
je 0x40904b
test ebx, ebx
jne 0x40904b
cmp dword [esi + 0x50], ebx
jne 0x40904b
cmp dword [esp + 0x20], ebx
jne 0x40904b
cmp dword [esp + 0x34], ebx
jne 0x40904b
cmp dword [esi + 0x84], ebx
jne 0x409061
cmp dword [esp + 0xa8], ebx
je 0x40908e
cmp dword [esi + 0x84], 0
jne 0x409061
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 4]
mov dword [esi + 0x80], eax
mov ebx, dword [esp + 0x18]
mov eax, ebx
mov edx, dword [esp + 0x1c]
or eax, edx
jne 0x409073
test ecx, ecx
jne 0x4090ac
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x40]
mov dword [eax + 0xc], esi
mov esi, dword [esp + 0x7c]
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], edx
inc dword [esi + 0x84]
test ecx, ecx
jne 0x4090ac
mov eax, dword [esp + 0x24]
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x4090eb
mov edi, dword [esp + 0x38]
jmp 0x407f10
test edi, edi
je 0x4090c6
push dword [esi + 0xe8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x4090eb
mov edi, dword [esp + 0x38]
jmp 0x4090d7
mov edi, dword [esp + 0x38]
cmp dword [edi + 4], 0
je 0x409127
mov dword [esi + 0x24], 1
push dword [esi + 0xe4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x407f10
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x409129
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xf0]
xor ecx, esp
call fcn.0045e090
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xf0]
xor ecx, esp
call fcn.0045e090
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [esp + 0xfc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045e090
mov esp, ebp
pop ebp
ret