Function at 0x402af0
Capabilities:
Encode data using xor
Manipulate console buffer

Disassembly:
push edi
push ebx
push ebp
sub esp, 0x2c
mov ebx, ecx
push 0x459268
mov edi, edx
mov ebp, eax
call fcn.00404a40
mov edx, dword [0x4df920]
add esp, 4
xor edx, dword [0x4df924]
cmp dword [0x4df92c], 0
jne 0x402dc1
cmp ebp, edi
jae 0x402dc1
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
mov esi, ebp
shl esi, 0x10
mov eax, ebp
and eax, 0xff
or esi, 0xc000
test eax, eax
jne 0x402b97
push 0xffffffffffffffff
mov ebx, dword [0x4df938]
push dword [0x4df930]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, ebp
shr eax, 8
mov word [esp], ax
mov word [esp + 2], bx
push dword [esp]
push dword [0x4df934]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
push 0x2a
call fcn.00439f98
add esp, 4
push dword [0x4df930]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [esp + 0x1c], esi
xor ebx, ebx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], edi
mov esi, dword [esp + 0x14]
cmp dword [0x4df92c], 0
jne 0x402dc8
mov ebp, ebx
mov eax, ebx
or ebp, dword [esp + 0x1c]
and eax, 1
mov edx, ebp
mov ecx, 0x1f
or edx, 0x40000000
test eax, eax
cmovne ebp, edx
xor edx, edx
mov eax, 0x80000000
shr eax, cl
and eax, 1
xor edx, eax
mov eax, ebp
rol edx, 0x1f
mov edi, edx
xor eax, edx
and edi, 0x80000000
cmovne edx, eax
dec ecx
jge 0x402bd5
mov dword [esp + 0x14], esi
xor edi, edi
mov ecx, 0x1f
mov esi, 0x8000
mov eax, edx
shr esi, cl
and eax, 1
and esi, 1
xor edx, esi
mov esi, ebp
shl eax, cl
rol edx, 0x1f
or edi, eax
mov eax, edx
xor esi, edx
and eax, 0x80000000
cmovne edx, esi
dec ecx
jge 0x402c01
mov ecx, 0x1f
mov dword [esp + 0x20], ebx
lea eax, [edi - 0x80000000]
mov ebx, eax
shr ebx, cl
and ebx, 1
xor edx, ebx
mov ebx, ebp
rol edx, 0x1f
mov esi, edx
xor ebx, edx
and esi, 0x80000000
cmovne edx, ebx
dec ecx
jge 0x402c39
shr eax, 0x10
mov ecx, 0x1f
shl edi, 0x10
or eax, edi
xor edi, edi
mov esi, eax
mov ebx, edx
shr esi, cl
and ebx, 1
and esi, 1
xor edx, esi
mov esi, ebp
shl ebx, cl
rol edx, 0x1f
or edi, ebx
mov ebx, edx
xor esi, edx
and ebx, 0x80000000
cmovne edx, esi
dec ecx
jge 0x402c66
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
cmp edi, dword [esp + 0x18]
jne 0x402d9b
push 0x4ec8e0
push esi
push 0x4592a0
call fcn.00404ff0
push 0x4ec8e0
push esi
push 0x4592d8
call fcn.00405200
add esp, 0x18
mov edx, dword [0x4df924]
xor eax, eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], esi
mov ebx, eax
mov ecx, 0x1f
shl ebx, 0x10
or ebx, eax
or ebx, 0xc000
rol ebx, 0x1f
mov edi, ebp
mov esi, ebx
xor edi, ebx
and esi, 0x80000000
cmovne ebx, edi
dec ecx
jge 0x402ce4
mov dword [esp + 0x24], edx
xor esi, esi
mov ecx, 0x1f
mov edx, ebx
rol ebx, 0x1f
and edx, 1
shl edx, cl
mov edi, ebx
or esi, edx
and edi, 0x80000000
mov edx, ebp
xor edx, ebx
test edi, edi
cmovne ebx, edx
dec ecx
jge 0x402d04
mov ecx, 0x1f
mov edx, esi
shr edx, cl
and edx, 1
xor ebx, edx
mov edx, ebp
rol ebx, 0x1f
mov edi, ebx
xor edx, ebx
and edi, 0x80000000
cmovne ebx, edx
dec ecx
jge 0x402d29
xor edi, edi
rol esi, 0x10
mov ecx, 0x1f
mov dword [esp + 0x28], eax
mov edx, esi
mov eax, ebx
shr edx, cl
and eax, 1
and edx, 1
xor ebx, edx
mov edx, ebp
shl eax, cl
rol ebx, 0x1f
or edi, eax
mov eax, ebx
xor edx, ebx
and eax, 0x80000000
cmovne ebx, edx
dec ecx
jge 0x402d55
mov edx, dword [esp + 0x24]
cmp edi, edx
mov eax, dword [esp + 0x28]
je 0x402dd3
inc eax
cmp eax, 0xffff
jbe 0x402cd2
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
inc ebx
cmp ebx, 0x3fff
jb 0x402ba9
mov ebp, dword [esp + 0xc]
inc ebp
mov edi, dword [esp + 0x10]
cmp ebp, edi
mov dword [esp + 0x14], esi
jb 0x402b3a
mov esi, dword [esp + 8]
add esp, 0x2c
pop ebp
pop ebx
pop edi
ret
mov esi, dword [esp + 8]
add esp, 0x2c
pop ebp
pop ebx
pop edi
ret
mov edx, dword [esp + 0x48]
and ebp, 0x3fff3fff
mov ebx, dword [esp + 4]
or ebp, 0x80000000
mov esi, dword [esp + 8]
mov dword [0x4df92c], 1
mov dword [ebx], ebp
mov dword [edx], eax
add esp, 0x2c
pop ebp
pop ebx
pop edi
ret