Function at 0x4977d0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xd4
call fcn.005458d0
mov eax, dword [0x5d86f0]
xor eax, esp
mov dword [esp + 0xd0], eax
mov eax, dword [esp + 0xd8]
mov ecx, dword [esp + 0xf0]
mov edx, dword [esp + 0xf4]
push ebx
mov ebx, dword [esp + 0xec]
push ebp
push esi
mov esi, dword [esp + 0xec]
xor ebp, ebp
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x104]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x108]
shr esi, 3
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x2c], 2
cmp esi, 0x14
je 0x49787d
cmp esi, 0x1c
je 0x49787d
cmp esi, 0x20
je 0x49787d
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xd0]
xor ecx, esp
call fcn.0054546b
add esp, 0xd4
ret
cmp eax, ebp
jne 0x49788a
call fcn.0044cca0
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xe8]
cmp eax, 0x200
jae 0x49789d
mov eax, 0x200
push edi
lea edi, [eax + 0x3f]
mov eax, dword [esp + 0xfc]
and edi, 0xffffffc0
mov dword [esp + 0xec], edi
cmp eax, ebp
je 0x4978c0
cmp eax, esi
jae 0x4978c2
xor ebx, ebx
mov dword [esp + 0x38], ebx
cmp eax, esi
jbe 0x4978cd
mov eax, esi
mov dword [esp + 0xfc], eax
cmp ebx, ebp
je 0x4978e3
push eax
lea eax, [esp + 0xa4]
push ebx
push eax
call fcn.00543d00
add esp, 0xc
call fcn.00407d90
mov ebp, eax
mov dword [esp + 0x28], ebp
test ebp, ebp
je 0x497ecf
call fcn.00408060
mov ebx, eax
test ebx, ebx
je 0x497ec6
push ebx
call fcn.004080f0
push ebx
call fcn.00408180
push ebx
mov dword [esp + 0x1c], eax
call fcn.00408180
push ebx
mov dword [esp + 0x54], eax
call fcn.00408180
push ebx
mov dword [esp + 0x40], eax
call fcn.00408180
push ebx
mov dword [esp + 0x34], eax
call fcn.00408180
push ebx
mov dword [esp + 0x74], eax
call fcn.00408180
push ebx
mov dword [esp + 0x5c], eax
call fcn.00408180
push ebx
mov dword [esp + 0x74], eax
call fcn.00408180
mov ebp, eax
lea eax, [edi - 1]
add esp, 0x24
push eax
mov dword [esp + 0x1c], ebp
call fcn.00401270
push eax
push ebp
call fcn.0040e480
add esp, 0xc
test eax, eax
je 0x497eb3
jmp 0x497980
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x14]
push edi
push 0
push ecx
call fcn.004119c0
inc edi
add esp, 0xc
mov dword [esp + 0x40], edi
test eax, eax
je 0x497eb3
xor edi, edi
cmp dword [esp + 0xfc], edi
je 0x4979bb
cmp dword [esp + 0x38], edi
je 0x4979bb
mov dword [esp + 0xfc], edi
jmp 0x4979d9
lea edx, [esp + 0xa0]
push esi
push edx
call fcn.0040f500
add esp, 8
test eax, eax
jle 0x497eb3
mov edi, 1
push esi
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x88]
push ecx
call fcn.00543d00
push esi
lea edx, [esp + 0xb0]
push edx
lea eax, [esp + 0xd4]
push eax
call fcn.00543d00
lea eax, [esi - 1]
add esp, 0x18
test eax, eax
js 0x497a1c
nop
inc byte [esp + eax + 0x80]
jne 0x497a1c
dec eax
jns 0x497a10
mov ecx, dword [esp + 0x20]
push 0
push ecx
push 0
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0xb0]
push esi
push eax
call fcn.0044cbb0
add esp, 0x18
test eax, eax
je 0x497eb3
mov ecx, dword [esp + 0x20]
push 0
push ecx
push 0
lea edx, [esp + 0xcc]
push edx
lea eax, [esp + 0x90]
push esi
push eax
call fcn.0044cbb0
add esp, 0x18
test eax, eax
je 0x497eb3
xor eax, eax
test esi, esi
jle 0x497a83
mov cl, byte [esp + eax + 0xc0]
xor byte [esp + eax + 0x60], cl
inc eax
cmp eax, esi
jl 0x497a73
mov edx, dword [esp + 0x1c]
or byte [esp + 0x60], 0x80
or byte [esp + esi + 0x5f], 1
push edx
lea eax, [esp + 0x64]
push esi
push eax
call fcn.00401660
add esp, 0xc
test eax, eax
je 0x497eb3
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push ebp
push edi
push ebx
push 0x32
push ecx
call fcn.00411e20
add esp, 0x14
test eax, eax
jg 0x497acd
je 0x497980
jmp 0x497eb3
push 0
push 2
push ebp
call fcn.004119c0
add esp, 0xc
test eax, eax
je 0x497eb3
push 0
mov edx, ebp
push 3
push edx
call fcn.004119c0
add esp, 0xc
test eax, eax
je 0x497eb3
mov ecx, dword [esp + 0xec]
lea ecx, [ecx - 1]
mov eax, 0xcccccccd
mul ecx
mov ebp, edx
mov dword [esp + 0x24], 0
shr ebp, 7
mov eax, dword [esp + 0x24]
test eax, eax
je 0x497b37
mov edx, dword [esp + 0x14]
push eax
push 0
push edx
call fcn.004119c0
add esp, 0xc
test eax, eax
je 0x497eb3
mov eax, dword [esp + 0x2c]
push 0
push eax
call fcn.00401600
add esp, 8
xor edi, edi
test ebp, ebp
js 0x497bea
lea eax, [esi - 1]
test eax, eax
js 0x497b63
inc byte [esp + eax + 0x80]
jne 0x497b63
dec eax
jns 0x497b57
mov ecx, dword [esp + 0x20]
push 0
push ecx
push 0
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x90]
push esi
push eax
call fcn.0044cbb0
add esp, 0x18
test eax, eax
je 0x497eb3
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x64]
push esi
push edx
call fcn.00401660
add esp, 0xc
test eax, eax
je 0x497eb3
lea eax, [esi*8]
imul eax, edi
push eax
mov eax, dword [esp + 0x14]
push eax
push eax
call fcn.0040e480
add esp, 0xc
test eax, eax
je 0x497eb3
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
push ecx
push eax
push eax
call fcn.0040f920
add esp, 0xc
test eax, eax
je 0x497eb3
inc edi
cmp edi, ebp
jle 0x497b50
mov eax, dword [esp + 0xec]
mov edi, dword [esp + 0x2c]
dec eax
push eax
push edi
call fcn.00401970
add esp, 8
test eax, eax
je 0x497eb3
push edi
mov edi, dword [esp + 0x5c]
push edi
call fcn.00401540
add esp, 8
test eax, eax
je 0x497eb3
mov edx, dword [esp + 0x18]
push edx
push edi
push edi
call fcn.0040f920
add esp, 0xc
test eax, eax
je 0x497eb3
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0040e330
add esp, 8
test eax, eax
je 0x497eb3
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x3c]
push ebx
push edx
push edi
push eax
push 0
call fcn.0040f9b0
add esp, 0x14
test eax, eax
je 0x497eb3
call fcn.00401270
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x10]
push eax
push ecx
push edx
call fcn.0040f850
add esp, 0xc
test eax, eax
je 0x497eb3
mov eax, dword [esp + 0x10]
push eax
push edi
mov edi, dword [esp + 0x58]
push edi
call fcn.0040f850
add esp, 0xc
test eax, eax
je 0x497eb3
mov ecx, dword [esp + 0x18]
push ecx
push edi
call fcn.00401810
add esp, 8
test eax, eax
js 0x497cd7
mov edx, dword [esp + 0x14]
push edx
push 1
push ebx
push 0x32
push edi
call fcn.00411e20
add esp, 0x14
test eax, eax
jg 0x497cf0
jne 0x497eb3
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, 0x1000
jl 0x497b17
jmp 0x497980
mov eax, dword [esp + 0x14]
push 1
push 2
push eax
call fcn.004119c0
add esp, 0xc
test eax, eax
je 0x497eb3
call fcn.00401270
mov ebp, dword [esp + 0x18]
push eax
push edi
push ebp
call fcn.0040f850
add esp, 0xc
test eax, eax
je 0x497eb3
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
push ebx
push ecx
push ebp
push 0
push edx
call fcn.0040f9b0
add esp, 0x14
test eax, eax
je 0x497eb3
push 2
push ebp
call fcn.00401600
add esp, 8
test eax, eax
je 0x497eb3
mov eax, dword [esp + 0x28]
push ebx
push edi
push eax
call fcn.004079f0
add esp, 0xc
test eax, eax
je 0x497eb3
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
push ecx
push ebx
push edi
push edx
mov eax, ebp
mov ebp, dword [esp + 0x54]
push eax
push ebp
call fcn.00409140
add esp, 0x18
test eax, eax
je 0x497eb3
cmp dword [ebp + 4], 1
jne 0x497de8
mov ecx, dword [ebp]
cmp dword [ecx], 1
jne 0x497de8
cmp dword [ebp + 0xc], 0
jne 0x497de8
call fcn.00401270
push eax
mov eax, dword [esp + 0x1c]
push eax
push eax
call fcn.0040f920
add esp, 0xc
test eax, eax
je 0x497eb3
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
inc dword [esp + 0x30]
push edx
push ebx
push edi
push eax
push ecx
push ebp
call fcn.00409140
add esp, 0x18
test eax, eax
jne 0x497d91
jmp 0x497eb3
mov edx, dword [esp + 0x14]
push 1
push 3
push edx
call fcn.004119c0
add esp, 0xc
test eax, eax
je 0x497eb3
mov ebp, dword [esp + 0x5c]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x34], 1
test eax, eax
je 0x497e1d
push eax
call fcn.00401360
add esp, 4
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x497e2d
push eax
call fcn.00401360
add esp, 4
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x497e3d
push eax
call fcn.00401360
add esp, 4
push edi
call fcn.00401c90
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x20]
push eax
call fcn.00401c90
mov ecx, dword [esp + 0x4c]
push ecx
mov dword [ebp + 0x10], eax
call fcn.00401c90
add esp, 0xc
cmp dword [ebp + 0xc], 0
mov dword [ebp + 0x14], eax
je 0x497e73
cmp dword [ebp + 0x10], 0
je 0x497e73
test eax, eax
jne 0x497e7d
mov dword [esp + 0x34], 0
jmp 0x497eb3
mov eax, dword [esp + 0x48]
test eax, eax
je 0x497e8b
mov edx, dword [esp + 0x24]
mov dword [eax], edx
mov eax, dword [esp + 0x54]
test eax, eax
je 0x497e99
mov ecx, dword [esp + 0x30]
mov dword [eax], ecx
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x497eb3
push esi
lea edx, [esp + 0xa4]
push edx
push eax
call fcn.00543d00
add esp, 0xc
push ebx
call fcn.00408140
push ebx
call fcn.004080c0
mov ebp, dword [esp + 0x30]
add esp, 8
push ebp
call fcn.004079b0
add esp, 4
mov ecx, dword [esp + 0xe0]
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0054546b
add esp, 0xd4
ret