Function at 0x497f60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xdc
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x1c]
shr eax, 3
mov dword [ebp + 0x10], eax
cmp dword [ebp + 0x10], 0x14
je 0x497f96
cmp dword [ebp + 0x10], 0x1c
je 0x497f96
xor edi, edi
cmp dword [ebp + 0x10], 0x20
je 0x497f96
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x4985e3
mov edi, 0x200
cmp dword [ebp + 0xc], 0x1ff
jbe 0x497fb8
mov edi, dword [ebp + 0xc]
add edi, 0x3f
and edi, 0xffffffc0
test ebx, ebx
jne 0x4980f7
cmp ebx, dword [ebp + 0x10]
ja 0x498111
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x497fe8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0xdc], eax
push ecx
push ebx
mov edx, dword [ebp + 0x18]
push edx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x10
call fcn.0041bc10
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x98], eax
test eax, eax
je 0x4980f3
call fcn.0044bbd0
mov dword [ebp - 0xa4], eax
test eax, eax
je 0x4980e9
sub esp, 0xc
mov eax, dword [ebp - 0x98]
dec edi
push eax
call fcn.0041bdf0
pop eax
mov eax, dword [ebp - 0x98]
push eax
call fcn.0041bca0
mov dword [ebp - 0xc4], eax
pop eax
mov eax, dword [ebp - 0x98]
push eax
call fcn.0041bca0
mov dword [ebp - 0xb0], eax
mov esi, dword [ebp - 0x98]
pop eax
push esi
call fcn.0041bca0
mov dword [ebp - 0xc0], eax
mov edx, dword [ebp - 0x98]
pop ecx
push edx
call fcn.0041bca0
mov dword [ebp - 0xac], eax
pop eax
mov eax, dword [ebp - 0x98]
push eax
call fcn.0041bca0
mov dword [ebp - 0xbc], eax
pop eax
mov eax, dword [ebp - 0x98]
push eax
call fcn.0041bca0
mov dword [ebp - 0xb8], eax
pop eax
mov eax, dword [ebp - 0x98]
push eax
call fcn.0041bca0
mov dword [ebp - 0xa8], eax
mov ecx, dword [ebp - 0x98]
pop esi
push ecx
call fcn.0041bca0
mov dword [ebp - 0xc8], edi
mov dword [ebp - 0xb4], eax
call fcn.0041c4d0
add esp, 0xc
mov edx, dword [ebp - 0xc8]
push edx
push eax
mov eax, dword [ebp - 0xb4]
push eax
call fcn.00428dc0
add esp, 0x10
test eax, eax
jne 0x498164
mov eax, dword [ebp - 0x98]
test eax, eax
jne 0x498119
xor edi, edi
jmp 0x49813a
cmp dword [ebp + 0x10], ebx
jbe 0x497fc0
cmp ebx, dword [ebp + 0x10]
jbe 0x497fe8
mov ebx, dword [ebp + 0x10]
jmp 0x497fe8
mov ebx, dword [ebp + 0x10]
jmp 0x497fc9
xor edi, edi
sub esp, 0xc
mov esi, dword [ebp - 0x98]
push esi
call fcn.0041bb90
pop ebx
mov ecx, dword [ebp - 0x98]
push ecx
call fcn.0041bef0
add esp, 0x10
mov edx, dword [ebp - 0xa4]
test edx, edx
je 0x497f8c
sub esp, 0xc
mov eax, dword [ebp - 0xa4]
push eax
call fcn.0044bb80
mov eax, edi
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0xcccccccd
lea esi, [ebp - 0x6c]
mul dword [ebp - 0xc8]
shr edx, 7
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xa0], edx
mov edx, esi
add edx, edi
xor eax, eax
mov dword [ebp - 0xd8], esi
mov dword [ebp - 0xd4], edx
lea esi, [eax + 1]
mov dword [ebp - 0x90], esi
push esi
push eax
push 0
mov ecx, dword [ebp + 0x2c]
push ecx
call fcn.00431440
add esp, 0x10
test eax, eax
je 0x4980e9
test ebx, ebx
je 0x498620
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x94], 0
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp - 0xd8]
cld
shr ecx, 2
mov esi, dword [ebp - 0xdc]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x10]
mov edx, esi
and eax, 2
mov dword [ebp - 0xcc], eax
je 0x4981fd
mov ax, word [esi]
add edx, 2
mov word [edi], ax
add edi, 2
mov esi, dword [ebp + 0x10]
and esi, 1
mov dword [ebp - 0xd0], esi
je 0x49820f
mov al, byte [edx]
mov byte [edi], al
mov ecx, dword [ebp + 0x10]
lea ebx, [ebp - 0x8c]
cld
shr ecx, 2
mov edi, ebx
mov esi, dword [ebp - 0xdc]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0xcc]
mov edx, esi
test eax, eax
je 0x49823e
mov ax, word [esi]
add edx, 2
mov word [edi], ax
add edi, 2
mov eax, dword [ebp - 0xd0]
test eax, eax
je 0x49824c
mov al, byte [edx]
mov byte [edi], al
mov edi, dword [ebp + 0x10]
dec edi
js 0x498280
mov al, byte [ebp + edi - 0x6c]
inc eax
mov byte [ebp + edi - 0x6c], al
test al, al
jne 0x498280
mov edx, dword [ebp - 0xd4]
lea ecx, [ebp - 0x6b]
jmp 0x49827c
mov al, byte [edx - 2]
inc eax
mov byte [edx - 2], al
dec edx
test al, al
jne 0x498280
cmp edx, ecx
jne 0x498270
push eax
push eax
push 0
lea edx, [ebp - 0x2c]
mov eax, dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x4c]
push 0
push eax
mov eax, dword [ebp + 0x10]
push eax
push edx
call fcn.0045b950
add esp, 0x20
test eax, eax
je 0x4980e9
push esi
push esi
push 0
lea esi, [ebp - 0x6c]
mov ecx, dword [ebp + 0x14]
push ecx
push 0
push ebx
mov edx, dword [ebp + 0x10]
push edx
push esi
call fcn.0045b950
add esp, 0x20
test eax, eax
je 0x4980e9
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x4982df
xor edx, edx
mov al, byte [edx + ebx]
xor byte [edx + ebp - 0x4c], al
inc edx
cmp dword [ebp + 0x10], edx
jne 0x4982d2
or byte [ebp - 0x4c], 0x80
or byte [ebp + edi - 0x4c], 1
push eax
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.0041d160
add esp, 0x10
test eax, eax
je 0x4980e9
sub esp, 0xc
mov eax, dword [ebp + 0x2c]
push eax
mov eax, dword [ebp - 0x94]
push eax
mov esi, dword [ebp - 0x98]
push esi
push 0x32
mov ebx, dword [ebp - 0xac]
push ebx
call fcn.004314b0
add esp, 0x20
cmp eax, 0
jle 0x4985f0
push ecx
push 0
push 2
mov edx, dword [ebp + 0x2c]
push edx
call fcn.00431440
add esp, 0x10
test eax, eax
je 0x4980e9
push eax
push 0
push 3
mov eax, dword [ebp + 0x2c]
push eax
call fcn.00431440
add esp, 0x10
test eax, eax
je 0x4980e9
lea edx, [ebp - 0x6b]
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0xe0], edx
mov eax, dword [ebp - 0x9c]
test eax, eax
jne 0x4985f7
push esi
push esi
push 0
mov ebx, dword [ebp - 0xc0]
push ebx
xor ebx, ebx
call fcn.0041cf80
add esp, 0x10
test edi, edi
js 0x4983cc
mov al, byte [ebp + edi - 0x6c]
inc eax
mov byte [ebp + edi - 0x6c], al
test al, al
mov edx, dword [ebp - 0xd4]
je 0x4983c4
jmp 0x4983cc
mov al, byte [edx - 2]
inc eax
mov byte [edx - 2], al
dec edx
test al, al
jne 0x4983cc
cmp edx, dword [ebp - 0xe0]
jne 0x4983b8
push ecx
push ecx
push 0
lea esi, [ebp - 0x4c]
mov edx, dword [ebp + 0x14]
push edx
push 0
push esi
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x6c]
push eax
call fcn.0045b950
add esp, 0x20
test eax, eax
je 0x4980e9
push eax
mov eax, dword [ebp - 0xc4]
push eax
mov eax, dword [ebp + 0x10]
push eax
push esi
call fcn.0041d160
add esp, 0x10
test eax, eax
je 0x4980e9
push eax
mov eax, dword [ebp + 0x10]
shl eax, 3
imul eax, ebx
push eax
mov eax, dword [ebp - 0xc4]
push eax
mov esi, dword [ebp - 0xc4]
push esi
call fcn.00428dc0
add esp, 0x10
test eax, eax
je 0x4980e9
push ecx
mov edx, dword [ebp - 0xc4]
push edx
mov eax, dword [ebp - 0xc0]
push eax
mov eax, dword [ebp - 0xc0]
push eax
call fcn.00425ec0
add esp, 0x10
test eax, eax
je 0x4980e9
inc ebx
cmp dword [ebp - 0xa0], ebx
jge 0x49839f
push eax
push eax
mov eax, dword [ebp - 0xc8]
push eax
mov eax, dword [ebp - 0xc0]
push eax
call fcn.0041c8a0
add esp, 0x10
test eax, eax
je 0x4980e9
push eax
push eax
mov esi, dword [ebp - 0xc0]
push esi
mov ebx, dword [ebp - 0xbc]
push ebx
call fcn.0041cfd0
add esp, 0x10
test eax, eax
je 0x4980e9
push ecx
mov edx, dword [ebp - 0xb4]
push edx
mov eax, dword [ebp - 0xbc]
push eax
mov eax, dword [ebp - 0xbc]
push eax
call fcn.00425ec0
add esp, 0x10
test eax, eax
je 0x4980e9
push eax
push eax
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp - 0xc4]
push eax
call fcn.00428cd0
add esp, 0x10
test eax, eax
je 0x4980e9
sub esp, 0xc
mov eax, dword [ebp - 0x98]
push eax
mov esi, dword [ebp - 0xc4]
push esi
mov ebx, dword [ebp - 0xbc]
push ebx
mov ecx, dword [ebp - 0xb8]
push ecx
push 0
call fcn.0041e390
add esp, 0x20
test eax, eax
je 0x4980e9
call fcn.0041c4d0
push edx
push eax
mov eax, dword [ebp - 0xb8]
push eax
mov eax, dword [ebp - 0xc4]
push eax
call fcn.00425db0
add esp, 0x10
test eax, eax
je 0x4980e9
push eax
mov eax, dword [ebp - 0xc4]
push eax
mov esi, dword [ebp - 0xbc]
push esi
mov ebx, dword [ebp - 0xa8]
push ebx
call fcn.00425db0
add esp, 0x10
test eax, eax
je 0x4980e9
push ecx
push ecx
mov edx, dword [ebp - 0xb4]
push edx
mov eax, dword [ebp - 0xa8]
push eax
call fcn.0041c720
add esp, 0x10
test eax, eax
js 0x4985b9
sub esp, 0xc
mov eax, dword [ebp + 0x2c]
push eax
push 1
mov eax, dword [ebp - 0x98]
push eax
push 0x32
mov eax, dword [ebp - 0xa8]
push eax
call fcn.004314b0
add esp, 0x20
cmp eax, 0
jg 0x498647
jne 0x4980e9
mov eax, dword [ebp - 0x9c]
inc eax
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x1000
jne 0x49837c
xor ebx, ebx
mov eax, dword [ebp - 0x90]
jmp 0x498190
call fcn.00452650
mov dword [ebp + 0x14], eax
jmp 0x497fa1
je 0x4985d6
jmp 0x4980e9
push eax
mov eax, dword [ebp - 0x9c]
push eax
push 0
mov eax, dword [ebp + 0x2c]
push eax
call fcn.00431440
add esp, 0x10
test eax, eax
jne 0x49838a
jmp 0x4980e9
push edx
push edx
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x2c]
push eax
mov dword [ebp - 0xdc], edx
push edx
call fcn.00427940
add esp, 0x10
mov dword [ebp - 0x94], 1
jmp 0x4981cc
push eax
push 1
push 2
mov edi, dword [ebp + 0x2c]
push edi
call fcn.00431440
add esp, 0x10
test eax, eax
je 0x4980e9
call fcn.0041c4d0
push esi
push eax
mov ebx, dword [ebp - 0xa8]
push ebx
mov ecx, dword [ebp - 0xb4]
push ecx
call fcn.00425db0
add esp, 0x10
test eax, eax
je 0x4980e9
sub esp, 0xc
mov edx, dword [ebp - 0x98]
push edx
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp - 0xb4]
push eax
push 0
mov eax, dword [ebp - 0xc4]
push eax
call fcn.0041e390
add esp, 0x20
test eax, eax
je 0x4980e9
push eax
push eax
push 2
mov eax, dword [ebp - 0xb4]
push eax
call fcn.0041cf80
add esp, 0x10
test eax, eax
je 0x4980e9
push eax
mov edi, dword [ebp - 0x98]
push edi
mov esi, dword [ebp - 0xa8]
push esi
mov ebx, dword [ebp - 0xa4]
push ebx
call fcn.0044b9b0
add esp, 0x10
test eax, eax
je 0x4980e9
mov ebx, 2
push ecx
push ecx
mov edx, dword [ebp - 0xa4]
push edx
mov eax, dword [ebp - 0x98]
push eax
mov eax, dword [ebp - 0xa8]
push eax
mov eax, dword [ebp - 0xc4]
push eax
mov eax, dword [ebp - 0xb4]
push eax
mov eax, dword [ebp - 0xb0]
push eax
call fcn.0043d800
add esp, 0x20
test eax, eax
je 0x4980e9
mov esi, dword [ebp - 0xb0]
cmp dword [esi + 4], 1
jne 0x49877a
mov eax, dword [esi]
cmp dword [eax], 1
jne 0x49877a
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x49877a
call fcn.0041c4d0
push edi
push eax
mov esi, dword [ebp - 0xb4]
push esi
mov ecx, dword [ebp - 0xb4]
push ecx
call fcn.00425ec0
add esp, 0x10
test eax, eax
je 0x4980e9
inc ebx
jmp 0x4986fc
push edx
push 1
push 3
mov eax, dword [ebp + 0x2c]
push eax
call fcn.00431440
add esp, 0x10
test eax, eax
je 0x4980e9
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4987a9
sub esp, 0xc
push eax
call fcn.0041ccc0
add esp, 0x10
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
test eax, eax
je 0x4987bf
sub esp, 0xc
push eax
call fcn.0041ccc0
add esp, 0x10
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4987d5
sub esp, 0xc
push eax
call fcn.0041ccc0
add esp, 0x10
sub esp, 0xc
mov eax, dword [ebp - 0xa8]
push eax
call fcn.0041d280
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], eax
pop eax
mov eax, dword [ebp - 0xac]
push eax
call fcn.0041d280
mov esi, dword [ebp + 8]
mov dword [esi + 0x10], eax
pop eax
mov edi, dword [ebp - 0xb0]
push edi
call fcn.0041d280
mov ecx, dword [esi + 0xc]
add esp, 0x10
mov dword [esi + 0x14], eax
test ecx, ecx
je 0x498119
mov edx, dword [esi + 0x10]
test edx, edx
je 0x498119
test eax, eax
je 0x498119
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x498840
mov eax, dword [ebp + 0x24]
mov edx, dword [ebp - 0x9c]
mov dword [eax], edx
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x49884c
mov esi, dword [ebp + 0x28]
mov dword [esi], ebx
mov eax, dword [ebp + 0x20]
mov edi, 1
test eax, eax
je 0x49811b
push eax
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp + 0x20]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x10
jmp 0x49811b