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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xac
cmp dword [ecx + 0x20], 0
je 0x40df27
mov esi, ecx
movzx eax, byte [ecx]
lea ecx, [esp + 0xa8]
push 0xa
push 4
push ecx
push eax
call fcn.0040df40
add esp, 0x10
mov ebx, eax
lea eax, [esi + 0x10]
push eax
call fcn.0040a4d0
add esp, 4
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 0x48]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
lea eax, [ecx + 0x400]
push eax
call fcn.0040c640
add esp, 4
mov edi, eax
mov dword [esp + 0x20], 0x2d2d3e2c
mov byte [esp + 0x24], 0x80
mov dword [esp + 0x25], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 8
ja 0x40da4a
nop
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 + 0x20]
mov edx, eax
xor edx, 0x64af43a1
and eax, 0xe4af43a1
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 + 8], eax
mov eax, dword [esp + 8]
add al, 0xdb
mov ecx, dword [esp]
mov byte [esp + ecx + 0x20], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 9
jb 0x40da00
lea ebp, [esp + 0x20]
mov ecx, esi
push 0x44f248
push ebp
push edi
call fcn.0040d1e0
mov dword [esp + 0x20], 0xf74a4048
mov dword [esp + 0x24], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 7
ja 0x40dab9
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x20]
mov edx, eax
xor edx, 0xea9ecd6
and eax, 0xea9ecd6
lea eax, [edx + eax*2]
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0xd2
mov ecx, dword [esp]
mov byte [esp + ecx + 0x20], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 8
jb 0x40da80
mov ecx, esi
push ebx
push ebp
push edi
call fcn.0040d1e0
mov eax, dword [str.hRjzG3__GAS]
mov dword [esp + 0x20], 0x3f9a9094
mov byte [esp + 0x24], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 4
ja 0x40db34
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0x20]
lea ebx, [ecx + ecx]
and ebx, 0x91ead694
sub ecx, ebx
add ecx, 0xc8f56b4a
mov ebp, ecx
and ebp, ebx
xor ecx, ebx
lea ecx, [ecx + ebp*2]
xor ecx, edx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 8]
add cl, 0x8e
mov edx, dword [esp]
mov byte [esp + edx + 0x20], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 5
jb 0x40daf0
mov ecx, esi
push eax
lea ebp, [esp + 0x24]
push ebp
push edi
call fcn.0040d1e0
mov dword [esp + 0x20], 0x75807889
mov dword [esp + 0x24], 0x80758c71
mov dword [esp + 0x28], 0x6e8f7481
mov byte [esp + 0x2c], 8
mov dword [esp + 0x2d], 0
mov dword [esp + 0x30], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x13
ja 0x40dbcd
nop
nop
mov ecx, dword [esp]
mov eax, dword [esp]
movzx eax, byte [esp + eax + 0x20]
add ecx, 0xfc1f5a85
mov edx, ecx
and edx, eax
mov ebx, ecx
xor ebx, eax
not eax
or ecx, eax
sub eax, ecx
add eax, edx
lea eax, [ebx + eax*2]
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov ecx, eax
xor ecx, 0x99
and eax, 0x66
add eax, eax
sub eax, ecx
mov ecx, dword [esp]
mov byte [esp + ecx + 0x20], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x14
jb 0x40db80
mov dword [esp + 8], 0x971a0639
mov word [esp + 0xc], 0
mov byte [esp + 0xe], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 6
ja 0x40dc31
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 8]
add eax, 0x684db226
xor eax, ecx
mov dword [esp], eax
mov eax, dword [esp]
add al, 0x42
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 8], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 7
jb 0x40dc00
lea ebx, [esp + 8]
mov ecx, esi
push ebp
push ebx
push edi
call fcn.0040d1e0
mov dword [esp + 0x20], 0xd6c2c4da
mov byte [esp + 0x24], 0x30
mov dword [esp + 0x25], 0
mov word [esp + 0x29], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0xa
ja 0x40dcb6
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x20]
mov edx, eax
xor edx, 0xbaac36f5
and eax, 0x3aac36f5
lea eax, [edx + eax*2]
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov ecx, eax
not ecx
and ecx, 0xc9
and eax, 0x36
sub eax, ecx
mov ecx, dword [esp]
mov byte [esp + ecx + 0x20], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0xb
jb 0x40dc70
mov ecx, esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push ebp
push edi
call fcn.0040d490
mov eax, dword [esi + 0x60]
mov dword [esp + 0x20], 0x996b9b51
mov dword [esp + 0x24], 0xa55aa76a
mov dword [esp + 0x28], 0xa150a34f
mov dword [esp + 0x2c], 0xad9daf5c
mov dword [esp + 0x30], 0xa92dab70
mov dword [esp + 0x34], 0xb55db758
mov dword [esp + 0x38], 0xb192b372
mov dword [esp + 0x3c], 0xbd45bf43
mov dword [esp + 0x40], 0xb946bb48
mov dword [esp + 0x44], 0x45b6474f
mov dword [esp + 0x48], 0x41bc43ab
mov dword [esp + 0x4c], 0x4d7f4fbc
mov dword [esp + 0x50], 0x49bb4ba6
mov dword [esp + 0x54], 0x55a557b6
mov dword [esp + 0x58], 0x51be5367
mov dword [esp + 0x5c], 0x5da25fbf
mov dword [esp + 0x60], 0x599f5bb3
mov dword [esp + 0x64], 0x65886778
mov dword [esp + 0x68], 0x61996395
mov dword [esp + 0x6c], 0x6d826f92
mov dword [esp + 0x70], 0x69946b83
mov dword [esp + 0x74], 0x75b577ef
mov dword [esp + 0x78], 0x7199739a
mov dword [esp + 0x7c], 0x7d457f48
mov dword [esp + 0x80], 0x79917b90
mov dword [esp + 0x84], 0x5f10743
mov dword [esp + 0x88], 0x1ee03f4
mov dword [esp + 0x8c], 0xde30ff1
mov dword [esp + 0x90], 0x9e10bfb
mov dword [esp + 0x94], 0x15e817f6
mov dword [esp + 0x98], 0x112d13ff
mov dword [esp + 0x9c], 0x1d081f03
mov word [esp + 0xa0], 0x1b1c
mov byte [esp + 0xa6], 0
mov dword [esp + 0xa2], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x86
ja 0x40de75
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0x20]
mov ebp, ecx
xor ebp, 0x796e83db
and ecx, 0xf96e83db
lea ecx, [ecx*2]
add ecx, ebp
lea ebp, [ecx + edx]
and ecx, edx
mov edx, ebp
not edx
and edx, ecx
add edx, ecx
not ecx
and ecx, ebp
sub ecx, edx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 8]
add cl, 0xb9
mov edx, dword [esp]
mov byte [esp + edx + 0x20], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x87
jb 0x40de20
mov dword [esp + 8], 0x2343217f
mov dword [esp + 0xc], 0x27bf25b4
mov dword [esp + 0x10], 0x5958
mov byte [esp + 0x14], 0
mov dword [esp + 4], 0
mov ecx, dword [esp + 4]
cmp ecx, 0xc
ja 0x40def4
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 4]
mov edx, dword [esp + 4]
movzx edx, byte [esp + edx + 8]
mov ebp, ecx
xor ebp, 0x4a715138
and ecx, 0xca715138
lea ecx, [ecx*2]
add ecx, ebp
xor ecx, edx
mov dword [esp], ecx
mov ecx, dword [esp]
add cl, 0xe8
mov edx, dword [esp + 4]
mov byte [esp + edx + 8], cl
inc dword [esp + 4]
mov ecx, dword [esp + 4]
cmp ecx, 0xd
jb 0x40deb0
push 0x493e0
push eax
push edi
push 0
push 0
lea eax, [esp + 0x34]
push eax
push ebx
call fcn.00410680
add esp, 0x1c
mov ebx, eax
push edi
call fcn.0040c650
add esp, 4
mov eax, dword [esi + 0x60]
add dword [esi + 4], eax
mov dword [esi + 0x60], 0
jmp 0x40df29
mov bl, 1
mov eax, ebx
add esp, 0xac
pop esi
pop edi
pop ebx
pop ebp
ret