Function at 0x402970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x432243
push eax
mov eax, 0x13a0
mov dword fs:[0], esp
call 0x414f00
mov eax, dword fs:[0x2c]
mov ecx, dword [0x4bee30]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x444124]
cmp eax, dword [ecx + 4]
jg 0x402bcc
push esi
mov dword [ebp - 0x10], 0x444104
call dword [0x43400c]
mov esi, eax
cmp esi, dword [0x444104]
je 0x4029e5
mov edx, esi
mov ecx, 0x444104
xor eax, eax
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x4029e5
pause
push esi
call 0x40a920
jmp 0x4029ec
lock inc dword [0x444108]
push ebx
push edi
mov dword [ebp - 4], 2
mov ebx, dword [ebp + 8]
cmp ebx, 2
je 0x402a02
cmp ebx, 3
jne 0x402a07
call 0x40b7b0
xor edi, edi
cmp ebx, 2
jne 0x402a89
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x402a89
mov cl, byte [edx]
mov eax, edx
test cl, cl
je 0x402a56
lea ecx, [ecx]
cmp cl, 0x2f
je 0x402a2a
cmp cl, 0x5c
jne 0x402a49
cmp byte [eax + 1], 0x73
jne 0x402a49
cmp byte [eax + 2], 0x72
jne 0x402a49
cmp byte [eax + 3], 0x63
jne 0x402a49
mov cl, byte [eax + 4]
cmp cl, 0x2f
je 0x402a53
cmp cl, 0x5c
je 0x402a53
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402a20
jmp 0x402a56
lea edx, [eax + 1]
push dword [ebp + 0x10]
lea eax, [ebp - 0x13ac]
push edx
push 0x4344d0
push 0x139b
push eax
call fcn.00402c70
mov edi, eax
add esp, 0x14
cmp edi, 0x139a
jbe 0x402a84
mov edi, 0x139a
jmp 0x402a89
cmp edi, 0xffffffff
je 0x402aca
push dword [ebp + 0x18]
mov esi, 0x139b
lea eax, [ebp - 0x13ac]
push 0
push dword [ebp + 0x14]
sub esi, edi
add eax, edi
push esi
push eax
call fcn.00401800
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 2
push ecx
call fcn.0041aaf2
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
dec esi
cmp eax, esi
cmovle esi, eax
cmp esi, ecx
jne 0x402ad4
mov esi, 2
jmp 0x402b9d
add edi, esi
cmp ebx, 2
je 0x402ae0
cmp ebx, 3
jne 0x402b4b
push 1
call fcn.004208e1
push eax
call 0x418b36
push 2
call fcn.004208e1
push eax
push edi
lea eax, [ebp - 0x13ac]
push 1
push eax
call fcn.00420cb7
push 2
call fcn.004208e1
push eax
push 0xa
call int.0042098e
push 2
call fcn.004208e1
push eax
call 0x418b36
add esp, 0x30
cmp ebx, 2
jne 0x402b4b
lea eax, [ebp - 0x13ac]
add eax, edi
push 0x4344dc
push eax
call fcn.00402cb0
add esp, 8
lea eax, [ebp - 0x13ac]
push eax
call dword [0x434008]
lea eax, [ebp - 0x13ac]
push eax
push ebx
call dword [0x443004]
add esp, 8
mov esi, eax
sub eax, 0
je 0x402b8d
sub eax, 2
jne 0x402b9d
push 0x4344e0
push 1
push 0x4344c8
call fcn.00402920
add esp, 0xc
push 1
call dword [0x434014]
push eax
call dword [0x434018]
jmp 0x402b9d
cmp ebx, 2
je 0x402b9d
call dword [0x434010]
test eax, eax
je 0x402b9d
int3
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 4
lock dec dword [ecx]
cmp dword [ecx], 0
pop edi
pop ebx
jne 0x402bbb
mov ecx, dword [ebp - 0x10]
xor edx, edx
xchg dword [ecx], edx
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0x444124
call 0x414e24
add esp, 4
cmp dword [0x444124], 0xffffffff
jne 0x4029b2
mov dword [ebp - 4], 0
mov ecx, 0x44410c
mov dword [0x444104], 0
inc esp
add bh, al
add eax, 0x444104
add byte [eax], al
add byte [eax], al
mov dword [0x83654108], 0x79ecba87
scasb al, byte es:[edi]
mov ecx, esi
cmp dh, ch
outsb dx, byte [esi]
sub al, 0xf5
pop ebp
aas
push esi
xchg dword [edx], edx
xor bl, dh
movsb byte es:[edi], byte [esi]
mov ebp, gs
push esp
pop es
sbb esi, dword [ebx - 0x3110aa3f]
jno 0x402bf0
jbe 0x402c23
aam 0x96
ja 0x6e145fcc
in al, 0x8d
ret 0xb7e8