Function at 0x404020
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41be3f
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x425008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x9c], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
mov dword [ebp - 0x74], 0xf
mov dword [ebp - 0x78], 0
mov byte [ebp - 0x88], 0
mov byte [ebp - 4], 3
mov esi, dword [0x428d1c]
mov dword [ebp - 0x8c], 0
test esi, esi
jne 0x4040fb
push 0xc8
call fcn.0040aff1
add esp, 4
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x4040ef
mov ecx, eax
call fcn.00401420
mov esi, eax
jmp 0x4040f1
xor esi, esi
mov byte [ebp - 4], 3
mov dword [0x428d1c], esi
lea eax, [ebp - 0x70]
mov ecx, esi
push eax
call fcn.00402410
lea eax, [esi + 0x68]
lea ecx, [ebp - 0x88]
cmp ecx, eax
je 0x40411d
push 0xffffffffffffffff
push 0
push eax
call fcn.00402e40
lea eax, [esi + 0x20]
lea ecx, [ebp - 0x40]
cmp ecx, eax
je 0x404131
push 0xffffffffffffffff
push 0
push eax
call fcn.00402e40
lea eax, [esi + 0x38]
lea ecx, [ebp - 0x58]
cmp ecx, eax
je 0x404145
push 0xffffffffffffffff
push 0
push eax
call fcn.00402e40
lea eax, [edi + 0x24]
push eax
mov dword [ebp - 0xa8], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x18]
lea ecx, [edi + 0x18]
lea edx, [edi + 0x1c]
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0x98], edx
cmp eax, dword [edx]
je 0x404196
mov ebx, dword [ecx + 4]
xor edi, edi
mov edx, dword [eax + 0x28]
add edi, 2
mov ecx, dword [eax + 0x10]
add eax, 0x30
lea ecx, [ecx + edx*2]
add ecx, edx
add edi, ecx
cmp eax, ebx
jne 0x404173
mov dword [ebp - 0x8c], edi
mov edi, dword [ebp - 0x9c]
mov eax, dword [ebp - 0x8c]
add eax, 0x4c
push eax
mov dword [ebp - 0x9c], eax
call fcn.0040925b
mov cx, word [esi + 4]
mov ebx, eax
add esp, 4
mov dword [ebp - 0xa4], ebx
mov word [ebx], cx
lea eax, [ebx + 2]
cmp dword [ebp - 0x5c], 0x10
lea ecx, [ebp - 0x70]
push 0x10
cmovae ecx, dword [ebp - 0x70]
push ecx
push eax
call fcn.00409f10
add esp, 0xc
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebx + 0x12]
cmovae eax, dword [ebp - 0x40]
push 8
push eax
push ecx
call fcn.00409f10
add esp, 0xc
call fcn.0040a37e
mov byte [ebx + 0x1a], al
call fcn.0040a37e
mov byte [ebx + 0x1b], al
lea eax, [ebp - 0x58]
cmp dword [ebp - 0x44], 0x10
push 0x20
cmovae eax, dword [ebp - 0x58]
push eax
lea eax, [ebx + 0x24]
push eax
call fcn.00409f10
add esp, 0xc
cmp dword [edi + 0x14], 0x10
jb 0x404223
mov edi, dword [edi]
push 8
lea eax, [ebx + 0x1c]
push edi
push eax
call fcn.00409f10
mov eax, dword [ebp - 0x8c]
lea edi, [ebx + 0x48]
add eax, 0x7b
mov dword [edi], 0xab12de34
add esp, 0xc
mov dword [ebx + 0x44], eax
mov esi, ebx
cmp ebx, edi
jae 0x404283
mov dword [ebp - 0x94], 0x1b
mov bl, byte [esi]
movzx eax, bl
mov ecx, eax
and ecx, 0x80000003
jns 0x40426b
dec ecx
or ecx, 0xfffffffc
inc ecx
cdq
inc esi
idiv dword [ebp - 0x94]
add dl, bl
mov ebx, dword [ebp - 0xa4]
add byte [ecx + ebx + 0x48], dl
cmp esi, edi
jb 0x404257
mov esi, dword [ebp - 0x90]
lea edi, [ebx + 0x4c]
mov eax, dword [ebp - 0x98]
mov esi, dword [esi]
mov dword [ebp - 0x94], esi
cmp esi, dword [eax]
je 0x40433e
cmp dword [esi + 0x14], 0x10
jb 0x4042ac
mov ecx, dword [esi]
jmp 0x4042ae
mov ecx, esi
mov edx, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x4042b0
add edi, dword [esi + 0x10]
mov byte [edi], 0x3d
inc edi
cmp dword [esi + 0x2c], 0x10
mov ecx, dword [esi + 0x28]
mov dword [ebp - 0xac], ecx
jb 0x4042d9
mov eax, dword [esi + 0x18]
jmp 0x4042dc
lea eax, [esi + 0x18]
xor ebx, ebx
mov dword [ebp - 0x90], eax
test ecx, ecx
je 0x40431d
mov esi, edi
lea ebx, [ebx]
movzx eax, byte [eax + ebx]
push eax
push str.___02x
push esi
call fcn.00409273
add edi, eax
inc ebx
mov eax, dword [ebp - 0x90]
add esp, 0xc
add esi, 3
cmp ebx, dword [ebp - 0xac]
jb 0x4042f0
mov esi, dword [ebp - 0x94]
mov eax, dword [ebp - 0x98]
add esi, 0x30
mov byte [edi], 0x26
inc edi
mov dword [ebp - 0x94], esi
cmp esi, dword [eax]
jne 0x4042a2
mov ebx, dword [ebp - 0xa4]
push dword [ebp - 0xa8]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ax, word [ebx + 0x22]
movdqu xmm0, xmmword [ebx + 0x12]
mov ecx, dword [ebp - 0x9c]
mov word [ebp - 0x18], ax
xor eax, eax
movdqu xmmword [ebp - 0x28], xmm0
test ecx, ecx
je 0x404371
xor byte [eax + ebx], 0xaa
inc eax
cmp eax, ecx
jb 0x404368
mov edi, dword [ebp - 0x8c]
xor esi, esi
test edi, edi
je 0x4043a0
lea ecx, [ecx]
mov eax, 0x38e38e39
mul esi
mov eax, esi
shr edx, 2
lea ecx, [edx + edx*8]
add ecx, ecx
sub eax, ecx
mov al, byte [eax + ebx + 0x12]
xor byte [esi + ebx + 0x4c], al
inc esi
cmp esi, edi
jb 0x404380
mov edi, dword [0x428d24]
test edi, edi
jne 0x4043d9
push 0x34
call fcn.0040aff1
add esp, 4
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x4043cd
mov ecx, eax
call fcn.004072e0
mov edi, eax
jmp 0x4043cf
xor edi, edi
mov byte [ebp - 4], 3
mov dword [0x428d24], edi
lea eax, [edi + 0x1c]
push eax
mov dword [ebp - 0x8c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi]
cmp esi, dword [edi + 4]
je 0x4044aa
jmp 0x404400
xor ebx, ebx
mov dword [ebp - 0x98], ebx
cmp dword [ebp - 0xa0], ebx
je 0x404422
lea eax, [ebp - 0x90]
lea ebx, [ebp - 0x94]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x5c], 0x10
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
cmp dword [esi + 0x2c], 0x10
jb 0x404438
mov edx, dword [esi + 0x18]
jmp 0x40443b
lea edx, [esi + 0x18]
cmp dword [esi + 0x14], 0x10
jb 0x404445
mov ecx, dword [esi]
jmp 0x404447
mov ecx, esi
push dword [ebp - 0x98]
push ebx
push dword [ebp - 0x9c]
mov ebx, dword [ebp - 0xa4]
push ebx
push eax
push ecx
call fcn.004045e0
add esp, 0x18
cmp eax, dword [edi + 0xc]
je 0x404562
cmp dword [ebp - 0xa0], 0
je 0x404493
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x404493
cmp dword [ebp - 0x90], 0
je 0x404493
push eax
call fcn.0040b163
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 0x30
cmp esi, dword [edi + 4]
jne 0x404400
push ebx
call fcn.0040b163
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add esp, 4
push dword [ebp - 0x8c]
call eax
xor bl, bl
cmp dword [ebp - 0x74], 0x10
jb 0x4044d6
push dword [ebp - 0x88]
call fcn.0040a3d1
add esp, 4
cmp dword [ebp - 0x44], 0x10
mov dword [ebp - 0x74], 0xf
mov dword [ebp - 0x78], 0
mov byte [ebp - 0x88], 0
jb 0x4044fc
push dword [ebp - 0x58]
call fcn.0040a3d1
add esp, 4
cmp dword [ebp - 0x2c], 0x10
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
jb 0x40451f
push dword [ebp - 0x40]
call fcn.0040a3d1
add esp, 4
cmp dword [ebp - 0x5c], 0x10
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jb 0x404542
push dword [ebp - 0x70]
call fcn.0040a3d1
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00409264
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x4045bd
mov edi, dword [ebp - 0x94]
test edi, edi
je 0x4045bd
mov ebx, dword [ebp - 0x90]
test ebx, ebx
je 0x4045bd
xor esi, esi
test ebx, ebx
je 0x4045ab
mov eax, 0x38e38e39
mul esi
mov eax, esi
shr edx, 2
lea ecx, [edx + edx*8]
add ecx, ecx
sub eax, ecx
mov al, byte [ebp + eax - 0x28]
xor byte [esi + edi], al
inc esi
cmp esi, ebx
jb 0x404586
mov eax, dword [ebp - 0xa0]
push ebx
push edi
mov ecx, eax
call fcn.00403090
push edi
call fcn.0040b163
add esp, 4
push dword [ebp - 0x8c]
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call eax
mov bl, 1
jmp 0x4044c2