Function at 0x4d4200
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov ebx, dword [esp + 0xc0]
mov esi, dword [esp + 0xc4]
mov ebp, dword [esp + 0xcc]
test ebp, ebp
je 0x4d4460
mov edi, dword [ebx]
cmp edi, ebp
je 0x4d4450
test esi, esi
je 0x4d426f
mov ecx, dword [esp + 0xc8]
test ecx, ecx
js 0x4d426f
mov dword [ebx], ebp
mov dword [esp], ebp
call fcn.00503ed0
cmp eax, 0x80
jg 0x4d42e0
cmp dword [esp + 0xc8], eax
jg 0x4d4280
cmp dword [esp + 0xc8], 0x80
jbe 0x4d4320
xor eax, eax
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebx + 4]
mov eax, dword [esp + 0xd0]
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov dword [esp], edi
call fcn.004f6310
test eax, eax
je 0x4d426f
mov eax, dword [esp + 0xc8]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.004f65d0
test eax, eax
je 0x4d426f
lea eax, [ebx + 0x4c]
mov dword [esp + 8], eax
lea eax, [ebx + 0x50]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.004f65e0
test eax, eax
je 0x4d426f
mov eax, dword [ebx + 0x4c]
jmp 0x4d434a
mov dword [esp + 0x1c], eax
mov dword [esp + 8], str.j____int_sizeof_ctx__key_
mov dword [esp + 4], 0x74
mov dword [esp], str.hmac.c
call fcn.004bc160
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0xc8], eax
jle 0x4d425e
jmp 0x4d4280
lea eax, [ebx + 0x50]
cmp dword [esp + 0xc8], 4
jae 0x4d44a0
mov edx, dword [esp + 0xc8]
test edx, edx
jne 0x4d44fe
mov eax, dword [esp + 0xc8]
mov dword [ebx + 0x4c], eax
cmp eax, 0x80
je 0x4d4380
mov ecx, pe_nt_image_headers32
sub ecx, eax
lea eax, [ebx + eax + 0x50]
cmp ecx, 4
jae 0x4d44d8
test ecx, ecx
je 0x4d4380
mov byte [eax], 0
test cl, 2
je 0x4d4380
mov word [eax + ecx - 2], 0
nop
lea esi, [esi]
mov edi, ebp
xor eax, eax
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebx + eax + 0x50]
xor edx, 0x36363636
mov dword [esp + eax + 0x20], edx
add eax, 4
cmp eax, 0x80
jne 0x4d4390
lea esi, [ebx + 0x1c]
mov eax, dword [esp + 0xd0]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.004f6310
test eax, eax
je 0x4d426f
mov dword [esp], edi
call fcn.00503ed0
mov dword [esp + 8], eax
lea eax, [esp + 0x20]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004f65d0
test eax, eax
je 0x4d426f
xor eax, eax
mov edx, dword [ebx + eax + 0x50]
xor edx, 0x5c5c5c5c
mov dword [esp + eax + 0x20], edx
add eax, 4
cmp eax, 0x80
jne 0x4d43f0
lea ebp, [ebx + 0x34]
mov eax, dword [esp + 0xd0]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], ebp
call fcn.004f6310
test eax, eax
je 0x4d426f
mov dword [esp], edi
call fcn.00503ed0
mov dword [esp + 8], eax
lea eax, [esp + 0x20]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004f65d0
test eax, eax
jne 0x4d4475
jmp 0x4d426f
test esi, esi
je 0x4d4382
jmp 0x4d4242
mov ebp, dword [ebx]
test ebp, ebp
je 0x4d426f
test esi, esi
jne 0x4d4242
lea esi, [ebx + 0x1c]
mov dword [esp + 4], esi
add ebx, 4
mov dword [esp], ebx
call fcn.004f6bc0
test eax, eax
setne al
and eax, 0xff
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esi]
mov dword [ebx + 0x50], ecx
mov ecx, dword [esp + 0xc8]
mov ecx, dword [esi + ecx - 4]
mov edi, dword [esp + 0xc8]
mov dword [eax + edi - 4], ecx
lea edi, [ebx + 0x54]
and edi, 0xfffffffc
sub eax, edi
sub esi, eax
add eax, dword [esp + 0xc8]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x4d4340
mov dword [eax], 0
mov dword [eax + ecx - 4], 0
lea edi, [eax + 4]
and edi, 0xfffffffc
sub eax, edi
add ecx, eax
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, ebp
jmp 0x4d4382
mov cl, byte [esi]
mov byte [ebx + 0x50], cl
test byte [esp + 0xc8], 2
je 0x4d4340
mov ecx, dword [esp + 0xc8]
mov cx, word [esi + ecx - 2]
mov edi, dword [esp + 0xc8]
mov word [eax + edi - 2], cx
jmp 0x4d4340