Function at 0x4d5b40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4672de
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x83c
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x10], esp
push 0x5c
push esi
mov byte [ebp - 0x11], 0
call 0x5105e0
add esp, 8
mov edi, eax
push esi
call dword [fcn.004682a8]
mov ecx, edi
sub ecx, esi
inc ecx
cmp ecx, eax
jne 0x4d5b8b
mov byte [edi], 0
mov edx, dword [ebp + 0xc]
push 0x5c
push edx
call 0x5105e0
add esp, 8
test eax, eax
je 0x4d63a2
push eax
push esi
lea eax, [ebp - 0x440]
push 0x4822c8
push eax
call dword [fcn.00468538]
mov ebx, dword [ebp + 0x14]
add esp, 0x10
cmp byte [ebx], 0
je 0x4d5bcc
mov al, byte [ebp - 0x11]
mov edi, ebx
inc al
mov byte [ebp - 0x11], al
jmp 0x4d5bcf
mov edi, dword [ebp + 0x18]
lea ecx, [ebp - 0x6c]
call fcn.004efcb0
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0
call fcn.004efd40
test eax, eax
je 0x4d6393
mov al, byte [ebx]
mov esi, dword [ebp + 0x20]
test al, al
push esi
je 0x4d5c13
mov ecx, dword [ebp + 0x18]
push ebx
push ecx
push 0x4822a4
push 0xffffffffffffffff
push 0x49d558
call fcn.004eb090
add esp, 0x18
jmp 0x4d5c2b
mov edx, dword [ebp + 0x18]
push edx
push 0x48228c
push 0xffffffffffffffff
push 0x49d558
call fcn.004eb090
add esp, 0x14
dec esi
lea ecx, [ebp - 0x6c]
push esi
push edi
call fcn.004eff20
test eax, eax
je 0x4d6393
push 1
lea ecx, [ebp - 0x6c]
call fcn.004efe60
mov ebx, 1
push ebx
call fcn.004bc150
add esp, 4
push eax
lea eax, [ebp - 0x9c]
push eax
call dword [fcn.004682ac]
lea ecx, [ebp - 0xd0]
lea edx, [ebp - 0xd4]
push ecx
lea eax, [ebp - 0xd8]
push edx
push eax
lea ecx, [ebp - 0x9c]
push 0x482134
push ecx
call 0x512389
mov esi, dword [fcn.004682a8]
add esp, 0x14
lea edx, [ebp - 0xc0]
push 0xc
push edx
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.004f02b0
lea eax, [ebp - 0x84]
lea ecx, [ebp - 0x8c]
push eax
lea edx, [ebp - 0x88]
push ecx
push edx
lea eax, [ebp - 0xc0]
push 0x482134
push eax
mov dword [ebp - 4], 0
mov byte [ebp - 0xb4], 0
call 0x512389
mov eax, dword [ebp - 0x88]
mov edx, dword [ebp - 0x8c]
add esp, 0x14
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
lea eax, [edx + ecx*4]
mov ecx, dword [ebp - 0x84]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edi, [ecx + eax*4]
cmp edi, 0x778b
jl 0x4d5d85
lea edx, [ebp + 0x10]
push 4
push edx
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x6c]
mov esi, eax
and eax, 0xffff
mov dword [ebp + 0x10], eax
push eax
lea eax, [ebp - 0x840]
push eax
shr esi, 0x10
call fcn.004f02b0
cmp edi, 0x778d
jl 0x4d5d61
test esi, esi
je 0x4d5d61
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x840]
dec ecx
lea eax, [ebp - 0x840]
push ecx
push esi
push edx
push eax
call fcn.004ef350
add esp, 0x10
test ebx, ebx
je 0x4d5e56
mov al, byte [ebp - 0x11]
test al, al
je 0x4d5d7f
mov ecx, dword [ebp + 0x14]
push ecx
push 0x49cea4
call dword [fcn.004682ac]
mov esi, dword [fcn.004682a8]
test ebx, ebx
je 0x4d5e56
mov al, byte [ebp - 0x11]
test al, al
je 0x4d5e56
lea edx, [ebp - 0xc0]
push edx
call esi
cmp byte [ebp + eax - 0xc1], 0x47
jne 0x4d638b
lea eax, [ebp - 0x9c]
push 0x48211c
push eax
call dword [fcn.004682b0]
lea ecx, [ebp - 0x9c]
push ecx
call esi
lea edx, [ebp - 0x9c]
push 0xc
push edx
lea ecx, [ebp - 0x6c]
mov dword [ebp + 0x20], eax
call fcn.004f0190
mov eax, dword [ebp + 0x20]
lea ecx, [ebp - 0x11]
push 1
push ecx
lea ecx, [ebp - 0x6c]
mov byte [ebp + eax - 0x9c], 0
call fcn.004f0190
cmp byte [ebp - 0x11], 2
jne 0x4d5e22
mov edi, dword [ebp + 0x14]
push edi
call esi
lea edx, [ebp + 0x20]
inc eax
push 4
push edx
lea ecx, [ebp - 0x6c]
mov dword [ebp + 0x20], eax
call fcn.004f0190
mov eax, dword [ebp + 0x20]
lea ecx, [ebp - 0x6c]
push eax
push edi
call fcn.004f0190
mov edi, dword [ebp + 0x18]
push edi
call esi
lea ecx, [ebp + 0x20]
push 4
inc eax
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp + 0x20], eax
call fcn.004f0190
mov edx, dword [ebp + 0x20]
lea ecx, [ebp - 0x6c]
push edx
push edi
call fcn.004f0190
lea ecx, [ebp - 0x6c]
call fcn.004f0200
xor ebx, ebx
jmp 0x4d5c93
lea eax, [ebp - 0x9c]
push 0xc
push eax
lea ecx, [ebp - 0x6c]
call fcn.004f0190
lea ecx, [ebp - 0x6c]
call fcn.004f0200
lea ecx, [ebp - 0x80]
push 4
push ecx
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 3
call fcn.004f02b0
mov eax, dword [ebp - 0x80]
mov dword [ebp - 4], 0
sub eax, 0
je 0x4d6510
sub eax, 2
je 0x4d5f9e
dec eax
jne 0x4d638b
mov edx, dword [0x49d56c]
mov al, byte [edx + 0x446]
test al, al
je 0x4d6393
lea eax, [ebp - 0xec]
push eax
call fcn.004eb1d0
lea ecx, [ebp - 0xb0]
lea edx, [ebp - 0x13c]
push ecx
push edx
call fcn.004eac80
add esp, 0xc
call fcn.004ea750
test eax, eax
je 0x4d5efa
push eax
call dword [fcn.004685c8]
push eax
lea eax, [ebp - 0xb0]
push eax
call dword [fcn.004682ac]
jmp 0x4d5f12
lea ecx, [ebp - 0xb0]
push 0x2c
push ecx
call 0x50f970
add esp, 8
test eax, eax
je 0x4d5f12
mov byte [eax], 0
lea edx, [ebp - 0x13c]
push 0x28
push edx
call fcn.004d89f0
add esp, 8
lea eax, [ebp - 0x13c]
lea ecx, [ebp - 0xb0]
lea edx, [ebp - 0xec]
push eax
mov eax, dword [0x49d56c]
push ecx
push edx
mov ecx, dword [eax + 0x450]
mov edx, dword [eax + 0x454]
push ecx
push edx
lea eax, [ebp - 0x23c]
push 0x482264
push eax
call dword [fcn.00468538]
add esp, 0x1c
lea ecx, [ebp - 0x23c]
push ecx
call dword [fcn.004682a8]
lea edx, [ebp + 0x14]
push 4
push edx
lea ecx, [ebp - 0x6c]
mov dword [ebp + 0x14], eax
call fcn.004f0190
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x23c]
push eax
push ecx
lea ecx, [ebp - 0x6c]
call fcn.004f0190
lea ecx, [ebp - 0x6c]
call fcn.004f0200
jmp 0x4d603a
push 0x47c
call fcn.004bfa70
add esp, 4
test eax, eax
jne 0x4d638b
lea eax, [ebp - 0x114]
push 0x10
push eax
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov ecx, dword [ebp + 0x1c]
push 0x27
lea edx, [ebp - 0x100]
push ecx
push edx
call fcn.004efc40
mov al, byte [ebp - 0x100]
add esp, 0xc
test al, al
je 0x4d638b
lea eax, [ebp - 0x100]
push eax
call dword [fcn.004682a8]
cmp eax, 0x23
jle 0x4d6000
mov byte [ebp - 0xdc], 0
xor ecx, ecx
cmp edi, 0xc350
setg cl
lea edx, [ebp - 0x100]
push ecx
lea eax, [ebp - 0x114]
push edx
push eax
call fcn.004da0d0
add esp, 0xc
lea ecx, [ebp - 0x114]
mov byte [ebp - 0x100], 0
push 0x10
push ecx
lea ecx, [ebp - 0x6c]
call fcn.004f0260
lea edx, [ebp - 0x70]
push 4
push edx
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov eax, dword [ebp - 0x70]
and eax, 3
jbe 0x4d6059
cmp eax, 2
jbe 0x4d638b
lea eax, [ebp - 0x440]
push eax
call dword [fcn.004682a8]
mov esi, eax
mov eax, dword [ebp + 8]
inc esi
dec eax
je 0x4d61ab
dec eax
jne 0x4d61b1
mov byte [ebp - 0x24], 0x5a
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x7c]
push eax
push ecx
call fcn.004e87c0
mov edx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x78]
add esp, 8
mov dword [ebp + esi - 0x440], edx
mov dword [ebp + esi - 0x43c], eax
add esi, 8
lea ecx, [ebp - 0x24]
push 8
mov dword [ebp - 0x20], esi
push ecx
lea ecx, [ebp - 0x6c]
call fcn.004f0190
lea edx, [ebp - 0x440]
push esi
push edx
lea ecx, [ebp - 0x6c]
call fcn.004f0190
lea ecx, [ebp - 0x6c]
call fcn.004f0200
push 1
call dword [fcn.00468264]
push eax
call dword [fcn.00468268]
cmp dword [ebp + 8], 1
jne 0x4d6319
lea eax, [ebp - 0x24]
push 8
push eax
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov esi, dword [ebp - 0x20]
lea ecx, [ebp - 0x240]
push esi
push ecx
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov al, byte [ebp - 0x240]
test al, al
je 0x4d638b
lea edx, [ebp - 0x240]
xor edi, edi
push edx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
call dword [fcn.004682a8]
inc eax
cmp eax, esi
je 0x4d6144
mov eax, dword [ebp + esi - 0x248]
mov ecx, dword [ebp + esi - 0x244]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ecx
lea edx, [ebp + 0x1c]
push 4
push edx
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
lea eax, [ebp - 0x240]
push 0x482000
push eax
call 0x50f7b0
add esp, 8
cmp eax, edi
mov dword [ebp + 8], eax
je 0x4d638b
cmp dword [ebp + 0x1c], edi
je 0x4d62e7
push 0x40000
call 0x50f2e9
mov esi, eax
add esp, 4
test esi, esi
je 0x4d638b
push 0x80000
call 0x50f2e9
add esp, 4
mov dword [ebp + 0x18], eax
test eax, eax
jne 0x4d61e3
push esi
jmp 0x4d6383
mov byte [ebp - 0x24], 0x59
jmp 0x4d61bb
cmp byte [ebp - 0x24], 0x5a
je 0x4d607e
mov ebx, dword [ebp + 0xc]
push ebx
call dword [fcn.004682a8]
mov edi, eax
lea ecx, [ebp - 0x24]
inc edi
push 8
push ecx
lea ecx, [ebp - 0x6c]
lea eax, [edi + esi]
mov dword [ebp - 0x20], eax
call fcn.004f0190
push edi
push ebx
jmp 0x4d60ae
push 0x3e8
mov dword [ebp + 0x20], 0
call 0x511667
add esp, 4
mov dword [ebp - 0xa8], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
xor ecx, edx
mov byte [ebp - 4], 5
push ecx
lea ecx, [ebp - 0xa8]
call fcn.004edaa0
lea edx, [ebp + 0xf]
push 1
push edx
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
lea eax, [ebp + 0x10]
push 4
push eax
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov ecx, dword [ebp + 0x10]
push ecx
push esi
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov eax, dword [ebp + 0x10]
mov edi, esi
test eax, eax
lea ebx, [eax - 1]
je 0x4d6266
lea ecx, [ebp - 0xa8]
call fcn.004edb40
mov cl, byte [edi]
mov edx, ebx
xor cl, al
mov byte [edi], cl
inc edi
dec ebx
test edx, edx
jne 0x4d624a
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp + 0xf]
test cl, cl
je 0x4d628a
mov edi, dword [ebp + 0x18]
lea ecx, [ebp + 0x14]
push ecx
push edi
push eax
push esi
mov dword [ebp + 0x14], 0x80000
call fcn.004e69d0
add esp, 0x10
mov ecx, edi
jmp 0x4d6292
mov edi, dword [ebp + 0x18]
mov ecx, esi
mov dword [ebp + 0x14], eax
mov ebx, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
push ebx
push edx
push 1
push ecx
call 0x51209a
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
add eax, edx
add esp, 0x10
cmp eax, ecx
mov dword [ebp + 0x20], eax
jb 0x4d6215
push ebx
call 0x50f5cb
push esi
call 0x50f200
push edi
call 0x50f200
mov eax, dword [ebp - 0xa8]
add esp, 0xc
test eax, eax
mov byte [ebp - 4], 0
je 0x4d62e7
push eax
call 0x50f543
add esp, 4
mov eax, dword [ebp + 8]
push eax
call 0x50f54e
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov edx, eax
add esp, 4
or edx, ecx
je 0x4d64e6
push ecx
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.004e8800
add esp, 0xc
jmp 0x4d64e6
mov ecx, dword [ebp + 0xc]
push 0x473578
push ecx
call 0x50f7b0
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [ebp - 0x18], ebx
je 0x4d638b
push ebx
call fcn.004d0530
add esp, 4
lea edx, [ebp + 8]
lea ecx, [ebp - 0x6c]
mov dword [ebp + 8], eax
push 4
push edx
call fcn.004f0260
mov eax, dword [ebp + 8]
test eax, eax
je 0x4d64dd
push 0x10000
call 0x50f2e9
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp + 0x14], edi
je 0x4d638b
push 0x20000
call 0x50f2e9
add esp, 4
mov dword [ebp + 0x10], eax
test eax, eax
jne 0x4d63b6
push edi
call 0x50f200
add esp, 4
lea ecx, [ebp - 0x6c]
call fcn.004efef0
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0xffffffff
call fcn.004efd00
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x3e8
mov dword [ebp + 0xc], 0
call 0x511667
add esp, 4
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x78]
xor eax, edx
lea ecx, [ebp - 0xcc]
push eax
mov byte [ebp - 4], 6
call fcn.004edaa0
mov eax, dword [ebp + 8]
sub eax, dword [ebp + 0xc]
cmp eax, 0x10000
mov esi, eax
jb 0x4d63fc
mov esi, 0x10000
push ebx
push esi
push 1
push edi
call 0x511550
add esp, 0x10
cmp eax, esi
jne 0x4d64b4
mov edx, dword [ebp + 0x10]
lea ecx, [ebp + 0x20]
push ecx
push edx
push esi
push edi
call fcn.004e6570
mov eax, dword [ebp + 0x20]
add esp, 0x10
cmp eax, esi
jb 0x4d6438
mov ebx, dword [ebp + 0x14]
mov eax, esi
mov dword [ebp + 0x20], eax
mov byte [ebp + 0x1b], 0
jmp 0x4d643f
mov ebx, dword [ebp + 0x10]
mov byte [ebp + 0x1b], 1
lea ecx, [eax - 1]
mov edi, ebx
test eax, eax
mov dword [ebp + 0x1c], ecx
je 0x4d646a
lea ecx, [ebp - 0xcc]
call fcn.004edb40
mov cl, byte [edi]
xor cl, al
mov eax, dword [ebp + 0x1c]
mov byte [edi], cl
inc edi
mov edx, eax
dec eax
test edx, edx
mov dword [ebp + 0x1c], eax
jne 0x4d644b
lea eax, [ebp + 0x1b]
push 1
push eax
lea ecx, [ebp - 0x6c]
call fcn.004f0190
lea ecx, [ebp + 0x20]
push 4
push ecx
lea ecx, [ebp - 0x6c]
call fcn.004f0190
mov edx, dword [ebp + 0x20]
lea ecx, [ebp - 0x6c]
push edx
push ebx
call fcn.004f0190
lea ecx, [ebp - 0x6c]
call fcn.004f0200
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp - 0x18]
add ecx, esi
cmp ecx, eax
mov dword [ebp + 0xc], ecx
jb 0x4d63eb
push edi
call 0x50f200
mov eax, dword [ebp + 0x10]
push eax
call 0x50f200
mov eax, dword [ebp - 0xcc]
add esp, 8
test eax, eax
mov byte [ebp - 4], 0
je 0x4d64dd
push eax
call 0x50f543
add esp, 4
push ebx
call 0x50f54e
add esp, 4
lea ecx, [ebp - 0x6c]
call fcn.004efef0
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0xffffffff
call fcn.004efd00
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x74]
push 4
push ecx
lea ecx, [ebp - 0x6c]
call fcn.004f02b0
mov edx, dword [ebp - 0x74]
lea ecx, [ebp - 0x6c]
push edx
push 0x49cb88
call fcn.004f02b0
mov eax, dword [ebp - 0x74]
mov byte [eax + 0x49cb88], 0
jmp 0x4d638b