Function at 0x496c70
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x4ec2c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x30]
push esi
mov esi, ecx
xor ecx, ecx
mov cx, word [esi + 8]
mov dl, bl
push edi
and dl, 1
and ebx, 0xfffffffe
xor edi, edi
mov byte [esp + 0xf], dl
mov eax, ecx
xor eax, 0x7b
mov dword [esp + 0x38], ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], edi
test dl, dl
mov dword [esp + 0x30], edi
jne 0x496ce5
movzx eax, cx
or eax, 0x10000
push eax
mov ecx, esi
call fcn.004480a0
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
mov word [esi + 0x84], di
call fcn.0041f651
mov ebx, dword [esp + 0x38]
mov al, byte [esi + 0xe]
test al, al
mov dword [esp + 0x38], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], edi
jns 0x496d02
lea edx, [esp + 0x20]
mov dword [esp + 0x1c], edx
jmp 0x496d0a
lea eax, [esp + 0x14]
mov dword [esp + 0x1c], eax
mov cx, word [ebx]
cmp cx, word [esi + 0x48]
je 0x49705c
push ebp
test byte [esi + 0xf], 1
je 0x496d39
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x496d39
mov ecx, dword [edi - 8]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
test byte [esi + 0x84], 0x42
jne 0x49705b
mov bp, word [esi + 0x48]
mov dword [esp + 0x14], ebx
mov ax, word [ebx]
cmp ax, bp
je 0x49705b
mov ecx, dword [esp + 0x3c]
test ecx, ecx
jg 0x496f50
cmp word [esi + 0x56], ax
jne 0x496de2
lea eax, [esp + 0x14]
lea edi, [ebx + 2]
push eax
mov ecx, esi
mov dword [esp + 0x18], edi
call fcn.0041f651
mov ebx, dword [esp + 0x14]
cmp word [ebx], bp
je 0x496d18
lea ecx, [esi + 0x6a]
push ecx
push ebx
call fcn.00448060
add esp, 8
test eax, eax
je 0x496d18
lea edx, [esi + 0x5a]
push edx
push ebx
call fcn.00448060
add esp, 8
test eax, eax
je 0x496d18
mov ecx, dword [esi + 0x2c]
push 0x4efd50
push 0
lea eax, [esp + 0x1c]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x24], edi
call fcn.00489080
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.0041f651
mov ebx, dword [esp + 0x14]
jmp 0x496d18
cmp ax, word [esi + 0x7a]
jne 0x496f50
mov ax, word [ebx + 2]
cmp ax, word [esi + 0x7c]
jne 0x496f50
lea ecx, [ebx + 4]
lea edx, [esp + 0x14]
mov dword [esp + 0x14], ecx
push edx
mov ecx, esi
call fcn.0041f651
mov edi, dword [esp + 0x14]
mov ax, word [edi]
cmp ax, bp
je 0x496e41
mov cx, word [esi + 0x4a]
lea ecx, [ecx]
cmp ax, cx
je 0x496e41
cmp ax, word [esi + 0x50]
je 0x496e41
cmp word [esi + 0x56], ax
je 0x496e41
add edi, 2
mov dword [esp + 0x14], edi
mov ax, word [edi]
cmp ax, word [esi + 0x48]
jne 0x496e20
lea eax, [esp + 0x18]
push eax
mov ecx, esi
mov dword [esp + 0x1c], edi
call fcn.0041f651
mov ebp, dword [esp + 0x18]
mov cx, word [esp + 0x28]
cmp cx, word [ebp]
jne 0x496f1e
sub edi, ebx
sar edi, 1
push edi
push ebx
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 0
call fcn.00449600
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
sub eax, ebx
sar eax, 1
dec eax
mov byte [esp + 0x34], 1
js 0x496e9b
nop
mov dx, word [esi + 8]
xor word [edi + eax*2], dx
dec eax
jns 0x496e90
lea eax, [esp + 0x14]
lea ebx, [ebp + 2]
push eax
mov ecx, esi
mov dword [esp + 0x18], ebx
call fcn.0041f651
mov ebp, dword [esp + 0x14]
mov cx, word [ebp]
cmp cx, word [esi + 0x48]
je 0x496f0c
lea edx, [esi + 0x6a]
push edx
push ebp
call fcn.00448060
add esp, 8
test eax, eax
je 0x496f0c
lea eax, [esi + 0x5a]
push eax
push ebp
call fcn.00448060
add esp, 8
test eax, eax
je 0x496f0c
mov edx, dword [esi + 0x2c]
push edi
push 0
lea ecx, [esp + 0x1c]
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x24], ebx
call fcn.00489080
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 0
call fcn.00443880
jmp 0x496d18
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 0
call fcn.00443880
mov edi, dword [esp + 0x14]
xor eax, eax
mov ax, word [edi]
mov ecx, esi
push eax
call fcn.0041f62a
test eax, eax
je 0x496f3b
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
call fcn.0041f680
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.0041f651
mov ebx, dword [esp + 0x14]
jmp 0x496d18
push 0
lea eax, [esp + 0x18]
push eax
push ebx
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], 0
call fcn.004215c7
mov cx, word [eax]
test cx, cx
je 0x49702f
cmp cx, 0x2f
je 0x49702f
cmp cx, 0x3b
je 0x49702f
cmp cx, 0x60
je 0x49702f
push eax
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.00454350
mov ebx, dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
push 4
mov edi, eax
push str._SUB
push edi
call ebx
test eax, eax
jne 0x496fde
xor ecx, ecx
mov cx, word [edi + 8]
mov eax, ecx
call fcn.00443830
test al, al
jne 0x496fd8
test cx, cx
jne 0x496fde
inc dword [esp + 0x3c]
jmp 0x49702f
push 4
push str._END
push edi
call ebx
test eax, eax
jne 0x497011
xor ecx, ecx
mov cx, word [edi + 8]
mov eax, ecx
call fcn.00443830
test al, al
jne 0x497002
test cx, cx
jne 0x497011
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x49702f
dec eax
mov dword [esp + 0x3c], eax
jmp 0x49702f
mov eax, dword [esp + 0x3c]
test eax, eax
jg 0x49702f
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push edi
mov ecx, esi
call fcn.00437b3d
mov cx, word [esi + 0x4a]
mov ebx, dword [esp + 0x14]
mov ax, word [ebx]
cmp ax, cx
je 0x497045
cmp ax, word [esi + 0x50]
jne 0x49704e
add ebx, 2
mov dword [esp + 0x14], ebx
jmp 0x497037
mov cx, word [ebx]
cmp cx, word [esi + 0x48]
jne 0x496d18
pop ebp
mov al, byte [esp + 0xf]
test al, al
jne 0x49706d
mov word [esi + 0x84], 0
mov eax, dword [esp + 0x18]
test eax, eax
pop edi
pop esi
pop ebx
je 0x49708b
mov edx, dword [0x51d3c8]
add eax, 0xfffffff8
push eax
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov dword fs:[0], ecx
add esp, 0x28
ret 4