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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10c
cmp dword [ecx + 0x20], 0
je 0x40a191
lea eax, [ecx + 0x10]
push eax
mov esi, ecx
call fcn.004065d0
add esp, 4
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 0x48]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
movzx eax, byte [esi]
imul ecx, eax, 0xcd
shr ecx, 0xa
and ecx, 0xfffffffe
lea ecx, [ecx + ecx*4]
sub al, cl
movzx eax, al
movzx eax, byte [eax + str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ]
mov byte [esp + 6], al
mov byte [esp + 7], 0
mov dword [esp + 0x10], edx
lea eax, [edx + 0x400]
push eax
call fcn.00408620
add esp, 4
mov dword [esp], eax
mov dword [esp + 0x70], 0x5b574a54
mov byte [esp + 0x74], 0xc0
mov word [esp + 0x75], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax + 0x70]
mov ecx, eax
xor ecx, 0x453f41e3
mov esi, eax
or esi, 4
and esi, ecx
lea ecx, [eax + eax]
mov edi, ecx
and edi, 8
mov ebx, eax
sub ebx, edi
lea ebx, [ebx + esi*2]
add ebx, 0xbac0be1c
mov esi, edx
not esi
or esi, 0x7ca36bed
lea ebp, [edx + esi]
inc ebp
and edx, 0x12
xor edx, 0x835c9412
or ebp, edx
xor ebp, ebx
xor ebp, 0x7ca36bed
mov edx, 0x1e
sub edx, ebp
and ebp, 1
or edx, 1
add edx, ebp
mov byte [esp + eax + 0x70], dl
and ecx, 2
xor eax, 1
add eax, ecx
cmp eax, 7
jb 0x409ce0
lea esi, [esp + 0x70]
mov ecx, dword [esp + 8]
push 0x449b24
push esi
push dword [esp + 8]
call fcn.00409510
mov dword [esp + 0x70], 0x51f4c6fe
mov word [esp + 0x74], 0
mov eax, 0x1b401c9e
mov ecx, 0x61
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax - 0x1b401c2e]
lea edi, [eax - 0x80000000]
mov ebx, edx
xor ebx, edi
lea ebp, [ebx + ebx]
not ebp
add ebp, ebx
and ebp, eax
add ebp, ebp
mov ebx, ebp
not ebx
and ebx, edi
and ebp, ecx
sub ebx, ebp
add bl, dl
add bl, 0x10
mov byte [esp + eax - 0x1b401c2e], bl
inc eax
dec ecx
cmp eax, 0x1b401ca4
jne 0x409d80
lea eax, [esp + 6]
mov ebp, dword [esp + 8]
mov ecx, ebp
push eax
push esi
push dword [esp + 8]
call fcn.00409510
mov eax, dword [str.AB15g1__Ghost]
mov dword [esp + 0x70], 0x56b1cdcf
mov word [esp + 0x74], 0
mov ecx, 0xb
mov edx, 0xf4
nop
mov edi, edx
and edi, 0x92
mov ebx, ecx
and ebx, 0xd
or ebx, edi
xor bl, byte [esp + ecx + 0x65]
xor bl, 0x92
add bl, 0xa8
mov byte [esp + ecx + 0x65], bl
inc ecx
dec edx
cmp ecx, 0x11
jne 0x409df0
mov ecx, ebp
push eax
push esi
push dword [esp + 8]
call fcn.00409510
mov dword [esp + 0x70], 0x979c9483
mov dword [esp + 0x74], 0x849398ab
mov dword [esp + 0x78], 0x9e9d988b
mov byte [esp + 0x7c], 0xfc
mov word [esp + 0x7d], 0
mov byte [esp + 0x7f], 0
xor eax, eax
nop
nop
nop
nop
movzx ecx, byte [esp + eax + 0x70]
mov edx, eax
or edx, 0x70
and edx, ecx
or ecx, eax
or ecx, 0x17df7c70
xor ecx, edx
mov edx, ecx
xor edx, 0xbefbe381
and ecx, 0x1041c7e
add ecx, ecx
sub ecx, edx
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
mov byte [esp + eax + 0x70], cl
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, 0x10
jb 0x409e50
mov dword [esp + 0x14], 0xf96c5457
lea eax, [esp + 0x14]
mov ecx, 0x27266639
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax]
mov edi, ecx
or edi, edx
lea ebx, [ecx - 0x27266600]
and ebx, edx
not edi
add edi, ebx
mov edx, edi
and edx, 0x4c
xor edi, 0xcc
lea edx, [edi + edx*2]
add dl, 4
mov byte [eax], dl
inc eax
dec ecx
cmp ecx, 0x27266635
jne 0x409eb0
lea eax, [esp + 0x14]
mov ecx, ebp
push esi
push eax
push dword [esp + 8]
call fcn.00409510
mov dword [esp + 0x70], 0xb5a3a7bb
mov byte [esp + 0x74], 0x11
mov word [esp + 0x75], 0
xor ecx, ecx
mov eax, 0xffffffff
nop
nop
nop
nop
mov edx, eax
or edx, 0x2e92d2b5
add edx, ecx
inc edx
mov edi, edx
and edi, 2
mov ebx, edx
or edx, 2
imul edx, edi
xor edi, 2
and ebx, 0xfffffffd
imul ebx, edi
add edx, ebx
mov edi, ecx
xor edi, 0x2e92d2b5
mov ebx, edx
and ebx, edi
xor edi, edx
lea edx, [edi + ebx*2]
movzx edi, byte [esp + ecx + 0x70]
xor edx, edi
mov edi, edx
not edi
and edi, 0xa9
and edx, 0x56
sub edx, edi
inc dl
mov byte [esp + ecx + 0x70], dl
inc ecx
dec eax
cmp ecx, 7
jne 0x409f10
mov ecx, ebp
push dword [esp + 0x10]
push dword [esp + 0x10]
push esi
push dword [esp + 0xc]
call fcn.004097f0
mov dword [esp + 0x14], 0xe947e7a5
mov dword [esp + 0x18], 0xed78eb44
mov dword [esp + 0x1c], 0xd17eef4b
mov dword [esp + 0x20], 0xd5b9d346
mov dword [esp + 0x24], 0xd941d762
mov dword [esp + 0x28], 0xdd79db4a
mov dword [esp + 0x2c], 0xc1a0df84
mov dword [esp + 0x30], 0xc551c36f
mov dword [esp + 0x34], 0xc95cc76a
mov dword [esp + 0x38], 0xcd5ccb63
mov dword [esp + 0x3c], 0x31a2cf6f
mov dword [esp + 0x40], 0x355b33a6
mov dword [esp + 0x44], 0x39973790
mov dword [esp + 0x48], 0x3d913ba8
mov dword [esp + 0x4c], 0x21843f53
mov dword [esp + 0x50], 0x25b02383
mov dword [esp + 0x54], 0x29732787
mov dword [esp + 0x58], 0x2d8e2b4a
mov dword [esp + 0x5c], 0x11852f81
mov dword [esp + 0x60], 0x15b013bc
mov dword [esp + 0x64], 0x198a17b7
mov dword [esp + 0x68], 0x1d411b83
mov dword [esp + 0x6c], 0x1f1e
mov eax, 0x4dac8156
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax - 0x4dac8142]
xor edx, eax
lea edi, [edx - 0x6d640ab1]
mov ebx, edi
not ebx
and edi, 1
mov ecx, 0xb0
sub ecx, edx
or ecx, ebx
not ecx
or ecx, 1
add ecx, edi
mov byte [esp + eax - 0x4dac8142], cl
inc eax
cmp eax, 0x4dac81b2
jne 0x40a040
movzx eax, word [esp + 0x14]
test ax, ax
je 0x40a0a1
lea esi, [esp + 0x70]
lea ecx, [esp + 0x16]
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], ax
add esi, 2
movzx eax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a090
mov word [esi], 0
movzx ecx, byte [ebp + 0x60]
test cl, cl
je 0x40a0d1
lea eax, [ebp + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movsx ecx, cl
mov word [esi], cx
add esi, 2
movzx ecx, byte [eax]
inc eax
test cl, cl
jne 0x40a0c0
mov dword [esi], 0xa000d
mov word [esi + 4], 0
mov eax, dword [ebp + 0x80]
mov dword [esp + 0x14], 0xa00eaed2
mov dword [esp + 0x18], 0xa41aa211
mov word [esp + 0x1c], 0xa6a5
mov byte [esp + 0x1e], 0
xor ecx, ecx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [esp + edx + 0x14]
mov edi, ecx
and edi, 0xa
mov ebx, edx
xor ebx, 0x3a166f85
add ebx, edi
xor ebx, esi
mov esi, ebx
not esi
mov edi, ebx
and edi, 0x57
xor ebx, 0x2f4c83d7
lea edi, [ebx + edi*2]
or ebx, esi
and ebx, 1
xor edi, 1
lea ebx, [edi + ebx*2]
mov byte [esp + edx + 0x14], bl
inc edx
add ecx, 2
cmp edx, 0xb
jne 0x40a110
lea ecx, [esp + 0x70]
push 0x493e0
push eax
mov esi, dword [esp + 8]
push esi
push 0
push 0
push ecx
lea eax, [esp + 0x2c]
push eax
call fcn.0040c640
add esp, 0x1c
mov ebx, eax
push esi
call fcn.00408630
add esp, 4
mov eax, dword [ebp + 0x80]
add dword [ebp + 4], eax
mov dword [ebp + 0x80], 0
jmp 0x40a193
mov bl, 1
mov eax, ebx
add esp, 0x10c
pop esi
pop edi
pop ebx
pop ebp
ret