Function at 0x30054980
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x30215e88]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
push 0x20
push 8
push dword [0x30267480]
mov ebx, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x1c]
mov esi, ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x300549d3
lea eax, [edi + 1]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
xor eax, eax
mov ecx, 4
mov word [edi + 0xa], ax
cmp edx, ecx
movzx eax, dl
mov dword [edi + 0xc], 0xffffffff
cmovl ecx, eax
mov dword [edi + 0x10], 0xffffffff
xor edx, edx
mov dword [edi + 0x14], 0xffffffff
mov dword [edi + 0x18], 0xffffffff
mov dword [edi + 0x1c], 0
mov byte [edi], cl
test cl, cl
je 0x30054a28
mov al, byte [ebx + edx]
mov byte [edi + edx + 1], al
mov byte [edi + edx + 5], 0xff
inc edx
movzx eax, byte [edi]
cmp edx, eax
jl 0x30054a14
mov eax, dword [esi]
push edi
push esi
call eax
mov esi, 4
mov byte [ebp - 0x10], 4
add esp, 8
mov dword [ebp - 0xb], 0xffffffff
mov ebx, eax
cmp dword [ebp + 8], esi
jle 0x30054a8f
cmp ebx, 0xff
jge 0x30054a8f
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 0x10], 4
mov eax, dword [eax + esi - 3]
mov dword [ebp - 0xf], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax]
call eax
add esp, 8
cmp eax, ebx
jle 0x30054a89
movq xmm0, qword [ebp - 0x10]
mov ebx, eax
movq qword [edi], xmm0
mov cl, byte [ebp - 8]
mov byte [edi + 8], cl
lea ecx, [esi - 3]
mov word [edi + 0xa], cx
inc esi
cmp esi, dword [ebp + 8]
jl 0x30054a48
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x24]
mov dword [esi], edi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [eax], ebx
mov ebx, dword [ebp + 0xc]
test bl, 0x10
je 0x30054b63
mov ecx, dword [esi]
lea edx, [ebp - 0x14]
call fcn.30053b20
mov ecx, dword [esi]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x30054b11
test ecx, ecx
je 0x30054ad6
mov esi, dword [ecx + 0x1c]
push ecx
push 0
push dword [0x30267480]
call edi
mov ecx, esi
test esi, esi
jne 0x30054ac2
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x30054af4
nop dword [eax]
mov esi, dword [eax + 0x1c]
push eax
push 0
push dword [0x30267480]
call edi
mov eax, esi
test esi, esi
jne 0x30054ae0
mov eax, dword [ebp - 0x18]
mov dword [eax], 0
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret
test bl, 8
je 0x30054b43
test ecx, ecx
jne 0x30054b21
mov ecx, dword [ebp - 0x14]
mov dword [esi], ecx
jmp 0x30054b63
mov eax, dword [ecx + 0x1c]
mov edx, ecx
test eax, eax
je 0x30054b39
nop word [eax + eax]
mov edx, eax
mov eax, dword [edx + 0x1c]
test eax, eax
jne 0x30054b30
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x1c], eax
mov dword [esi], ecx
jmp 0x30054b63
test ecx, ecx
je 0x30054b5e
mov esi, dword [ecx + 0x1c]
push ecx
push 0
push dword [0x30267480]
call edi
mov ecx, esi
test esi, esi
jne 0x30054b47
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
test bl, 4
je 0x30054bf6
mov ecx, dword [esi]
lea edx, [ebp - 0x14]
call fcn.300539c0
mov ecx, dword [esi]
mov edi, eax
test edi, edi
je 0x30054bd3
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test ecx, ecx
je 0x30054b9c
mov esi, dword [ecx + 0x1c]
push ecx
push 0
push dword [0x30267480]
call ebx
mov ecx, esi
test esi, esi
jne 0x30054b88
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x30054bb7
mov esi, dword [eax + 0x1c]
push eax
push 0
push dword [0x30267480]
call ebx
mov eax, esi
test esi, esi
jne 0x30054ba3
mov eax, dword [ebp - 0x18]
mov dword [eax], 0
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret
test ecx, ecx
jne 0x30054bdc
mov ecx, dword [ebp - 0x14]
jmp 0x30054bf4
mov eax, dword [ecx + 0x1c]
mov edx, ecx
test eax, eax
je 0x30054bee
mov edx, eax
mov eax, dword [edx + 0x1c]
test eax, eax
jne 0x30054be5
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x1c], eax
mov dword [esi], ecx
test ebx, 0x80000
je 0x30054d6d
mov esi, dword [esi]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
test esi, esi
je 0x30054cda
movzx ecx, byte [ebp + 0x10]
movzx eax, byte [ebp + 0x11]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
nop
mov dword [ebp - 0x1c], ecx
cmp ecx, eax
ja 0x30054ccc
nop dword [eax + eax]
push 0x20
push 8
push dword [0x30267480]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x30054d40
mov bl, byte [esi]
test bl, bl
je 0x30054c7f
neg eax
lea ecx, [edi + 1]
lea edx, [eax - 1]
lea edi, [esi + eax]
mov dword [ebp - 0x28], edx
mov al, byte [ecx + edi]
xor al, byte [ebp - 0x1c]
mov byte [ecx], al
mov byte [ecx + 4], 0xff
inc ecx
mov bl, byte [esi]
add edx, ecx
movzx eax, bl
cmp edx, eax
mov edx, dword [ebp - 0x28]
jl 0x30054c61
mov edi, dword [ebp - 0x2c]
mov ecx, 4
movzx eax, bl
cmp bl, cl
mov ebx, dword [ebp - 0x1c]
cmovb ecx, eax
inc ebx
mov byte [edi], cl
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [edi + 0x14], eax
mov eax, dword [esi + 0x18]
mov dword [edi + 0x18], eax
mov ax, word [esi + 0xa]
mov word [edi + 0xa], ax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], ebx
cmp ebx, eax
jle 0x30054c30
mov ecx, dword [ebp - 0x34]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x30054c20
mov ebx, dword [ebp - 0x14]
xor edi, edi
mov esi, dword [ebp - 0x18]
mov eax, dword [esi]
test edi, edi
je 0x30054d4a
test eax, eax
je 0x30054d08
nop dword [eax]
mov esi, dword [eax + 0x1c]
push eax
push 0
push dword [0x30267480]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
test esi, esi
jne 0x30054cf0
test ebx, ebx
je 0x30054bb7
mov esi, dword [ebx + 0x1c]
push ebx
push 0
push dword [0x30267480]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, esi
test esi, esi
jne 0x30054d10
mov eax, dword [ebp - 0x18]
mov dword [eax], esi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x14]
mov edi, 1
jmp 0x30054cdc
test eax, eax
je 0x30054d6b
nop
mov esi, dword [eax + 0x1c]
push eax
push 0
push dword [0x30267480]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
test esi, esi
jne 0x30054d50
mov esi, dword [ebp - 0x18]
mov dword [esi], ebx
mov esi, dword [esi]
test esi, esi
je 0x30054d8f
mov eax, dword [ebp - 0x20]
push esi
push eax
mov eax, dword [eax]
call eax
mov ecx, dword [ebp - 0x24]
add esp, 8
cmp eax, dword [ecx]
jge 0x30054d88
mov dword [ecx], eax
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x30054d73
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.30159c2d
mov esp, ebp
pop ebp
ret