Function at 0x40d260
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x20]
push esi
push edi
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 1
push eax
mov esi, ecx
mov dword [ebp - 0x20], 0
push ebx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 1
call fcn.0040ec40
test eax, eax
js 0x4517b3
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 8], edx
cmp ecx, 9
jne 0x40d314
test dl, dl
jne 0x40d327
xor al, al
mov byte [ebp - 1], al
mov byte [ebp - 3], al
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x451939
cmp ecx, 9
jne 0x40d6c9
mov edx, dword [ebx + 4]
mov edi, dword [ebp - 0x10]
mov eax, dword [edx + edi*4]
cmp word [eax + 8], 0
jne 0x451bd0
cmp dword [eax], 5
jne 0x451bd0
mov eax, dword [edx + edi*4 + 4]
inc edi
movzx eax, word [eax + 8]
mov ebx, eax
cmp ax, 0x7f
je 0x40d547
cmp byte [ebp - 1], 0
jne 0x40d32b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ecx - 1]
cmp eax, 0xa
ja case.0x40d31c.5
jmp dword [eax*4 + 0x40d730]
test edx, edx
je case.0x40d31c.5
mov al, 1
jmp 0x40d2b9
xor ecx, ecx
mov dword [ebp - 0x20], 0x49cc4c
xor esi, esi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], esi
cmp bx, 0x7f
je 0x40d3c3
lea esp, [esp]
mov ebx, dword [edx + edi*4]
lea eax, [edi]
lea edi, [eax + 1]
cmp ecx, esi
je 0x40d4b8
push 0xc
call fcn.0041fddb
movzx ecx, word [ebx + 8]
mov esi, eax
mov eax, ecx
add esp, 4
mov word [esi + 8], cx
mov cx, word [ebx + 0xa]
mov word [esi + 0xa], cx
cmp ax, 0x3f
jle 0x40d485
cmp ax, 0x10
je 0x4519f7
cmp ax, 0x20
je 0x451a06
mov eax, dword [ebx]
mov dword [esi], eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [eax + ecx*4], esi
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x18], ecx
mov edx, dword [eax + 4]
mov eax, dword [edx + edi*4]
cmp word [eax + 8], 0x7f
jne 0x40d350
mov edi, dword [edx + edi*4]
cmp ecx, esi
je 0x451a0f
push 0xc
call fcn.0041fddb
movzx ecx, word [edi + 8]
mov esi, eax
mov edx, ecx
add esp, 4
mov word [esi + 8], cx
mov cx, word [edi + 0xa]
mov word [esi + 0xa], cx
cmp dx, 0x3f
jle 0x451a69
cmp dx, 0x10
je 0x451a9c
cmp dx, 0x20
je 0x451aab
mov eax, dword [edi]
mov dword [esi], eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
push dword [ebp + 0xc]
mov dword [eax + ecx*4], esi
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
inc dword [ebp - 0x18]
push eax
call int.0040bec0
xor esi, esi
mov dword [ebp - 0x20], 0x49cc4c
cmp dword [ebp - 0x18], esi
jbe 0x40d46a
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x40d45d
movzx eax, word [edi + 8]
cmp ax, 0x3f
jle 0x40d512
push 0xc
push edi
call fcn.0041fdcd
mov eax, dword [ebp - 0x1c]
add esp, 8
mov dword [eax + esi*4], 0
inc esi
cmp esi, dword [ebp - 0x18]
jb 0x40d437
push dword [ebp - 0x1c]
mov dword [ebp - 0x18], 0
call fcn.0041fe14
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp ax, 0x30
jl 0x40d388
push 0x10
call fcn.0041fddb
mov edx, dword [ebx]
add esp, 4
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov ecx, dword [edx + 0xc]
mov dword [eax + 0xc], ecx
inc dword [ecx]
jmp 0x40d39e
lea eax, [esi + esi]
cmp eax, 8
jae 0x40d4c5
mov eax, 8
xor ecx, ecx
mov dword [ebp - 0x14], eax
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041fe0b
mov esi, eax
add esp, 4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40d50a
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x40d50a
shl ecx, 2
push ecx
push eax
push esi
call fcn.00420e20
add esp, 0xc
push dword [ebp - 0x1c]
call fcn.0041fe14
add esp, 4
mov dword [ebp - 0x1c], esi
jmp 0x40d360
cmp ax, 0x30
jl 0x40d44f
mov ebx, dword [edi]
test ebx, ebx
je 0x40d44f
mov eax, dword [ebx + 0xc]
dec dword [eax]
mov eax, dword [ebx + 0xc]
cmp dword [eax], 0
je 0x451ab4
push 0x10
push ebx
call fcn.0041fdcd
add esp, 8
jmp 0x40d44f
mov edi, dword [ebp + 0xc]
xor ebx, ebx
mov cl, byte [ebp - 1]
xor ch, ch
xor dl, dl
mov dword [ebp - 8], ebx
mov dword [ebp - 0x50], ebx
mov eax, dword [edi]
mov byte [ebp - 2], ch
mov byte [ebp + 0xb], dl
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x38], 0
lea ebx, [eax - 1]
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x4c], ebx
test cl, cl
jne 0x40d6c1
xor eax, eax
mov dword [ebp + 0xc], eax
mov esi, dword [edi]
lea ebx, [esi + 1]
mov dword [edi], ebx
cmp esi, dword [0x4d23a0]
jg 0x40d5ff
test esi, esi
jle 0x40d5ff
shl esi, 4
add esi, dword [0x4d23dc]
je 0x40d5ff
test dl, dl
jne 0x40d5ff
mov edx, dword [esi + 4]
mov eax, dword [edx]
cmp word [eax + 8], 0
je 0x40d5d1
mov dl, byte [ebp + 0xb]
jmp 0x40d59e
mov eax, dword [eax]
cmp eax, 8
jne 0x40d68c
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x451b54
lea eax, [ebx - 1]
mov dl, 1
mov byte [ebp + 0xb], dl
mov dword [ebp - 0x48], eax
test cl, cl
jne 0x40d59e
test ch, ch
jne 0x40d59e
mov dword [ebp - 8], eax
jmp 0x40d59e
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov dword [edi], eax
cmp byte [ebx + 0x16d], 0
jne 0x451bb5
push 0x38
call fcn.0041fddb
mov ecx, dword [ebp - 0x44]
mov esi, eax
mov eax, dword [ebp - 0x4c]
add esp, 4
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esi + 8], eax
lea eax, [ebp - 0x40]
mov dword [esi + 0xc], ecx
lea ecx, [esi + 0x10]
mov dword [esi], 0
push eax
mov dword [ecx + 8], 0
call fcn.004100e0
lea eax, [ebp - 0x30]
mov dword [esi + 0x28], 0
lea ecx, [esi + 0x20]
push eax
call fcn.004100e0
mov eax, dword [ebx + 0x168]
mov dword [esi + 0x30], eax
mov dword [ebx + 0x168], esi
inc dword [ebx + 0x164]
lea ecx, [ebp - 0x30]
call fcn.0040cfa0
lea ecx, [ebp - 0x40]
call fcn.0040cfa0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
sub eax, 4
je 0x40d6e8
mov dl, byte [ebp + 0xb]
sub eax, 2
jne 0x40d6da
cmp dword [ebp + 0xc], 0
jne 0x40d59e
cmp ch, 1
je 0x451ba4
mov ch, 1
mov byte [ebp - 2], ch
test cl, cl
jne 0x40d59e
mov dword [ebp - 8], ebx
jmp 0x40d59e
mov dword [ebp - 8], eax
jmp 0x40d599
add ecx, 0xfffffffb
cmp ecx, 0xa
ja 0x40d2d3
jmp 0x451956
sub eax, 1
jne 0x40d59e
jmp 0x451ad0
mov esi, dword [esi + 8]
mov ebx, 1
cmp esi, ebx
jbe 0x40d5cc
jmp 0x40d700
mov eax, dword [edx + ebx*4]
cmp word [eax + 8], 0
je 0x40d717
inc ebx
cmp ebx, esi
jb 0x40d700
mov dl, byte [ebp + 0xb]
jmp 0x40d59e
cmp dword [eax], 5
jne 0x40d70a
mov eax, dword [edx + ebx*4 + 4]
cmp word [eax + 8], 0x7f
jne 0x40d70a
inc dword [ebp + 0xc]
jmp 0x40d5cc
rol dword [eax], 1
jmp 0xb0455ccf
pop esp
add bh, ch
jmp [edx + 8]
call 0xbb4bfe34
xor byte [ecx], al
jns 0x45187f
fcom dword [eax + 0x53]
push ebx
call 0x8625ea60
test byte [edi], 0x84
int 0xba
push 0x48
push 0x4e
or al, ch
dec ecx
or byte [ecx], 0x6a
adc byte [esi - 0x18], dl
jg 0x451898
push es
mov ebx, 0xe9790130
mov ch, 0x50
push ebx
call 0x8625ea83
test byte [edi], 0x84
stosb byte es:[edi], al
mov edx, 0xce244c8b
call 0x1141ce7e
xchg ebp, eax
adc al, 0x56
call 0xbb4bfe34
xor byte [ecx], al
jns 0x4518c4
xchg ebx, eax
and eax, 0xfb2810f
loopne 0x4518f2
mov ecx, dword [esi]
push cs
setno ch
test dword [ebx - 0x3f], eax
jne 0x75bb14a6
xchg ecx, eax
in eax, 0x85
inc ebx
ror dword [edi], 0x85
mov ch, 0xfb
jne 0x451966
loopne 0x4518db
call 0xbb4bfe34
xor byte [ecx], al
jns 0x4518e4
cmp eax, 0x30bb06e5
add dword [ecx - 0x17], edi
mov ebx, 0xe9790130
jae 0x45188d
nop
add byte [edi], al
add edi, 0xffffffe0
jmp 0x6854d73d
add byte [edi], al
pop es
add edi, 0xffffffe0
jmp 0x5254d753
ret 0xe0d1
cmp al, 0xba
mov ecx, dword [esp - 0x32]
call 0x8e98f6
push 0x14
mov ecx, 0x6a00497f
adc al, 0x56
jg 0x451985
add byte [edx + 0x14], ch
push esi
call 0xbb4bfe34
xor byte [ecx], al
jns 0x451932
and eax, 0x244c8bba
ret 0x450b
outsb dx, byte [esi]
or al, 0xe9
xor dword [edx + 0x45dd8804], edi
loopne 0x45193a
out dx, al
fucompp
fnstsw ax
test ah, 0x44
jnp 0xcb3d31e
dec ebp
push ebp
loopne 0x4518fc
push ebp
clc
jmp 0x81543e8e
outsb dx, byte [esi]
or al, 0x4d
push ebp
loopne 0x451914
push ebp
clc
jmp 0xcb3d38e
jne 0x451a37
mov ecx, 0xca4d0c6e
call 0x1141ce7e
retf 0x81e8
xchg ebp, eax
adc al, 0xe9
dec ebp
push dword [edx + 4]
call 0x43cafe7b
in al, 0x85
inc ebx
ror dword [edi], 0x85
mov ch, 0xfb
jne 0x451a85
jne 0x4519f1
loopne 0x4519fd
jmp 0x451a51
lodsd eax, dword ds:[esi]
scasd eax, dword es:[edi]
sti
jne 0x451a37
mov ecx, 0x24510f25
retf 0x9de8
adc al, 0x57
std
jmp 0x451aaa
outsb dx, byte [esi]
or al, 0x4d
retf 0xaae8
call 0xbb4bfe34
xor byte [ecx], al
jns 0x451a43
fdivr qword [eax + 0x34d0c6e]
mov dword [esi], eax
or dword [eax + eax - 0x23], 0x9ae90446
mov ecx, 0x3dd0c6e
fstp qword [esi]
lcall 0xdd03, 0xdd0c6eb9
push ds
jmp 0xcb3d407
invalid
dec dword [ebx + 0x14c7aac6]
mov esp, esp
test dword [esi], ebp
inc esi
and byte [ebx + 0x10fce84d], cl
xchg ebp, eax
sbb ecx, eax
loope 0x451ab4
call 0x19da2bab
shl ecx, 2
cld
adc byte [ebp + 0x2e1c119], dl
push ecx
push eax
push esi
call 0x43cb0e87
ror dword [edi], 0xc
push dword [ebp - 0x1c]
call 0x43cafe7b
ror dword [edi], 0x85
test dword [ebp - 0x1c], esi
jmp 0x54afd435
jmp 0xf76158a
dec eax
push 0x43
xor al, 0xc7
inc ebp
invalid
push ebp
or ecx, dword [edx - 0x367b0193]
je 0x81544105
mov dl, 0x1f
mov dword [ebp - 8], ebx
clc
dec ebp
add byte [eax + 0x53], dl
call 0x4dd31b07
in al, 0x6f
and eax, 0x7b2810f
dec eax
mov dword [ebx + 0xf7c00f8], eax
or dword [ebx + esi - 0x7d], esi
add al, 0x88
test dword [0xb31273fc], ebp
add dword [eax + ecx*4], 0xffffff85
sub eax, 0xb31273fc
jne 0x1a680451
mov edx, 0x25f4fffb
jno 0x898d239c
cmp eax, 0
jl 0x451bfe
or dword [ebx + esi - 0x7d], esi
add al, 0x88
test dword [0xb31273fc], ebp
punpckhbw mm4, qword [ecx - 0x173b3b3c]
std
sbb dword [edx - 0x6f300005], edi
add byte [edi], al
add edi, 0xfffffff4
push 0xffffffffffffffff
push 0x76
call 0xfbff3603
invalid
invalid