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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa8
cmp dword [ecx + 0x20], 0
je 0x40ddbf
mov esi, ecx
movzx eax, byte [ecx]
lea ecx, [esp + 0xa4]
push 0xa
push 4
push ecx
push eax
call fcn.0040ddd0
add esp, 0x10
mov dword [esp + 0x10], eax
lea eax, [esi + 0x10]
push eax
call fcn.0040a5d0
add esp, 4
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 0x48]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
lea eax, [ecx + 0x400]
push eax
call fcn.0040c730
add esp, 4
mov dword [esp], eax
mov dword [esp + 0x1c], 0xc7bbb6b8
mov byte [esp + 0x20], 0x24
mov dword [esp + 0x21], 0
mov word [esp + 0x25], 0
xor eax, eax
nop
mov ecx, eax
add cl, 0x78
xor cl, byte [esp + eax + 0x1c]
add cl, 0xa8
mov byte [esp + eax + 0x1c], cl
inc eax
cmp eax, 0xb
jne 0x40d9c0
lea ebp, [esp + 0x1c]
mov ecx, esi
push 0x44e9ec
push ebp
push dword [esp + 8]
call fcn.0040d340
mov dword [esp + 0x1c], 0xf74a4048
mov byte [esp + 0x20], 0
xor ebx, ebx
xor edi, edi
nop
nop
nop
nop
movzx edx, byte [esp + edi + 0x1c]
mov eax, ebx
and eax, 0xc
mov ecx, edi
xor ecx, 0x48088ad6
add ecx, eax
xor ecx, edx
mov eax, ecx
and eax, 0x51
xor ecx, 0xd1
lea eax, [ecx + eax*2]
inc al
mov byte [esp + edi + 0x1c], al
inc edi
add ebx, 2
cmp edi, 5
jne 0x40da00
mov ecx, esi
push dword [esp + 0x10]
push ebp
push dword [esp + 8]
call fcn.0040d340
mov eax, dword [str.GThHyI]
mov dword [esp + 0x1c], 0xd9bea4b8
mov word [esp + 0x20], 0
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
mov edx, ecx
add dl, 0x4f
xor dl, byte [esp + ecx + 0x1c]
add dl, 0x75
mov byte [esp + ecx + 0x1c], dl
inc ecx
cmp ecx, 6
jne 0x40da60
mov ecx, esi
push eax
push ebp
push dword [esp + 8]
call fcn.0040d340
mov dword [esp + 0x1c], 0x879c8493
mov dword [esp + 0x20], 0x9483988b
mov dword [esp + 0x24], 0x9e9d988b
mov byte [esp + 0x28], 0x3c
mov dword [esp + 0x29], 0
xor ecx, ecx
mov eax, 0xffffffff
nop
mov edx, eax
or edx, 0x332a70c8
add edx, ecx
inc edx
mov edi, edx
and edi, 0xfffffffd
mov ebx, edx
and ebx, 2
or edx, 2
imul edx, ebx
xor ebx, 2
imul ebx, edi
add edx, ebx
mov edi, ecx
xor edi, 0x332a70c8
mov ebx, edx
and ebx, edi
xor edi, edx
lea edx, [edi + ebx*2]
xor dl, byte [esp + ecx + 0x1c]
add dl, 0x18
mov byte [esp + ecx + 0x1c], dl
lea edx, [ecx + 1]
dec eax
mov ecx, edx
cmp edx, 0x11
jne 0x40dab0
mov dword [esp + 4], 0x29be4e43
mov eax, 0x4cdce237
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax - 0x4cdce233]
lea edx, [eax - 0x4cdce200]
and edx, ecx
or ecx, eax
xor ecx, edx
mov edx, ecx
not edx
and edx, 0x14
and ecx, 0xeb
sub ecx, edx
inc cl
mov byte [esp + eax - 0x4cdce233], cl
inc eax
cmp eax, 0x4cdce23b
jne 0x40db10
lea eax, [esp + 4]
mov ecx, esi
push ebp
push eax
push dword [esp + 8]
call fcn.0040d340
mov dword [esp + 0x1c], 0xeef2ecea
mov byte [esp + 0x20], 0
mov dword [esp + 0x21], 0
mov eax, 0xbfff873e
nop
movzx ecx, byte [ebp]
mov edx, eax
and edx, 0xa97d023f
xor ecx, 0xe97d5a7f
lea edi, [edx + 0x2080]
and edi, ecx
add ecx, edx
add ecx, 0x2080
add edi, edi
sub ecx, edi
mov edx, ecx
and edx, 0x3a
xor ecx, 0x3a
lea ecx, [ecx + edx*2]
inc cl
mov byte [ebp], cl
inc ebp
dec eax
cmp eax, 0xbfff8735
jne 0x40db70
lea eax, [esp + 0x1c]
mov ecx, esi
push dword [esp + 0x18]
push dword [esp + 0x18]
push eax
push dword [esp + 0xc]
call fcn.0040d5b0
mov ebp, dword [esi + 0x60]
mov dword [esp + 0x1c], 0x719f0f49
mov dword [esp + 0x20], 0x75e673de
mov dword [esp + 0x24], 0x79d877d3
mov dword [esp + 0x28], 0x7d157bec
mov dword [esp + 0x2c], 0x61e57fc8
mov dword [esp + 0x30], 0x65c563f0
mov dword [esp + 0x34], 0x6906673e
mov dword [esp + 0x38], 0x6dfd6bc7
mov dword [esp + 0x3c], 0x51fa6fc0
mov dword [esp + 0x40], 0x55c253fb
mov dword [esp + 0x44], 0x59c457f7
mov dword [esp + 0x48], 0x5d0b5bcc
mov dword [esp + 0x4c], 0x41cf5ffa
mov dword [esp + 0x50], 0x45ed43d2
mov dword [esp + 0x54], 0x49e2472b
mov dword [esp + 0x58], 0x4dde4beb
mov dword [esp + 0x5c], 0xb1134fef
mov dword [esp + 0x60], 0xb510b3d0
mov dword [esp + 0x64], 0xb921b725
mov dword [esp + 0x68], 0xbd1ebb16
mov dword [esp + 0x6c], 0xa12cbf1f
mov dword [esp + 0x70], 0xa5fda33b
mov dword [esp + 0x74], 0xa901a706
mov dword [esp + 0x78], 0xadfdabf0
mov dword [esp + 0x7c], 0x9109af08
mov dword [esp + 0x80], 0x953993c7
mov dword [esp + 0x84], 0x99329704
mov dword [esp + 0x88], 0x9d3f9b09
mov dword [esp + 0x8c], 0x81399f37
mov dword [esp + 0x90], 0x85108312
mov dword [esp + 0x94], 0x89d58723
mov dword [esp + 0x98], 0x8d808b87
mov word [esp + 0x9c], 0x8f8c
mov word [esp + 0xa2], 0
mov dword [esp + 0x9e], 0
xor ecx, ecx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + edx + 0x1c]
mov edi, ecx
and edi, 0x7a
mov ebx, edx
xor ebx, 0x8401c03d
add ebx, edi
mov edi, ebx
and edi, eax
add ebx, eax
add edi, edi
mov eax, ebx
sub eax, edi
add ebx, ebx
mov edi, 2
sub edi, ebx
not edi
and edi, 2
xor eax, 1
add eax, edi
add al, 0xce
mov byte [esp + edx + 0x1c], al
inc edx
add ecx, 2
cmp edx, 0x88
jne 0x40dd10
mov dword [esp + 4], 0xc3a3c1ef
mov dword [esp + 8], 0xc7afc554
mov dword [esp + 0xc], 0xc9c8
xor ecx, ecx
nop
mov eax, ecx
add al, 0xd0
xor al, byte [esp + ecx + 4]
add al, 0xf0
mov byte [esp + ecx + 4], al
inc ecx
cmp ecx, 0xc
jne 0x40dd70
push 0x493e0
push ebp
mov edi, dword [esp + 8]
push edi
push 0
push 0
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004103f0
add esp, 0x1c
mov ebx, eax
push edi
call fcn.0040c740
add esp, 4
mov eax, dword [esi + 0x60]
add dword [esi + 4], eax
mov dword [esi + 0x60], 0
jmp 0x40ddc1
mov bl, 1
mov eax, ebx
add esp, 0xa8
pop esi
pop edi
pop ebx
pop ebp
ret