Function at 0x405ee0
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534f38
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x586e90]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ebx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.00401040
mov esi, 8
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], esi
jb 0x405f2a
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x48]
call fcn.00408db0
mov byte [ebp - 4], 4
cmp dword [ebp - 0x18], esi
jb 0x405f48
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0040f643
add esp, 4
xor ecx, ecx
lea edx, [ebp - 0x48]
mov word [ebp - 0x2c], cx
xor ebx, ebx
push edx
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
call fcn.00408950
mov byte [ebp - 4], 5
mov esi, dword [ebp - 0x40]
push 0x5c
push esi
call fcn.00510753
add esp, 8
cmp eax, ebx
jne 0x405f81
or eax, 0xffffffff
jmp 0x405f85
sub eax, esi
sar eax, 1
push eax
push ebx
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x40]
call fcn.00408710
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 6
call fcn.004087c0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405fc3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0040f6aa
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x405fdd
push 0x80004005
call fcn.004038b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 7
call fcn.0040f6aa
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40600a
push 0x80004005
call fcn.004038b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 8
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov byte [ebp - 0x31], 0
sar ecx, 2
mov dword [ebp - 0x50], ebx
test ecx, ecx
je 0x406352
call fcn.0040f6aa
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x405fd3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 9
call fcn.0040f6aa
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x405fd3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x58], eax
mov byte [ebp - 4], 0xa
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, edx
sub ecx, eax
sar ecx, 2
cmp ecx, ebx
jbe 0x4062fe
mov ecx, dword [eax + ebx*4]
cmp dword [ecx - 0xc], 0
lea esi, [eax + ebx*4]
jge 0x4060a5
or edi, 0xffffffff
jmp 0x4060c8
push 0x5642a0
push ecx
call fcn.005106f3
mov edx, dword [ebp + 0x10]
add esp, 8
test eax, eax
jne 0x4060bf
or edi, 0xffffffff
jmp 0x4060c5
sub eax, dword [esi]
sar eax, 1
mov edi, eax
mov eax, dword [ebp + 0xc]
sub edx, eax
sar edx, 2
cmp edx, ebx
jbe 0x4062fe
push edi
push 0
lea edx, [ebp - 0x5c]
lea ecx, [eax + ebx*4]
push edx
call fcn.00408710
push eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x60]
push ecx
mov byte [ebp - 4], 0xb
call fcn.00407c50
add esp, 0xc
mov byte [ebp - 4], 0xc
mov ecx, dword [eax]
mov esi, dword [ebp - 0x38]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x406158
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x406148
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x406148
push eax
call fcn.004088e0
mov dword [ebp - 0x54], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x40613d
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x54]
add ecx, 0x10
mov dword [ebp - 0x38], ecx
jmp 0x406155
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x38]
call fcn.00403730
mov ebx, dword [ebp - 0x50]
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x60]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40617b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x5c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40619e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
sub ecx, eax
sar ecx, 2
cmp ecx, ebx
jbe 0x4062fe
mov edx, dword [eax + ebx*4]
lea ecx, [eax + ebx*4]
mov eax, dword [edx - 0xc]
push eax
inc edi
push edi
lea eax, [ebp - 0x3c]
push eax
call fcn.00408710
push eax
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp - 0x4c]
push edx
mov byte [ebp - 4], 0xd
call fcn.00407c50
add esp, 0xc
mov byte [ebp - 4], 0xe
mov ecx, dword [eax]
mov esi, dword [ebp - 0x30]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x406237
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40622a
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40622a
push eax
call fcn.004088e0
mov dword [ebp - 0x54], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40621f
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x54]
add ecx, 0x10
mov dword [ebp - 0x30], ecx
jmp 0x406237
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00403730
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0x4c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40625a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40627d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x38]
cmp dword [esi - 0xc], 0
jl 0x4062a1
push 0x5642a4
push esi
call fcn.005106f3
add esp, 8
test eax, eax
je 0x4062a1
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x406308
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x58]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4062c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4062e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
inc ebx
sar ecx, 2
mov dword [ebp - 0x50], ebx
cmp ebx, ecx
jb 0x406035
jmp 0x406352
push str.invalid_vector_T__subscript
call fcn.0050e7d4
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x58]
add eax, 0xfffffff0
mov byte [ebp - 0x31], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40632f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406352
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x38]
push esi
call fcn.00409870
add esp, 4
test eax, eax
jne 0x40648b
cmp dword [esi - 4], 1
jle 0x40637b
mov ecx, dword [esi - 0xc]
push ecx
lea ecx, [ebp - 0x38]
call fcn.00403580
mov esi, dword [ebp - 0x38]
push esi
push str.UpdateService:Service_is_Not_Exist___s_
call fcn.00408e80
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
add esp, 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4063ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4063cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4063ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406412
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406435
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x406481
mov eax, dword [ebp + 0x10]
mov edi, eax
cmp esi, eax
je 0x406478
lea esp, [esp]
mov eax, dword [esi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40646e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x406450
mov esi, dword [ebp + 0xc]
push esi
call fcn.0040f643
add esp, 4
mov eax, 1
jmp 0x4067a7
cmp byte [ebp - 0x31], 0
mov edi, dword [ebp - 0x30]
je 0x4065bc
mov dword [ebp - 0x44], 0
nop
push 0x927c0
sub esp, 0x1c
mov esi, esp
mov dword [ebp - 0x4c], esp
mov ebx, 7
xor ecx, ecx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
push 0xa
mov eax, str._uninstall
mov word [esi], cx
call fcn.00401950
mov byte [ebp - 4], 0xf
cmp dword [edi - 4], 1
jle 0x4064e6
mov edx, dword [edi - 0xc]
push edx
lea ecx, [ebp - 0x30]
call fcn.00403580
mov edi, dword [ebp - 0x30]
sub esp, 0x1c
mov esi, esp
xor eax, eax
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov word [esi], ax
mov eax, edi
mov dword [ebp - 0x5c], esp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406502
sub eax, edx
sar eax, 1
push eax
mov eax, edi
call fcn.00401950
mov byte [ebp - 4], 8
call fcn.004092e0
test eax, eax
jne 0x40652d
push str.UpdateService:Uninstall_Service_Fail
jmp 0x406532
push str.UpdateService:Uninstall_Service_Success
call fcn.00408e80
add esp, 4
push str.temp
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x3c]
push edx
call fcn.004089e0
mov eax, dword [eax]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
add esp, 0xc
push eax
push edi
call esi
test eax, eax
mov eax, dword [ebp - 0x3c]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40657f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x406590
push str.UpdateService:Rename__Service__Fail
call fcn.00408e80
add esp, 4
mov ecx, dword [ebp - 0x38]
push edi
push ecx
call esi
test eax, eax
jne 0x4067c5
push str.UpdateService:Update_Service_Fail
call fcn.00408e80
mov eax, dword [ebp - 0x44]
inc eax
add esp, 4
mov dword [ebp - 0x44], eax
cmp eax, 3
jl 0x4064a0
push str.UpdateService:Update_Service_All_Fail
call fcn.00408e80
push str.temp
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x3c]
push edx
call fcn.004089e0
mov eax, dword [eax]
add esp, 0x10
push edi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
mov eax, dword [ebp - 0x3c]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406609
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40661a
push str.UpdateService:Rename_Old__Service__Fail
call fcn.00408e80
add esp, 4
push 0x927c0
sub esp, 0x1c
mov esi, esp
mov dword [ebp - 0x3c], esp
mov ebx, 7
xor ecx, ecx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
push 8
mov eax, str._install
mov word [esi], cx
call fcn.00401950
mov byte [ebp - 4], 0x11
cmp dword [edi - 4], 1
jle 0x406660
mov edx, dword [edi - 0xc]
push edx
lea ecx, [ebp - 0x30]
call fcn.00403580
mov edi, dword [ebp - 0x30]
sub esp, 0x1c
mov esi, esp
xor eax, eax
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov word [esi], ax
mov eax, edi
mov dword [ebp - 0x4c], esp
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406680
sub eax, edx
sar eax, 1
push eax
mov eax, edi
call fcn.00401950
mov byte [ebp - 4], 8
call fcn.004092e0
test eax, eax
jne 0x4066b1
push str.UpdateService:Install_Old_Service_Fail
call fcn.00408e80
add esp, 4
add edi, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4066d1
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4066f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406717
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40673a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40675d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x4067a5
mov eax, dword [ebp + 0x10]
mov edi, eax
cmp esi, eax
je 0x40679c
mov eax, dword [esi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406792
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x406774
mov esi, dword [ebp + 0xc]
push esi
call fcn.0040f643
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050ec37
mov esp, ebp
pop ebp
ret 0x14
push str.UpdateService:Update_Service_Success
call fcn.00408e80
add esp, 4
push 0x927c0
sub esp, 0x1c
mov esi, esp
mov dword [ebp - 0x3c], esp
mov ebx, 7
xor edx, edx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
push 8
mov eax, str._install
mov word [esi], dx
call fcn.00401950
mov byte [ebp - 4], 0x10
cmp dword [edi - 4], 1
jle 0x406818
mov eax, dword [edi - 0xc]
push eax
lea ecx, [ebp - 0x30]
call fcn.00403580
mov edi, dword [ebp - 0x30]
sub esp, 0x1c
mov esi, esp
xor ecx, ecx
mov eax, edi
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov dword [ebp - 0x4c], esp
mov word [esi], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406834
sub eax, edx
sar eax, 1
push eax
mov eax, edi
call fcn.00401950
mov byte [ebp - 4], 8
call fcn.004092e0
test eax, eax
jne 0x406865
push str.UpdateService:Install_Service_Fail
call fcn.00408e80
add esp, 4
push str.UpdateService:Install_Service_Success
call fcn.00408e80
push str.temp
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 0x3c]
push eax
call fcn.004089e0
mov eax, dword [eax]
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
mov eax, dword [ebp - 0x3c]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4068c2
push str.UpdateService:Delete__Service__Fail
call fcn.00408e80
add esp, 4
add edi, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068e2
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406905
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406928
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40694b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40696e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x406481
mov eax, dword [ebp + 0x10]
mov edi, eax
cmp esi, eax
je 0x406478
lea ecx, [ecx]
mov eax, dword [esi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4069ae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x406990
jmp 0x406475