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

Disassembly:
sub esp, 0x5c
push ebp
push edi
mov edi, dword [esp + 0x6c]
mov ebp, ecx
mov dword [esp + 0x24], ebp
test edi, edi
je 0x40ff17
shr edi, 4
cmp byte [ebp], 0
mov dword [esp + 0x6c], edi
je 0x40fa93
push dword [esp + 0x70]
push edi
push dword [esp + 0x70]
call fcn.0040ff1f
jmp 0x40ff17
lea eax, [ebp + 8]
push 0x10
push eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x5c]
push eax
call fcn.004226b0
add esp, 0xc
test edi, edi
je 0x40ff04
mov edx, dword [esp + 0x68]
push ebx
push esi
lea eax, [edx + 8]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x78]
sub edx, eax
sub edx, 8
mov dword [esp + 0x34], edx
lea ecx, [eax + 8]
mov dword [esp + 0x28], ecx
mov esi, dword [ebp + 4]
add ecx, edx
mov eax, esi
mov dword [esp + 0x30], ecx
shl eax, 4
add eax, 0x18
add eax, ebp
push eax
push ecx
lea eax, [esp + 0x54]
push eax
call fcn.0040fa2a
mov edx, dword [esp + 0x4c]
movzx ecx, byte [esp + 0x53]
movzx eax, dl
mov ebx, dword [eax*4 + 0x449180]
xor ebx, dword [ecx*4 + 0x449d80]
movzx eax, byte [esp + 0x56]
xor ebx, dword [eax*4 + 0x449980]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x58]
mov ecx, dword [esp + 0x10]
movzx eax, bh
xor ecx, dword [eax*4 + 0x449580]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x3c], ecx
movzx ecx, dh
mov edx, dword [esp + 0x50]
movzx eax, dl
mov ecx, dword [ecx*4 + 0x449580]
xor ecx, dword [eax*4 + 0x449180]
movzx eax, byte [esp + 0x57]
xor ecx, dword [eax*4 + 0x449d80]
movzx eax, byte [esp + 0x5a]
xor ecx, dword [eax*4 + 0x449980]
movzx eax, byte [esp + 0x4e]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x40], ecx
movzx ecx, dh
mov eax, dword [eax*4 + 0x449980]
mov edx, dword [esp + 0x54]
xor eax, dword [ecx*4 + 0x449580]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
movzx eax, dl
xor ecx, dword [eax*4 + 0x449180]
movzx eax, byte [esp + 0x5b]
xor ecx, dword [eax*4 + 0x449d80]
movzx eax, byte [esp + 0x4f]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x44], ecx
movzx ecx, byte [esp + 0x52]
mov eax, dword [eax*4 + 0x449d80]
xor eax, dword [ecx*4 + 0x449980]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
movzx eax, dh
xor ecx, dword [eax*4 + 0x449580]
movzx eax, bl
xor ecx, dword [eax*4 + 0x449180]
lea eax, [esi - 1]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x48], ecx
cmp eax, 1
jle 0x40fd46
mov edi, dword [esp + 0x1c]
lea esi, [eax + 2]
shl esi, 4
add esi, ebp
mov ebp, dword [esp + 0x10]
dec eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], eax
mov eax, dword [esi - 8]
xor eax, ebp
mov edx, dword [esi]
xor edx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
xor eax, ecx
mov ebx, dword [esi - 4]
mov dword [esp + 0x1c], eax
xor ebx, edi
mov esi, dword [esp + 0x1c]
mov eax, edx
shr eax, 0x10
movzx ecx, al
mov eax, esi
shr eax, 8
movzx eax, al
mov ebp, dword [ecx*4 + 0x449980]
xor ebp, dword [eax*4 + 0x449580]
mov eax, ebx
shr eax, 0x18
xor ebp, dword [eax*4 + 0x449d80]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ebp, dword [eax*4 + 0x449180]
mov eax, esi
shr eax, 0x10
movzx ecx, al
mov eax, dword [esp + 0x10]
shr eax, 8
movzx eax, al
mov edi, dword [ecx*4 + 0x449980]
mov dword [esp + 0x3c], ebp
xor edi, dword [eax*4 + 0x449580]
mov eax, edx
shr eax, 0x18
xor edi, dword [eax*4 + 0x449d80]
movzx eax, bl
xor edi, dword [eax*4 + 0x449180]
mov eax, ebx
shr eax, 8
movzx ecx, al
mov eax, dword [esp + 0x10]
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x449580]
shr ebx, 0x10
mov dword [esp + 0x40], edi
xor ecx, dword [eax*4 + 0x449980]
mov eax, esi
shr eax, 0x18
xor ecx, dword [eax*4 + 0x449d80]
movzx eax, dl
shr edx, 8
xor ecx, dword [eax*4 + 0x449180]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x44], ecx
movzx ecx, bl
movzx eax, dl
mov ecx, dword [ecx*4 + 0x449980]
xor ecx, dword [eax*4 + 0x449580]
mov eax, dword [esp + 0x10]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x449d80]
mov eax, esi
mov esi, dword [esp + 0x18]
movzx eax, al
sub esi, 0x10
mov dword [esp + 0x18], esi
xor ecx, dword [eax*4 + 0x449180]
sub dword [esp + 0x20], 1
mov dword [esp + 0x48], ecx
jne 0x40fc0f
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x74]
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x18], ecx
mov eax, dword [ebp + 0x28]
xor eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
mov dword [esp + 0x4c], eax
movzx eax, al
mov ecx, dword [ebp + 0x34]
xor ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x30]
mov al, byte [eax + 0x448080]
mov byte [esp + 0x3c], al
mov eax, ecx
shr eax, 8
movzx eax, al
xor edx, dword [esp + 0x14]
mov ebx, dword [ebp + 0x2c]
xor ebx, dword [esp + 0x1c]
mov al, byte [eax + 0x448080]
mov byte [esp + 0x3d], al
mov eax, edx
shr eax, 0x10
movzx eax, al
mov esi, dword [esp + 0x20]
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], ebx
mov al, byte [eax + 0x448080]
mov byte [esp + 0x3e], al
mov eax, ebx
shr eax, 0x18
mov dword [esp + 0x58], ecx
mov al, byte [eax + 0x448080]
mov byte [esp + 0x3f], al
movzx eax, bl
mov al, byte [eax + 0x448080]
mov byte [esp + 0x40], al
mov eax, esi
shr eax, 8
movzx eax, al
mov al, byte [eax + 0x448080]
mov byte [esp + 0x41], al
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov al, byte [eax + 0x448080]
mov byte [esp + 0x42], al
mov eax, edx
shr eax, 0x18
mov al, byte [eax + 0x448080]
mov byte [esp + 0x43], al
movzx eax, dl
shr edx, 8
mov al, byte [eax + 0x448080]
mov byte [esp + 0x44], al
mov eax, ebx
shr eax, 8
movzx eax, al
shr ebx, 0x10
mov al, byte [eax + 0x448080]
mov byte [esp + 0x45], al
mov eax, esi
shr eax, 0x10
movzx eax, al
shr esi, 0x18
mov al, byte [eax + 0x448080]
mov byte [esp + 0x46], al
mov eax, ecx
shr eax, 0x18
mov al, byte [eax + 0x448080]
mov byte [esp + 0x47], al
movzx eax, cl
mov al, byte [eax + 0x448080]
mov byte [esp + 0x48], al
movzx eax, dl
mov edx, dword [ebp + 0x18]
xor edx, dword [esp + 0x3c]
mov al, byte [eax + 0x448080]
mov byte [esp + 0x49], al
movzx eax, bl
mov al, byte [eax + 0x448080]
mov byte [esp + 0x4a], al
mov al, byte [esi + 0x448080]
mov byte [esp + 0x4b], al
mov esi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x24]
xor eax, dword [esp + 0x48]
xor esi, dword [esp + 0x40]
xor ebx, dword [esp + 0x44]
cmp byte [ebp + 1], 0
mov dword [esp + 0x20], eax
je 0x40feae
xor edx, dword [esp + 0x5c]
xor esi, dword [esp + 0x60]
xor ebx, dword [esp + 0x64]
xor eax, dword [esp + 0x68]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax - 4]
mov dword [esp + 0x60], ecx
mov ecx, dword [eax]
mov dword [esp + 0x64], ecx
mov ecx, dword [eax + 4]
add eax, 0x10
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x24], eax
mov dword [ecx - 8], edx
mov edx, dword [esp + 0x20]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x34]
mov dword [ecx - 4], esi
mov dword [ecx], ebx
add ecx, 0x10
sub edi, 1
mov dword [esp + 0x28], ecx
mov dword [esp + 0x74], edi
jne 0x40fad3
pop esi
pop ebx
push 0x10
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x38]
call fcn.004226b0
add esp, 0xc
pop edi
pop ebp
add esp, 0x5c
ret 0xc