Function at 0x4d1aa8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff4c
push ebx
xor ebx, ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4d1e6c
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
add eax, 8
xor ecx, ecx
mov edx, 0x2ae4c
call fcn.00403930
mov eax, dword [ebp - 4]
push dword [eax + 4]
mov eax, dword [ebp - 4]
push dword [eax + 0x2ae90]
push 0x4d1e80
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.0040538c
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2ae90]
call fcn.0040903c
mov eax, dword [ebp - 0x30]
call fcn.00409bd8
test al, al
je 0x4d1e51
mov eax, dword [ebp - 0x34]
mov edx, 0x4d1e90
call fcn.00405420
je 0x4d1b74
mov eax, dword [ebp - 0x34]
mov edx, 0x4d1ea0
call fcn.00405420
je 0x4d1b74
mov eax, dword [ebp - 0x34]
mov edx, 0x4d1eb0
call fcn.00405420
je 0x4d1b74
mov eax, dword [ebp - 0x34]
mov edx, 0x4d1ec0
call fcn.00405420
je 0x4d1b74
mov eax, dword [ebp - 0x34]
mov edx, 0x4d1ed0
call fcn.00405420
jne 0x4d1d42
mov edx, 0x40
mov eax, dword [ebp - 0x30]
call fcn.00409a8c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4d1e51
lea edx, [ebp - 0xb4]
mov ecx, 0x40
mov eax, dword [ebp - 0x10]
call fcn.00409ae4
mov ax, word [ebp - 0x93]
xor word [ebp - 0x95], ax
mov ax, word [ebp - 0x93]
xor word [ebp - 0x91], ax
mov eax, dword [ebp - 8]
dec eax
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
add eax, 2
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
dec eax
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
add eax, 2
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x20], 0
jge 0x4d1c00
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x28], 0
jge 0x4d1c0b
xor eax, eax
mov dword [ebp - 0x28], eax
movzx eax, word [ebp - 0x91]
cmp eax, dword [ebp - 0x2c]
jg 0x4d1c21
movzx eax, word [ebp - 0x91]
mov dword [ebp - 0x2c], eax
movzx eax, word [ebp - 0x91]
shl eax, 2
lea eax, [eax + eax*2]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
dec edx
sub edx, eax
jl 0x4d1d34
inc edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
sub edx, eax
jl 0x4d1d28
inc edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x1c]
imul edx, dword [ebp - 0x14]
add edx, 0x40
mov eax, dword [ebp - 0x18]
shl eax, 2
lea eax, [eax + eax*2]
add edx, eax
xor ecx, ecx
mov eax, dword [ebp - 0x10]
call fcn.00409b3c
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x28]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0x20]
imul edx, edx, 0x16b
mov ecx, dword [ebp - 4]
lea edx, [ecx + edx*4]
lea edx, [edx + eax*4 + 8]
mov ecx, 0xc
mov eax, dword [ebp - 0x10]
call fcn.00409ae4
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x28]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0x20]
imul edx, edx, 0x16b
mov ecx, dword [ebp - 4]
lea edx, [ecx + edx*4]
mov cx, word [ebp - 0x93]
xor word [edx + eax*4 + 8], cx
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x28]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0x20]
imul edx, edx, 0x16b
mov ecx, dword [ebp - 4]
lea edx, [ecx + edx*4]
mov cx, word [ebp - 0x93]
xor word [edx + eax*4 + 0xa], cx
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x28]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0x20]
imul edx, edx, 0x16b
mov ecx, dword [ebp - 4]
lea edx, [ecx + edx*4]
mov cx, word [ebp - 0x93]
xor word [edx + eax*4 + 0xc], cx
inc dword [ebp - 0x18]
dec dword [ebp - 0x3c]
jne 0x4d1c5c
inc dword [ebp - 0x14]
dec dword [ebp - 0x38]
jne 0x4d1c47
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x4d1e51
mov edx, 0x40
mov eax, dword [ebp - 0x30]
call fcn.00409a8c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4d1e51
lea edx, [ebp - 0x74]
mov ecx, 0x34
mov eax, dword [ebp - 0x10]
call fcn.00409ae4
mov eax, dword [ebp - 8]
dec eax
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
add eax, 2
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
dec eax
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
add eax, 2
shl eax, 3
lea eax, [eax + eax*4]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x20], 0
jge 0x4d1daf
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x28], 0
jge 0x4d1dba
xor eax, eax
mov dword [ebp - 0x28], eax
movzx eax, word [ebp - 0x72]
cmp eax, dword [ebp - 0x2c]
jg 0x4d1dca
movzx eax, word [ebp - 0x72]
mov dword [ebp - 0x2c], eax
movzx eax, word [ebp - 0x72]
shl eax, 2
lea eax, [eax + eax*2]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
dec edx
sub edx, eax
jl 0x4d1e48
inc edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jl 0x4d1e40
movzx eax, word [ebp - 0x74]
cmp eax, dword [ebp - 0x14]
jle 0x4d1e40
mov edx, dword [ebp - 0x1c]
imul edx, dword [ebp - 0x14]
add edx, 0x34
mov eax, dword [ebp - 0x28]
shl eax, 2
lea eax, [eax + eax*2]
add edx, eax
xor ecx, ecx
mov eax, dword [ebp - 0x10]
call fcn.00409b3c
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x28]
mov ecx, eax
shl ecx, 2
lea ecx, [ecx + ecx*2]
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x20]
imul eax, eax, 0x16b
mov edx, dword [ebp - 4]
lea edx, [edx + eax*4 + 8]
mov eax, dword [ebp - 0x10]
call fcn.00409ae4
inc dword [ebp - 0x14]
dec dword [ebp - 0x38]
jne 0x4d1de9
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d1e73
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.0040501c
ret