Function at 0x588980
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6400f0
mov eax, dword fs:[0]
push eax
sub esp, 0x634
mov eax, dword [0x6a6040]
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
mov dword [ebp - 0x628], ecx
mov eax, dword [ecx + 0x14]
lea edi, [ecx + 0x6c]
mov dword [ebp - 0x640], eax
mov eax, dword [ecx + 0x75]
mov dword [ebp - 0x63c], eax
mov dword [ebp - 0x638], edi
nop
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
or ebx, 0xffffffff
mov dword [ebp - 0x630], edi
mov dword [ebp - 0x62c], ebx
mov esi, dword [0x6ac16c]
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
jne 0x588a07
mov dword [esi + 8], 0
jmp 0x588a0b
test eax, eax
jne 0x588a14
inc dword [esi + 0xc]
inc dword [esi + 8]
inc dword [esi + 4]
mov ecx, dword [ebp - 0x638]
mov esi, dword [ecx]
cmp esi, ecx
je 0x588a55
test esi, esi
je 0x588a57
cmp dword [esi + 0x10610], 0
jle 0x588a57
mov eax, dword [esi + 0x10634]
sub eax, edi
js 0x588a3f
cmp eax, ebx
jae 0x588a47
mov ebx, eax
jmp 0x588a41
xor ebx, ebx
mov dword [ebp - 0x62c], ebx
mov eax, dword [esi]
mov esi, eax
cmp eax, ecx
je 0x588a55
test esi, esi
jne 0x588a24
jmp 0x588a57
xor esi, esi
mov edi, dword [0x6ac16c]
mov eax, dword [edi + 0xc]
push dword [edi]
dec dword [edi + 4]
dec eax
dec dword [edi + 8]
mov dword [ebp - 0x624], eax
mov dword [edi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x588a87
inc dword [edi + 0xc]
inc dword [edi + 8]
inc dword [edi + 4]
jmp 0x588aa3
cmp dword [ebp - 0x624], 0
jne 0x588aa3
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10
push edi
call fcn.00606a78
add esp, 8
test esi, esi
je 0x588aae
mov esi, 1
jmp 0x588ad3
push ebx
push 0
lea eax, [ebp - 0x640]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov esi, eax
cmp esi, 1
je 0x588ad3
cmp esi, 0x102
jne 0x589268
mov eax, dword [ebp - 0x628]
push dword [eax + 0x75]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edi, dword [0x6ac16c]
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
jne 0x588b02
mov dword [edi + 8], 0
jmp 0x588b06
test eax, eax
jne 0x588b0f
inc dword [edi + 0xc]
inc dword [edi + 8]
inc dword [edi + 4]
mov edi, dword [ebp - 0x638]
mov ebx, dword [edi]
mov dword [ebp - 0x634], ebx
cmp ebx, edi
je 0x588b6c
test ebx, ebx
je 0x588b6c
mov ecx, dword [ebp - 0x62c]
mov edx, dword [ebp - 0x630]
mov eax, dword [ebx + 0x10610]
test eax, eax
jne 0x588b42
cmp esi, 1
je 0x588b9d
test eax, eax
jle 0x588b5a
cmp esi, 0x102
jne 0x588b5a
mov eax, dword [ebx + 0x10634]
sub eax, ecx
sub eax, edx
test eax, eax
jle 0x588b9d
mov eax, dword [ebx]
mov ebx, eax
mov dword [ebp - 0x634], eax
cmp eax, edi
je 0x588b6c
test ebx, ebx
jne 0x588b31
mov esi, dword [0x6ac16c]
dec dword [esi + 4]
dec dword [esi + 8]
mov edi, dword [esi + 0xc]
dec edi
mov dword [esi + 0xc], edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x589248
inc dword [esi + 0xc]
inc dword [esi + 8]
inc dword [esi + 4]
jmp 0x5889d0
mov eax, dword [ebp - 0x628]
mov esi, dword [eax + 0x82]
mov dword [ebp - 0x62c], esi
test esi, esi
je 0x588bb8
lock inc dword [esi]
jmp 0x588bc0
xor esi, esi
mov dword [ebp - 0x62c], esi
test byte [0x6ae0e8], 3
jne 0x588d08
test esi, esi
je 0x588ca1
test byte [esi + 0x10], 2
je 0x588be3
mov ecx, dword [esi + 8]
jmp 0x588ca3
mov edi, dword [esi + 4]
xor ecx, ecx
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x630], ecx
cmp edi, 4
ja 0x588c1a
push edi
push edx
lea eax, [ebp - 0x630]
push eax
call fcn.00609db0
mov ecx, dword [ebp - 0x630]
add esp, 0xc
mov dword [esi + 8], ecx
or word [esi + 0x10], 2
jmp 0x588ca3
mov eax, edi
sar eax, 2
mov dword [ebp - 0x630], eax
xor eax, eax
mov dword [ebp - 0x624], eax
cmp dword [ebp - 0x630], eax
je 0x588c6a
mov esi, dword [ebp - 0x630]
xor ebx, ebx
nop dword [eax]
mov ecx, ebx
shr eax, 0x19
shl ecx, 7
or ecx, eax
xor ecx, dword [edx]
add edx, 4
mov eax, ecx
mov ebx, eax
sub esi, 1
jne 0x588c40
mov ebx, dword [ebp - 0x634]
mov esi, dword [ebp - 0x62c]
mov dword [ebp - 0x624], eax
and edi, 3
je 0x588c97
mov esi, dword [ebp - 0x624]
mov ecx, esi
shr eax, 0x19
shl ecx, 7
lea edx, [edx + 1]
or ecx, eax
movzx eax, byte [edx - 1]
xor ecx, eax
mov eax, ecx
mov esi, eax
sub edi, 1
jne 0x588c75
mov esi, dword [ebp - 0x62c]
mov dword [esi + 8], ecx
or word [esi + 0x10], 2
jmp 0x588ca3
xor ecx, ecx
xor edx, edx
mov eax, ecx
div dword [0x6ae0e0]
mov eax, dword [0x6ae0e4]
mov edi, dword [eax + edx*4]
lea eax, [eax + edx*4]
test edi, edi
je 0x588d08
nop dword [eax]
mov ecx, dword [edi + 4]
cmp ecx, esi
je 0x588cf2
test ecx, ecx
je 0x588cea
test esi, esi
je 0x588cea
mov eax, dword [ecx + 4]
cmp eax, dword [esi + 4]
jne 0x588cea
mov edx, dword [esi + 0xc]
mov ecx, dword [ecx + 0xc]
push eax
call fcn.005a4c60
add esp, 4
test al, al
jne 0x588cf2
mov edi, dword [edi]
test edi, edi
jne 0x588cc0
jmp 0x588d08
mov edi, dword [edi + 8]
mov dword [ebp - 0x624], edi
test edi, edi
je 0x588d08
cmp dword [edi + 0x26a], 0
jne 0x588d10
xor edi, edi
mov dword [ebp - 0x624], edi
test esi, esi
je 0x588d26
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
jne 0x588d26
push ecx
mov ecx, esi
call fcn.005a47b0
test edi, edi
je 0x589151
mov esi, dword [0x6af130]
mov ecx, dword [0x6af134]
cmp dword [edi + 0x32], esi
jne 0x588d5c
cmp dword [edi + 0x36], ecx
jne 0x588d5c
mov eax, dword [0x6af138]
cmp dword [edi + 0x3a], eax
jne 0x588d5c
mov eax, dword [0x6af13c]
cmp dword [edi + 0x3e], eax
je 0x589151
mov eax, dword [ebx + 0x10610]
test eax, eax
jne 0x5890f0
cmp dword [ebx + 0x1060c], 8
je 0x58911e
mov edx, dword [ebx + 0x10618]
cmp dword [ebx + 0x10614], esi
jne 0x588dc8
cmp edx, ecx
jne 0x588dc8
mov eax, dword [0x6af138]
cmp dword [ebx + 0x1061c], eax
jne 0x588dc8
mov eax, dword [0x6af13c]
cmp dword [ebx + 0x10620], eax
jne 0x588dc8
mov eax, dword [ebp - 0x628]
mov ecx, eax
push edi
mov dword [ebx + 0x10610], 2
push ebx
mov dword [eax + 0x79], 0xffffffff
call fcn.00589310
jmp 0x589146
mov esi, dword [ebx + 8]
lea edi, [ebp - 0x620]
mov dword [ebx + 0x10610], 1
mov ecx, 0x183
mov dword [ebp - 0x620], 0
mov dword [ebp - 0x61c], 0
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x10614]
movsw word es:[edi], word [esi]
mov edi, dword [ebp - 0x624]
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x602], eax
mov ax, word [edi + 0x1c]
mov dword [ebx + 0x10624], ecx
mov dword [ebx + 0x10628], edx
mov esi, dword [ebx + 0x10620]
mov word [ebp - 0x5fe], ax
mov eax, dword [ebx + 0x1061c]
mov dword [ebx + 0x1062c], eax
mov dword [ebx + 0x10630], esi
cmp ecx, dword [0x6af130]
jne 0x588e60
cmp edx, dword [0x6af134]
jne 0x588e60
cmp eax, dword [0x6af138]
jne 0x588e60
cmp esi, dword [0x6af13c]
je 0x588f10
mov esi, dword [ebp - 0x628]
test byte [esi + 0x106], 3
jne 0x588ebc
movzx eax, word [ebx + 0x105f6]
xor edx, edx
xor eax, dword [ebx + 0x105f8]
div dword [esi + 0xfe]
mov eax, dword [esi + 0x102]
mov ecx, dword [eax + edx*4]
lea eax, [eax + edx*4]
test ecx, ecx
je 0x588ebc
mov edx, dword [ebx + 0x105f6]
nop word [eax + eax]
cmp dword [ecx + 4], edx
jne 0x588eb6
mov ax, word [ecx + 8]
cmp ax, word [ebx + 0x105fa]
je 0x588f88
mov ecx, dword [ecx]
test ecx, ecx
jne 0x588ea0
lea eax, [esi + 0x8a]
lea ecx, [ebx + 0x10624]
push eax
call fcn.005d2980
test al, al
jne 0x588ee8
lea eax, [esi + 0x9a]
lea ecx, [ebx + 0x10624]
push eax
call fcn.005d2a60
test al, al
je 0x588f10
mov dword [ebx + 0x10630], 0
mov dword [ebx + 0x1062c], 0
mov dword [ebx + 0x10628], 0
mov dword [ebx + 0x10624], 0
test byte [0x6ad668], 3
jne 0x588feb
mov eax, dword [ebx + 0x10630]
xor edx, edx
xor eax, dword [ebx + 0x1062c]
xor eax, dword [ebx + 0x10628]
xor eax, dword [ebx + 0x10624]
div dword [0x6ad660]
mov eax, dword [0x6ad664]
mov ecx, dword [eax + edx*4]
lea eax, [eax + edx*4]
test ecx, ecx
je 0x588feb
mov edx, dword [ebx + 0x10624]
mov esi, dword [ebx + 0x10628]
nop dword [eax]
cmp dword [ecx + 4], edx
jne 0x588f80
cmp dword [ecx + 8], esi
jne 0x588f80
mov eax, dword [ecx + 0xc]
cmp eax, dword [ebx + 0x1062c]
jne 0x588f80
mov eax, dword [ecx + 0x10]
cmp eax, dword [ebx + 0x10630]
je 0x588fc3
mov ecx, dword [ecx]
test ecx, ecx
jne 0x588f60
jmp 0x588feb
mov eax, dword [ebx + 0x10624]
mov edx, dword [ecx + 0x12]
mov esi, dword [ecx + 0x16]
cmp eax, dword [ecx + 0xa]
jne 0x588ee8
mov eax, dword [ebx + 0x10628]
cmp eax, dword [ecx + 0xe]
jne 0x588ee8
cmp dword [ebx + 0x1062c], edx
jne 0x588ee8
cmp dword [ebx + 0x10630], esi
jmp 0x588ee6
mov dword [ebx + 0x10624], 0
mov dword [ebx + 0x10628], 0
mov dword [ebx + 0x1062c], 0
mov dword [ebx + 0x10630], 0
mov edx, dword [ebx + 0x10624]
mov ecx, dword [ebx + 0x10628]
cmp edx, dword [0x6af130]
jne 0x589048
cmp ecx, dword [0x6af134]
jne 0x589048
mov eax, dword [ebx + 0x1062c]
cmp eax, dword [0x6af138]
jne 0x589048
mov eax, dword [ebx + 0x10630]
cmp eax, dword [0x6af13c]
jne 0x589048
mov eax, dword [ebp - 0x628]
mov ecx, eax
push edi
mov dword [ebx + 0x10610], 2
push ebx
mov dword [eax + 0x79], 0xffffffff
call fcn.00589310
jmp 0x589146
mov esi, dword [ebp - 0x628]
add esi, 0x3c
push esi
mov dword [esi], edx
lea edx, [edi + 0x32]
mov dword [esi + 4], ecx
mov ecx, dword [ebx + 0x10630]
mov eax, dword [ebx + 0x1062c]
mov dword [esi + 0xc], ecx
lea ecx, [ebp - 0x620]
mov dword [esi + 8], eax
call fcn.004883b0
add esp, 4
test al, al
jne 0x5890c9
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x589089
mov eax, dword [ebx]
mov dword [ecx], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x589095
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
push ecx
mov ecx, ebx
mov dword [ebx + 4], 0
mov dword [ebx], 0
call fcn.00567780
mov ecx, dword [0x6ac16c]
call fcn.005e0810
mov eax, dword [ebp - 0x628]
push dword [eax + 0x75]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x5889d0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x6ac660]
add eax, 0xc8
mov dword [ebx + 0x10634], eax
lea eax, [ebp - 0x620]
push 0
push eax
call fcn.0046f150
jmp 0x589146
cmp eax, 1
jne 0x589119
mov eax, dword [ebx + 0x10624]
sub esp, 0x10
mov ecx, dword [ebx + 0x10628]
mov edx, esp
mov dword [edx], eax
mov dword [edx + 4], ecx
mov eax, dword [ebx + 0x1062c]
mov ecx, dword [ebx + 0x10630]
jmp 0x589133
cmp eax, 2
jne 0x589146
sub esp, 0x10
mov edx, esp
mov dword [edx], esi
mov dword [edx + 4], ecx
mov eax, dword [0x6af138]
mov ecx, dword [0x6af13c]
push edi
mov dword [edx + 0xc], ecx
mov ecx, dword [ebp - 0x628]
push ebx
mov dword [edx + 8], eax
call fcn.005897e0
mov esi, dword [0x6ac16c]
jmp 0x588b72
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x58915c
mov eax, dword [ebx]
mov dword [ecx], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x589168
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
push 0x60e
push dword [ebx + 8]
mov dword [ebx + 4], 0
mov dword [ebx], 0
call fcn.00606a78
mov ecx, dword [ebx + 0x10638]
add esp, 8
test ecx, ecx
je 0x58919f
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x58919f
push ecx
call fcn.005a47b0
mov ecx, dword [ebx + 0x10600]
test ecx, ecx
je 0x5891b9
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x5891b9
push ecx
call fcn.005a47b0
mov ecx, dword [ebx + 0x105fc]
test ecx, ecx
je 0x5891d3
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x5891d3
push ecx
call fcn.005a47b0
push 0x1063c
push ebx
call fcn.00606a78
add esp, 8
mov esi, dword [0x6ac16c]
mov edi, dword [esi + 0xc]
push dword [esi]
dec dword [esi + 4]
dec edi
dec dword [esi + 8]
mov dword [esi + 0xc], edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x58921d
mov eax, dword [ebp - 0x628]
inc dword [esi + 0xc]
inc dword [esi + 8]
inc dword [esi + 4]
push dword [eax + 0x75]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x5889d0
test edi, edi
jne 0x589234
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10
push esi
call fcn.00606a78
add esp, 8
mov eax, dword [ebp - 0x628]
push dword [eax + 0x75]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x5889d0
test edi, edi
jne 0x5889d0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10
push esi
call fcn.00606a78
add esp, 8
jmp 0x5889d0
mov esi, dword [0x6ac16c]
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
jne 0x589288
mov dword [esi + 8], 0
jmp 0x58928c
test eax, eax
jne 0x589295
inc dword [esi + 0xc]
inc dword [esi + 8]
inc dword [esi + 4]
mov ecx, dword [ebp - 0x628]
lea ecx, [ecx + 0x6c]
call fcn.00563ca0
mov esi, dword [0x6ac16c]
mov edi, dword [esi + 0xc]
push dword [esi]
dec dword [esi + 4]
dec edi
dec dword [esi + 8]
mov dword [esi + 0xc], edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x5892cd
inc dword [esi + 0xc]
inc dword [esi + 8]
inc dword [esi + 4]
jmp 0x5892e4
test edi, edi
jne 0x5892e4
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10
push esi
call fcn.00606a78
add esp, 8
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.00606a47
mov esp, ebp
pop ebp
ret