Function at 0x403a40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418f1f
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x4220c0]
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 ebx, ecx
mov dword [ebp - 0x9c], ebx
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 edi, dword [0x4242b4]
mov dword [ebp - 0x8c], 0
test edi, edi
jne 0x403b1b
push 0xc8
call fcn.0040a222
add esp, 4
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x403b0f
mov ecx, eax
call fcn.004012e0
mov edi, eax
jmp 0x403b11
xor edi, edi
mov byte [ebp - 4], 3
mov dword [0x4242b4], edi
lea eax, [ebp - 0x70]
push eax
mov ecx, edi
call fcn.004021b0
lea eax, [edi + 0x68]
lea ecx, [ebp - 0x88]
cmp ecx, eax
je 0x403b3d
push 0xffffffffffffffff
push 0
push eax
call fcn.004029b0
lea eax, [edi + 0x20]
lea ecx, [ebp - 0x40]
cmp ecx, eax
je 0x403b51
push 0xffffffffffffffff
push 0
push eax
call fcn.004029b0
lea eax, [edi + 0x38]
lea ecx, [ebp - 0x58]
cmp ecx, eax
je 0x403b65
push 0xffffffffffffffff
push 0
push eax
call fcn.004029b0
lea eax, [ebx + 0x24]
push eax
mov dword [ebp - 0xa8], eax
call dword [0x41a050]
lea eax, [ebx + 0x18]
lea ecx, [ebx + 0x1c]
mov dword [ebp - 0x90], eax
mov eax, dword [eax]
mov dword [ebp - 0x98], ecx
mov ecx, dword [ecx]
cmp eax, ecx
je 0x403bb4
xor ebx, ebx
mov esi, dword [eax + 0x28]
mov edx, dword [eax + 0x10]
add ebx, 2
lea edx, [edx + esi*2]
add edx, esi
add eax, 0x30
add ebx, edx
cmp eax, ecx
jne 0x403b91
mov dword [ebp - 0x8c], ebx
mov ebx, dword [ebp - 0x9c]
mov eax, dword [ebp - 0x8c]
add eax, 0x4c
push eax
mov dword [ebp - 0x9c], eax
call fcn.00408a76
mov cx, word [edi + 4]
mov esi, eax
add esp, 4
mov word [esi], cx
cmp dword [ebp - 0x5c], 0x10
lea ecx, [ebp - 0x70]
cmovae ecx, dword [ebp - 0x70]
push 0x10
push ecx
lea eax, [esi + 2]
push eax
mov dword [ebp - 0xa4], esi
call fcn.00409660
add esp, 0xc
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push 8
lea ecx, [esi + 0x12]
push eax
push ecx
call fcn.00409660
add esp, 0xc
call fcn.00409acc
mov byte [esi + 0x1a], al
call fcn.00409acc
mov byte [esi + 0x1b], al
cmp dword [ebp - 0x44], 0x10
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push 0x20
push eax
lea eax, [esi + 0x24]
push eax
call fcn.00409660
add esp, 0xc
cmp dword [ebx + 0x14], 0x10
jb 0x403c41
mov ebx, dword [ebx]
push 8
push ebx
mov ebx, dword [ebp - 0xa4]
lea eax, [ebx + 0x1c]
push eax
call fcn.00409660
mov eax, dword [ebp - 0x8c]
lea edi, [ebx + 0x48]
add eax, 0x7b
add esp, 0xc
mov dword [ebx + 0x44], eax
mov dword [edi], 0xab12de34
mov esi, ebx
cmp ebx, edi
jae 0x403cac
mov dword [ebp - 0x94], 0x1b
jmp 0x403c80
mov bl, byte [esi]
movzx eax, bl
mov ecx, eax
and ecx, 0x80000003
jns 0x403c94
dec ecx
or ecx, 0xfffffffc
inc ecx
cdq
idiv dword [ebp - 0x94]
inc esi
add dl, bl
mov ebx, dword [ebp - 0xa4]
add byte [ecx + ebx + 0x48], dl
cmp esi, edi
jb 0x403c80
mov esi, dword [ebp - 0x90]
mov eax, dword [ebp - 0x98]
mov esi, dword [esi]
lea edi, [ebx + 0x4c]
mov dword [ebp - 0x94], esi
cmp esi, dword [eax]
je 0x403d6e
jmp 0x403cd0
cmp dword [esi + 0x14], 0x10
jb 0x403cda
mov ecx, dword [esi]
jmp 0x403cdc
mov ecx, esi
mov edx, edi
mov edi, edi
mov al, byte [ecx]
mov byte [edx], al
lea ecx, [ecx + 1]
lea edx, [edx + 1]
test al, al
jne 0x403ce0
add edi, dword [esi + 0x10]
inc edi
mov byte [edi - 1], 0x3d
cmp dword [esi + 0x2c], 0x10
mov ecx, dword [esi + 0x28]
mov dword [ebp - 0xac], ecx
jb 0x403d0a
mov eax, dword [esi + 0x18]
jmp 0x403d0d
lea eax, [esi + 0x18]
xor ebx, ebx
mov dword [ebp - 0x90], eax
test ecx, ecx
je 0x403d4d
mov esi, edi
jmp 0x403d20
movzx eax, byte [eax + ebx]
push eax
push 0x41f770
push esi
call fcn.00408a8e
add edi, eax
mov eax, dword [ebp - 0x90]
inc ebx
add esp, 0xc
add esi, 3
cmp ebx, dword [ebp - 0xac]
jb 0x403d20
mov esi, dword [ebp - 0x94]
mov eax, dword [ebp - 0x98]
mov byte [edi], 0x26
add esi, 0x30
inc edi
mov dword [ebp - 0x94], esi
cmp esi, dword [eax]
jne 0x403cd0
mov ebx, dword [ebp - 0xa4]
push dword [ebp - 0xa8]
call dword [0x41a04c]
movq xmm0, qword [ebx + 0x12]
mov ax, word [ebx + 0x22]
mov ecx, dword [ebp - 0x9c]
movq qword [ebp - 0x28], xmm0
movq xmm0, qword [ebx + 0x1a]
mov word [ebp - 0x18], ax
xor eax, eax
movq qword [ebp - 0x20], xmm0
test ecx, ecx
je 0x403dab
xor byte [eax + ebx], 0xaa
inc eax
cmp eax, ecx
jb 0x403da2
mov edi, dword [ebp - 0x8c]
xor esi, esi
test edi, edi
je 0x403de0
jmp 0x403dc0
mov eax, 0x38e38e39
mul esi
shr edx, 2
mov eax, esi
lea ecx, [edx + edx*8]
add ecx, ecx
sub eax, ecx
inc esi
mov al, byte [eax + ebx + 0x12]
xor byte [esi + ebx + 0x4b], al
cmp esi, edi
jb 0x403dc0
mov edi, dword [0x4242bc]
test edi, edi
jne 0x403e19
push 0x34
call fcn.0040a222
add esp, 4
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x403e0d
mov ecx, eax
call fcn.00406a40
mov edi, eax
jmp 0x403e0f
xor edi, edi
mov byte [ebp - 4], 3
mov dword [0x4242bc], edi
lea eax, [edi + 0x1c]
push eax
mov dword [ebp - 0x8c], eax
call dword [0x41a050]
mov esi, dword [edi]
cmp esi, dword [edi + 4]
je 0x403eea
jmp 0x403e40
xor ebx, ebx
mov dword [ebp - 0x98], ebx
cmp dword [ebp - 0xa0], ebx
je 0x403e62
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 0x403e78
mov edx, dword [esi + 0x18]
jmp 0x403e7b
lea edx, [esi + 0x18]
cmp dword [esi + 0x14], 0x10
jb 0x403e85
mov ecx, dword [esi]
jmp 0x403e87
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.00404020
add esp, 0x18
cmp eax, dword [edi + 0xc]
je 0x403fa2
cmp dword [ebp - 0xa0], 0
je 0x403ed3
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x403ed3
cmp dword [ebp - 0x90], 0
je 0x403ed3
push eax
call fcn.0040a358
add esp, 4
push 0x3e8
call dword [0x41a014]
add esi, 0x30
cmp esi, dword [edi + 4]
jne 0x403e40
push ebx
call fcn.0040a358
mov eax, dword [0x41a04c]
add esp, 4
push dword [ebp - 0x8c]
call eax
xor bl, bl
cmp dword [ebp - 0x74], 0x10
jb 0x403f16
push dword [ebp - 0x88]
call fcn.00409b29
add esp, 4
cmp dword [ebp - 0x44], 0x10
mov dword [ebp - 0x74], 0xf
mov dword [ebp - 0x78], 0
mov byte [ebp - 0x88], 0
jb 0x403f3c
push dword [ebp - 0x58]
call fcn.00409b29
add esp, 4
cmp dword [ebp - 0x2c], 0x10
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
jb 0x403f5f
push dword [ebp - 0x40]
call fcn.00409b29
add esp, 4
cmp dword [ebp - 0x5c], 0x10
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jb 0x403f82
push dword [ebp - 0x70]
call fcn.00409b29
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.00408a7f
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x403ffe
mov edi, dword [ebp - 0x94]
test edi, edi
je 0x403ffe
mov ebx, dword [ebp - 0x90]
test ebx, ebx
je 0x403ffe
xor esi, esi
test ebx, ebx
je 0x403fec
mov eax, 0x38e38e39
mul esi
shr edx, 2
mov eax, esi
lea ecx, [edx + edx*8]
add ecx, ecx
sub eax, ecx
inc esi
mov al, byte [ebp + eax - 0x28]
xor byte [esi + edi - 1], al
cmp esi, ebx
jb 0x403fc6
mov eax, dword [ebp - 0xa0]
push ebx
push edi
mov ecx, eax
call fcn.00402c00
push edi
call fcn.0040a358
add esp, 4
push dword [ebp - 0x8c]
mov eax, dword [0x41a04c]
call eax
mov bl, 1
jmp 0x403f02