Function at 0x40d530
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x98
mov edi, dword [esp + 0xac]
mov dword [esp + 0x14], ecx
add edi, dword [ecx + 0x60]
mov dword [esp + 0x6c], 0xa5a8aa51
mov dword [esp + 0x70], 0x16dad5b3
mov dword [esp + 0x74], 0xcad2e438
mov dword [esp + 0x78], 0xd1c10f26
mov dword [esp + 0x7c], 0xc1c7c4d0
mov dword [esp + 0x80], 0xc9c4dcdb
mov dword [esp + 0x84], 0xc001cb05
mov dword [esp + 0x88], 0xd0d5c9de
mov dword [esp + 0x8c], 0x6a6c68c0
mov word [esp + 0x90], 0x476e
mov dword [esp + 0x92], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x29
ja 0x40d5f9
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x6c]
mov edx, eax
xor edx, 0x4370ab3b
and eax, 0xc370ab3b
lea eax, [edx + eax*2]
xor eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
add al, 0xd9
mov ecx, dword [esp]
mov byte [esp + ecx + 0x6c], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x2a
jb 0x40d5c0
mov dword [esp], 0xc1ccf0e6
mov byte [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [esp + 8]
cmp eax, 4
ja 0x40d677
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 8]
mov ecx, dword [esp + 8]
movzx ecx, byte [esp + ecx]
mov edx, eax
xor edx, 0xedb744d1
mov esi, eax
xor esi, 0x1248bb2e
or eax, 0x6db744d1
and eax, esi
lea eax, [edx + eax*2]
lea edx, [eax + ecx]
and eax, ecx
mov ecx, edx
xor ecx, eax
add ecx, eax
not eax
and eax, edx
add eax, eax
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
add al, 0xeb
mov ecx, dword [esp + 8]
mov byte [esp + ecx], al
inc dword [esp + 8]
mov eax, dword [esp + 8]
cmp eax, 5
jb 0x40d620
mov dword [esp + 0x18], 0xa6a06c6d
mov dword [esp + 0x1c], 0xa2a2909c
mov dword [esp + 0x20], 0xafdaa09d
mov dword [esp + 0x24], 0xaaa7aea3
mov dword [esp + 0x28], 0xa297e3e2
mov dword [esp + 0x2c], 0x98b57f79
mov dword [esp + 0x30], 0x959fed96
mov dword [esp + 0x34], 0x96ba50e8
mov dword [esp + 0x38], 0xf08df1f3
mov dword [esp + 0x3c], 0x888ff18d
mov dword [esp + 0x40], 0x8d4ab386
mov dword [esp + 0x44], 0x4283ff83
mov dword [esp + 0x48], 0xf286f0f4
mov dword [esp + 0x4c], 0xf6f835cf
mov dword [esp + 0x50], 0x39c7fcf5
mov dword [esp + 0x54], 0xfaf2f4fa
mov dword [esp + 0x58], 0xe522da22
mov dword [esp + 0x5c], 0xe9e3e9ed
mov dword [esp + 0x60], 0xd6efe4e9
mov word [esp + 0x64], 0xd2e
mov dword [esp + 0x66], 0
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
cmp eax, 0x51
ja 0x40d77b
nop
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
movzx ecx, byte [esp + ecx + 0x18]
mov edx, eax
xor edx, 0x16522990
and eax, 0x16522990
lea eax, [edx + eax*2]
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov ecx, eax
xor ecx, 0xd0
and eax, 0x2f
add eax, eax
sub eax, ecx
mov ecx, dword [esp + 0xc]
mov byte [esp + ecx + 0x18], al
inc dword [esp + 0xc]
mov eax, dword [esp + 0xc]
cmp eax, 0x52
jb 0x40d730
mov eax, dword [esp + 0xb0]
movzx ecx, byte [esp + 0x18]
mov edx, edi
test cl, cl
je 0x40d7ab
lea esi, [esp + 0x19]
mov edx, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], cl
inc edx
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x40d7a0
mov byte [edx], 0
movzx ecx, byte [eax]
test cl, cl
je 0x40d7cb
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], cl
inc edx
movzx ecx, byte [eax]
inc eax
test cl, cl
jne 0x40d7c0
mov byte [edx], 0
movzx eax, byte [esp]
test al, al
je 0x40d7eb
lea ecx, [esp + 1]
nop
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40d7e0
mov ebx, dword [esp + 0xb8]
mov ebp, dword [esp + 0xb4]
mov byte [edx], 0
movzx eax, byte [esp + 0x6c]
test al, al
mov dword [esp + 0x10], edi
je 0x40d81b
lea ecx, [esp + 0x6d]
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40d810
mov byte [edx], 0
mov ecx, ebx
shr ecx, 2
mov eax, ebp
mov edi, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, ebx
and eax, 0xfffffffc
lea esi, [edx + eax]
add eax, ebp
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov ebp, eax
mov edi, esi
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
test bl, 1
je 0x40d858
mov ecx, ebx
and ecx, 2
movzx eax, byte [eax + ecx]
mov byte [esi + ecx], al
mov dword [esp + 0x18], 0xbab9e597
mov dword [esp + 0x1c], 0xb6b6444e
mov dword [esp + 0x20], 0x7e897848
mov dword [esp + 0x24], 0x70477340
mov dword [esp + 0x28], 0x4f4c707b
mov dword [esp + 0x2c], 0xd3ad8873
mov dword [esp + 0x30], 0xc2cdaf
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x1b
mov edi, dword [esp + 0x10]
ja 0x40d8e9
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x18]
mov esi, eax
xor esi, 0xdb9299d7
and eax, 0xdb9299d7
lea eax, [esi + eax*2]
xor eax, ecx
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x6c]
add al, 0xcd
mov ecx, dword [esp]
mov byte [esp + ecx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x1c
jb 0x40d8b0
add edx, ebx
movzx eax, byte [esp + 0x18]
test al, al
je 0x40d90b
lea ecx, [esp + 0x19]
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40d900
mov byte [edx], 0
sub edx, edi
mov eax, dword [esp + 0x14]
add dword [eax + 0x60], edx
add esp, 0x98
pop esi
pop edi
pop ebx
pop ebp
ret 0x10