Function at 0x422210
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
push ebx
push esi
mov esi, dword [ebp + 0x10]
movzx eax, word [esi]
push edi
mov edi, dword [sym.imp.MSVCR80.dll_iswspace]
push eax
call edi
add esp, 4
test eax, eax
je 0x422246
movzx ecx, word [esi + 2]
add esi, 2
push ecx
call edi
add esp, 4
test eax, eax
jne 0x422232
mov dword [ebp + 0x10], esi
mov ebx, dword [ebp + 0xc]
movzx edx, word [ebx]
push edx
call edi
add esp, 4
test eax, eax
je 0x42226a
movzx eax, word [ebx + 2]
add ebx, 2
push eax
call edi
add esp, 4
test eax, eax
jne 0x422256
mov dword [ebp + 0xc], ebx
mov eax, ebx
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x422270
sub eax, edx
sar eax, 1
mov edi, eax
mov eax, esi
mov dword [ebp - 8], edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x422290
sub eax, edx
sar eax, 1
test edi, edi
mov ebx, eax
mov dword [ebp - 0xc], ebx
jbe 0x4222d1
mov ecx, dword [ebp + 0xc]
lea esi, [ecx + edi*2 - 2]
nop
movzx edx, word [esi]
push edx
call dword [sym.imp.MSVCR80.dll_iswspace]
add esp, 4
test eax, eax
je 0x4222cb
sub edi, 1
sub esi, 2
test edi, edi
ja 0x4222b0
mov esi, dword [ebp + 0x10]
mov dword [ebp - 8], edi
test ebx, ebx
jbe 0x4222fe
lea esi, [esi + ebx*2 - 2]
lea esp, [esp]
movzx eax, word [esi]
push eax
call dword [sym.imp.MSVCR80.dll_iswspace]
add esp, 4
test eax, eax
je 0x4222fb
sub ebx, 1
sub esi, 2
test ebx, ebx
ja 0x4222e0
mov dword [ebp - 0xc], ebx
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x38]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x422307
mov ecx, dword [esi + 0x18]
sub eax, edx
sar eax, 1
mov dword [ebp - 0x14], eax
add eax, ebx
add eax, edi
lea eax, [ecx + eax*2 + 9]
and eax, 0xfffffffc
mov dword [ebp - 0x10], eax
add eax, 0xa8
push eax
call dword [sym.imp.MSVCR80.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4224f6
mov edx, dword [ebp - 0x10]
add edx, 0xa8
lea eax, [ebx + 0xa8]
mov ecx, 0xc
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x14]
movzx ecx, dx
mov edx, eax
sub edx, ebx
mov dword [ebx], ecx
mov word [ebx + 0x38], dx
mov edx, dword [ebp + 8]
lea ecx, [edi + edi + 2]
push ecx
mov ecx, dword [edx + 0x38]
push ecx
push eax
call fcn.00417e40
mov eax, dword [ebp + 0xc]
lea esi, [ebx + 0xa8]
lea esi, [esi + edi*2 + 2]
mov edi, dword [ebp - 8]
add esp, 0xc
add edi, edi
push edi
mov edx, esi
push eax
sub edx, ebx
push esi
mov word [ebx + 0x3a], dx
call fcn.00417e40
add esp, 0xc
mov word [edi + esi], 0
xor eax, eax
lea ecx, [ecx]
mov ecx, eax
and ecx, 0x3f
mov dx, word [ecx*2 + 0x4513f0]
xor word [esi + eax*2], dx
add eax, 1
cmp eax, dword [ebp - 8]
jbe 0x4223b0
mov ecx, dword [ebp + 0x10]
lea esi, [edi + esi + 2]
mov edi, dword [ebp - 0xc]
add edi, edi
push edi
mov eax, esi
push ecx
sub eax, ebx
push esi
mov word [ebx + 0x3c], ax
call fcn.00417e40
add esp, 0xc
mov word [edi + esi], 0
xor eax, eax
mov edx, eax
and edx, 0x3f
mov cx, word [edx*2 + 0x4513f0]
xor word [esi + eax*2], cx
add eax, 1
cmp eax, dword [ebp - 0xc]
jbe 0x4223f0
lea esi, [edi + esi + 2]
mov edi, dword [ebp + 8]
mov edx, esi
sub edx, ebx
mov word [ebx + 0x3e], dx
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x30]
push eax
push ecx
push esi
call fcn.00417e40
xor esi, esi
add esp, 0xc
cmp dword [edi + 4], 4
mov word [ebp - 0x23c], si
jge 0x42249d
mov eax, dword [edi + 0x3c]
push 0x1c
lea edx, [ebp - 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x42249d
mov edx, dword [ebp - 0x2c]
push 0x104
lea ecx, [ebp - 0x23c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x42249d
lea eax, [ebp - 0x23c]
push 0x5c
push eax
call dword [sym.imp.MSVCR80.dll_wcsrchr]
add esp, 8
cmp eax, esi
je 0x422481
add eax, 2
jmp 0x422487
lea eax, [ebp - 0x23c]
push 0x14
push eax
lea ecx, [ebx + 0x40]
push ecx
call dword [sym.imp.MSVCR80.dll_wcsncpy]
add esp, 0xc
mov word [ebx + 0x66], si
jmp 0x4224a1
mov word [ebx + 0x40], si
mov edx, dword [edi + 0x34]
push 0x5c
push edx
call dword [sym.imp.MSVCR80.dll_wcsrchr]
mov esi, eax
mov eax, dword [edi + 0x34]
push 0x2f
push eax
call dword [sym.imp.MSVCR80.dll_wcsrchr]
add esp, 0x10
cmp esi, eax
ja 0x4224c4
mov esi, eax
test esi, esi
jne 0x4224cd
mov esi, dword [edi + 0x34]
jmp 0x4224d0
add esi, 2
push 0x20
lea ecx, [ebx + 0x68]
push esi
push ecx
call dword [sym.imp.MSVCR80.dll_wcsncpy]
add esp, 0xc
push ebx
mov word [ebx + 0xa6], 0
call fcn.0040a7f0
mov edi, eax
call fcn.0040b0c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret