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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
push ebx
push esi
mov ebx, ecx
push edi
push 0xffffffffffffffff
mov dword [esp + 0x3c], ebx
mov edi, dword [ebx]
push dword [ebx + 0x1c]
mov dword [esp + 0xac], edi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x406292
xor esi, esi
inc eax
mov dword [esp + 0xdc], eax
cmp dword [edi + 0x24], esi
jne 0x406290
mov ebx, dword [edi + 0x34]
mov edx, dword [edi + 0x30]
mov ecx, edx
push ebx
push edx
push esi
add ecx, eax
mov dword [esp + 0x90], edx
push esi
mov eax, ebx
mov dword [edi + 0x30], ecx
push esi
adc eax, esi
mov dword [esp + 0x9c], ebx
push esi
lea edx, [esp + 0x58]
mov dword [edi + 0x34], eax
mov ecx, edi
call fcn.004054ee
mov ecx, dword [esp + 0x40]
xor edx, edx
mov esi, eax
mov dword [esp + 0x44], edx
mov eax, dword [edi + 0x70]
xorps xmm0, xmm0
mov dword [esp + 0xc], eax
mov ebx, edx
mov dword [esp + 0x68], edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x28], edx
movlpd qword [esp + 0x48], xmm0
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x10], ecx
test esi, esi
jne 0x405b99
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], edx
test ecx, ecx
jne 0x405b99
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x2c], ecx
movlpd qword [esp + 0x50], xmm0
mov ecx, dword [esp + 0x54]
mov eax, dword [ebx + 8]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x34], edx
mov edx, dword [edi + 0x64]
sub edx, dword [edi + 0x60]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x30], edx
test eax, eax
jne 0x40574f
mov eax, dword [edi]
mov ecx, dword [edi + 0x14]
add eax, 0x10
push eax
push ecx
call dword [ecx]
xor ecx, ecx
mov dword [esp + 0x24], eax
test eax, eax
je 0x40597f
mov edx, dword [esp + 0x30]
mov dword [eax], ecx
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x40574c
mov dword [ecx], eax
jmp 0x40574f
mov dword [ebx + 8], eax
add eax, 0x10
mov dword [esp + 0x3c], eax
mov dword [esp + 0x20], eax
test edx, edx
je 0x405780
xor eax, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
mov ebx, edx
mov eax, dword [edi + 0x60]
add eax, 0x10
mov dword [esp + 0x28], edx
add eax, dword [edi + 0x5c]
mov dword [esp + 0x20], eax
jmp 0x40588e
mov ecx, dword [edi + 0xc]
mov edx, eax
mov dword [esp + 0x74], eax
xor ebx, ebx
mov eax, dword [edi]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x70], eax
jmp 0x4057cc
mov dword [esp + 0x78], eax
lea eax, [esp + 0x78]
push eax
push edx
push ecx
call dword [ecx]
mov ecx, dword [esp + 0x78]
mov esi, eax
mov edx, dword [esp + 0x74]
add ebx, ecx
mov eax, dword [esp + 0x70]
add edx, ecx
sub eax, ecx
mov dword [esp + 0x74], edx
mov dword [esp + 0x70], eax
test esi, esi
jne 0x4057d2
test ecx, ecx
je 0x4057d0
mov ecx, dword [esp + 0x50]
test eax, eax
jne 0x405797
xor esi, esi
add dword [esp + 0x14], ebx
mov eax, ebx
mov edx, dword [esp + 0x18]
adc edx, 0
cmp dword [esp + 0x34], 0
push 0
cmovne eax, dword [esp + 0x2c]
add dword [edi + 0x68], ebx
mov dword [esp + 0x2c], eax
pop eax
adc dword [edi + 0x6c], eax
xor ecx, ecx
cmp ebx, dword [edi]
mov dword [esp + 0x18], edx
setne cl
mov dword [esp + 0xc], ecx
je 0x40580f
xor ecx, ecx
inc ecx
mov dword [edi + 0x70], ecx
jmp 0x405812
xor ecx, ecx
inc ecx
test esi, esi
je 0x405822
mov dword [edi + 0x48], esi
mov esi, eax
mov dword [edi + 0x70], ecx
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x14]
mov eax, edx
sub ecx, dword [esp + 0x6c]
sbb eax, dword [esp + 0x1c]
mov dword [esp + 0x54], eax
jne 0x40583d
xor eax, eax
inc eax
cmp ecx, eax
jb 0x40588e
push dword [esp + 0x88]
xor eax, eax
lea edx, [esp + 0x44]
push dword [esp + 0x88]
mov ecx, edi
push eax
push eax
push eax
push eax
call fcn.004054ee
mov ecx, dword [esp + 0x40]
mov esi, eax
mov dword [esp + 0x10], ecx
test esi, esi
jne 0x405b59
test ecx, ecx
jne 0x405b59
mov eax, dword [esp + 0x14]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0xc0], ebx
cmp dword [esp + 0x34], eax
lea ecx, [esp + 0xb8]
push ecx
mov ecx, dword [esp + 0x3c]
sete al
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0x10]
push dword [ecx + 4]
mov dword [esp + 0xcc], eax
xor eax, eax
push dword [edi + 0x1c]
inc eax
mov dword [esp + 0xd8], eax
mov eax, dword [edi + 0x18]
call dword [eax]
mov eax, dword [esp + 0xcc]
xor ecx, ecx
inc ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x68], ecx
cmp eax, ecx
je 0x405b27
mov edx, dword [esp + 0x30]
test edx, edx
je 0x405933
push dword [esp + 0xc0]
push dword [esp + 0x24]
push dword [esp + 0x44]
call fcn.0041a1e0
mov ecx, dword [esp + 0xcc]
add esp, 0xc
add dword [edi + 0x60], ecx
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0xc8]
jmp 0x40593a
mov ecx, dword [esp + 0xc0]
test eax, eax
mov eax, dword [esp + 0xc]
jne 0x4059fd
test eax, eax
jne 0x405a11
cmp ecx, ebx
jne 0x4059e9
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x34], eax
mov eax, dword [eax]
mov dword [esp + 0x24], eax
test edx, edx
je 0x40571c
xor ecx, ecx
mov edx, ecx
mov dword [edi + 0x60], ecx
mov dword [edi + 0x64], ecx
jmp 0x405718
inc ecx
xor edx, edx
mov eax, ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], edx
mov ebx, edx
mov ecx, dword [esp + 0x10]
test esi, esi
jne 0x405ba9
lea eax, [edi + 0xb0]
push eax
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
xor ecx, ecx
cmp dword [edi + 0x88], ecx
je 0x405b72
mov eax, dword [esp + 0x88]
cmp eax, dword [edi + 0x94]
jb 0x405b72
ja 0x4059e1
mov eax, dword [esp + 0x84]
cmp eax, dword [edi + 0x90]
jbe 0x405b72
xor eax, eax
inc eax
jmp 0x405b74
xor ecx, ecx
push 0xb
pop esi
mov dword [esp + 0x1c], ecx
mov ebx, ecx
mov dword [esp + 0x24], ecx
jmp 0x405c85
cmp dword [esp + 0xc8], 3
cmove eax, dword [esp + 0xdc]
mov dword [esp + 0xc], eax
mov dword [esp + 0x44], 1
cmp ecx, ebx
jne 0x405a2a
xor edx, edx
mov dword [edi + 0x60], edx
mov dword [edi + 0x64], edx
jmp 0x40598c
cmp dword [esp + 0xc8], 3
jne 0x405a91
xor eax, eax
mov dword [edi + 0x60], eax
mov dword [edi + 0x64], eax
test edx, edx
je 0x405a62
mov eax, ebx
sub eax, ecx
push eax
mov eax, dword [esp + 0x24]
add eax, ecx
push eax
mov eax, dword [esp + 0x44]
add eax, ecx
push eax
call fcn.0041a1e0
mov ecx, dword [esp + 0xcc]
add esp, 0xc
mov edx, dword [esp + 0x20]
sub ebx, ecx
add edx, ecx
sub dword [esp + 0x14], ebx
push 0
pop eax
sbb dword [esp + 0x18], eax
cmp dword [esp + 0x34], 0
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], edx
jne 0x405992
mov dword [esp + 0x28], ecx
jmp 0x405992
test edx, edx
je 0x405aa1
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x405b0e
mov eax, dword [edi + 0x5c]
test eax, eax
jne 0x405ac2
mov eax, dword [edi]
mov ecx, dword [edi + 0x14]
add eax, 0x10
push eax
push ecx
call dword [ecx]
test eax, eax
je 0x405ac9
mov ecx, dword [esp + 0xc0]
mov dword [edi + 0x5c], eax
lea edx, [eax + 0x10]
test edx, edx
jne 0x405ae3
xor ecx, ecx
inc ecx
mov eax, ecx
mov dword [esp + 0x5c], ecx
xor ecx, ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], ecx
mov ebx, ecx
jmp 0x405992
sub ebx, ecx
sub dword [esp + 0x14], ebx
push 0
pop eax
sbb dword [esp + 0x18], eax
mov dword [edi + 0x60], eax
mov eax, dword [esp + 0x20]
push ebx
add eax, ecx
mov dword [edi + 0x64], ebx
push eax
push edx
call fcn.0041a1e0
mov ecx, dword [esp + 0xcc]
add esp, 0xc
cmp dword [esp + 0x34], 0
mov edx, dword [esp + 0x28]
cmove edx, ecx
mov dword [esp + 0x28], edx
xor edx, edx
mov eax, edx
jmp 0x405988
cmp dword [esp + 0x30], 0
mov eax, ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x8c], ecx
je 0x405a1d
push ebx
push dword [esp + 0x24]
push dword [esp + 0x44]
call fcn.0041a1e0
mov eax, dword [esp + 0x18]
add esp, 0xc
jmp 0x405a1d
mov edx, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x1c], eax
mov ebx, eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x28], edx
jmp 0x405996
mov eax, ecx
mov esi, dword [edi + 0x9c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], eax
lea eax, [edi + 0xb0]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
jmp 0x405ba9
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x14], edx
and dword [esp + 0x24], 0
test esi, esi
jne 0x405c83
cmp dword [esp + 0x44], esi
je 0x405bed
test ecx, ecx
jne 0x405c83
mov ecx, dword [esp + 0x38]
mov eax, dword [edi + 0x18]
push dword [ecx + 4]
push dword [edi + 0x1c]
call dword [eax + 4]
mov edx, eax
xor ecx, ecx
mov dword [esp + 0x24], edx
test edx, edx
je 0x405bfc
xor eax, eax
mov dword [esp + 0x44], ecx
inc eax
mov dword [esp + 0xc], eax
jmp 0x405bef
xor ecx, ecx
cmp dword [esp + 0x10], 0
jne 0x405c85
jmp 0x405c00
mov eax, dword [esp + 0xc]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x74], ecx
test eax, eax
jne 0x405c94
mov ecx, dword [edi + 0x58]
mov eax, ecx
cmp ecx, dword [edi + 0x54]
jae 0x405c57
cmp dword [esp + 0x2c], 0
je 0x405c57
lea eax, [ecx + 5]
imul ecx, eax, 0x28
add ecx, edi
call fcn.00405435
mov ecx, eax
mov eax, dword [edi + 0x58]
test ecx, ecx
jne 0x405c3d
inc eax
mov dword [edi + 0x58], eax
jmp 0x405c57
xor edx, edx
inc edx
cmp eax, edx
jne 0x405c54
xor eax, eax
mov dword [esp + 0xc], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x74], ecx
jmp 0x405c98
mov dword [edi + 0x54], eax
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + 4]
inc ecx
cmp ecx, eax
sbb eax, eax
and eax, ecx
add eax, 5
imul eax, eax, 0x28
add eax, edi
mov dword [esp + 0x78], eax
lea ecx, [eax + 0x1c]
call fcn.0040670a
test eax, eax
jne 0x406292
jmp 0x405c94
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x78], ecx
inc eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
xorps xmm0, xmm0
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x48], xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x90], xmm0
test esi, esi
jne 0x406010
test eax, eax
je 0x406010
cmp dword [esp + 0x24], esi
jne 0x406010
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x48], xmm0
mov eax, dword [edx + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x60]
add eax, dword [esp + 0x24]
mov dword [esp + 0x60], eax
adc ecx, 0
mov dword [esp + 0x9c], 1
cmp eax, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x64], ecx
jne 0x405d44
cmp ecx, eax
jne 0x405d44
xor ecx, ecx
inc ecx
jmp 0x405d46
xor ecx, ecx
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xa8], eax
lea eax, [esp + 0x9c]
push eax
lea eax, [esp + 0x94]
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x18]
push eax
lea eax, [esp + 0x68]
mov dword [esp + 0x74], ecx
mov ecx, dword [edi + 0x18]
push eax
push dword [esp + 0x88]
mov eax, dword [esp + 0x3c]
push dword [esp + 0x34]
add eax, 0x10
mov dword [esp + 0xc0], ebx
push eax
push dword [edx + 4]
push dword [edi + 0x1c]
call dword [ecx + 8]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x405ff9
cmp dword [esp + 0x9c], eax
jne 0x406030
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
cmp eax, dword [esp + 0x14]
jne 0x405df9
cmp ecx, dword [esp + 0x18]
je 0x406030
mov edi, dword [esp + 0xa4]
mov edx, eax
sub edx, dword [esp + 0x30]
mov eax, ecx
sbb eax, dword [esp + 0x34]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x90]
sub eax, dword [esp + 0x3c]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x94]
sbb eax, dword [esp + 0x20]
mov dword [esp + 0x7c], eax
xor eax, eax
cmp dword [esp + 0x80], eax
ja 0x405e56
jb 0x405e46
cmp edx, 1
jae 0x405e56
cmp dword [esp + 0x7c], eax
ja 0x405e56
cmp dword [esp + 0xa0], 1
jb 0x405ec8
push dword [esp + 0x88]
mov ecx, edi
push dword [esp + 0x88]
push dword [esp + 0x84]
push dword [esp + 0xac]
push dword [esp + 0x90]
push edx
lea edx, [esp + 0x58]
call fcn.004054ee
mov esi, eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
test esi, esi
jne 0x406030
test eax, eax
jne 0x406030
mov edi, dword [esp + 0x90]
mov ecx, dword [esp + 0x64]
mov edx, ecx
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x94]
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0xa4]
jmp 0x405ed0
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x6c]
sub edx, dword [esp + 0x60]
mov dword [esp + 0x80], edx
mov edx, dword [edi]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0xb4]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x5c], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x8c], edx
mov eax, dword [eax]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x14], edx
sbb eax, ecx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x18], edx
xor edx, edx
mov dword [esp + 0x30], ebx
cmp edx, eax
mov ebx, dword [esp + 0xac]
mov edx, dword [esp + 0x38]
jb 0x405d13
mov eax, dword [esp + 0x80]
ja 0x405f79
cmp dword [esp + 0x24], eax
jbe 0x405d13
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0xac]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x18], eax
jmp 0x405d13
push dword [esp + 0x88]
mov ecx, edi
push dword [esp + 0x88]
call fcn.004055b5
jmp 0x406030
mov eax, dword [esp + 0x54]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
push 0xffffffffffffffff
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x406292
mov eax, dword [esp + 0x68]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x2c], eax
inc ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x50], ecx
cmp dword [edi + 0x24], edx
jne 0x406290
cmp dword [edi + 0x50], edx
je 0x406076
mov eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], eax
jmp 0x4060da
mov eax, dword [esp + 0x24]
test eax, eax
je 0x406093
mov dword [edi + 0x50], ecx
cmp eax, 2
mov ecx, dword [esp + 0x5c]
push 1
mov dword [edi + 0x4c], eax
pop eax
cmove ecx, eax
jmp 0x406097
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x74]
test eax, eax
je 0x4060ad
mov dword [edi + 0x50], 1
mov dword [edi + 0x40], eax
mov dword [esp + 0x2c], edx
test ecx, ecx
je 0x4060c0
xor ecx, ecx
mov dword [esp + 0x2c], edx
inc ecx
mov dword [edi + 0x50], ecx
mov dword [edi + 0x38], ecx
jmp 0x4060c3
xor ecx, ecx
inc ecx
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x8c], edx
je 0x4060da
mov dword [edi + 0x50], ecx
mov dword [edi + 0x3c], ecx
mov dword [esp + 0x2c], edx
cmp dword [esp + 0x44], edx
je 0x40612d
test eax, eax
je 0x4060f6
xorps xmm0, xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x90], xmm0
mov esi, dword [esp + 0x60]
sub esi, dword [esp + 0x30]
mov edx, dword [esp + 0x64]
sbb edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x90]
sub ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x94]
sbb eax, dword [esp + 0x20]
push eax
push ecx
push edx
push esi
lea ecx, [edi + 0x98]
call fcn.0040538d
mov esi, eax
mov ecx, dword [esp + 0xc]
xor edx, edx
test ecx, ecx
sete dl
cmp dword [esp + 0x68], 0
mov dword [esp + 0x98], edx
je 0x4061cf
test esi, esi
jne 0x406161
cmp dword [esp + 0x2c], esi
je 0x406161
cmp dword [esp + 0x10], esi
jne 0x406161
xor eax, eax
lea ecx, [eax + 1]
jmp 0x406165
xor eax, eax
mov ecx, eax
mov eax, dword [edi + 0x18]
lea edx, [esp + 0x50]
push edx
lea edx, [esp + 0x9c]
push edx
push ebx
push dword [esp + 0x28]
mov ebx, dword [esp + 0x48]
push ecx
push dword [ebx + 4]
push dword [edi + 0x1c]
call dword [eax + 0xc]
mov esi, eax
test esi, esi
je 0x40619a
xor eax, eax
inc eax
mov dword [esp + 0x48], eax
mov dword [edi + 0x50], eax
jmp 0x4061ad
mov edx, dword [esp + 0x98]
mov ecx, dword [esp + 0xc]
test edx, edx
jne 0x4061d3
test ecx, ecx
jne 0x4061d3
push dword [esp + 0x88]
mov ecx, edi
push dword [esp + 0x88]
call fcn.004055b5
mov edx, dword [esp + 0x98]
mov ecx, dword [esp + 0xc]
jmp 0x4061d3
mov ebx, dword [esp + 0x38]
cmp dword [esp + 0x50], 0
je 0x40623d
xor eax, eax
cmp dword [esp + 0x44], eax
je 0x406205
test esi, esi
jne 0x406205
cmp dword [edi + 0x50], eax
jne 0x406205
cmp dword [esp + 0x24], eax
jne 0x406205
cmp dword [esp + 0x10], eax
jne 0x406205
cmp dword [edi + 0x84], eax
jne 0x406216
cmp dword [esp + 0x48], eax
je 0x40623d
cmp dword [edi + 0x84], eax
jne 0x406216
mov eax, dword [ebx + 4]
mov dword [edi + 0x80], eax
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
or eax, esi
jne 0x406226
test ecx, ecx
jne 0x40624a
mov eax, dword [esp + 0x28]
mov dword [ebx + 0xc], eax
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], esi
inc dword [edi + 0x84]
test ecx, ecx
jne 0x40624a
mov ecx, dword [esp + 0x78]
add ecx, 0x20
jmp 0x406270
test edx, edx
je 0x40625f
lea ecx, [edi + 0xe8]
call fcn.0040670a
test eax, eax
jne 0x406292
jmp 0x40626a
xor eax, eax
cmp dword [ebx + 4], eax
je 0x406290
inc eax
mov dword [edi + 0x24], eax
lea ecx, [edi + 0xe4]
call fcn.0040670a
test eax, eax
jne 0x406292
push 0xffffffffffffffff
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x406292
xor esi, esi
inc eax
jmp 0x405648
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret