Function at 0x41f300
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xb4
mov eax, dword [esp + 0xb8]
push ebx
push ebp
push esi
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov ebp, dword [eax + 4]
mov esi, dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
mov ebx, dword [eax + 0x14]
push edi
mov edi, dword [eax + 8]
mov dword [esp + 0x14], ecx
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x10], edx
mov edx, dword [eax + 0x1c]
push 4
push ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
call esi
test eax, eax
jne 0x41f568
cmp dword [ebp], 0x474e5353
jne 0x41f568
mov eax, dword [esp + 0x10]
test eax, eax
je 0x41f392
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x41f392
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x41f382
pop edi
pop esi
pop ebp
mov eax, 0xc9
pop ebx
add esp, 0xb4
ret
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call esi
test eax, eax
je 0x41f3a2
pop edi
pop esi
pop ebp
mov eax, 0xc9
pop ebx
add esp, 0xb4
ret
test ebx, ebx
je 0x41f392
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41f392
cmp eax, ebx
ja 0x41f392
cmp ebx, 0x70
ja 0x41f558
cmp eax, 0x70
ja 0x41f558
lea edx, [esp + 0x30]
push edx
push edi
push ebp
call fcn.0041f580
add esp, 0xc
test eax, eax
jne 0x41f56d
mov al, bl
and al, 0xf
mov byte [esp + 0x24], al
mov edi, dword [esp + 0x24]
and edi, 0xff
sub ebx, edi
mov dword [esp + 0x28], edi
shr ebx, 4
mov cl, bl
xor bl, bl
test cl, cl
mov byte [esp + 0x2c], cl
mov byte [esp + 0x20], bl
jbe 0x41f4ba
test bl, bl
jne 0x41f424
mov eax, dword [esp + 0x10]
push 0x10
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.0040d5f0
add esp, 0xc
jmp 0x41f431
cmp bl, 1
jne 0x41f431
mov dword [esp + 0x14], 1
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
and esi, 0xff
lea eax, [esp + 0x34]
mov edx, esi
shl edx, 4
lea edi, [esp + edx + 0x54]
mov edx, dword [esp + 0x14]
push edi
push eax
push ecx
push edx
push ebp
call fcn.004161d0
test eax, eax
jne 0x41f50d
mov ecx, dword [esp + 0x2c]
lea eax, [esi + 1]
and ecx, 0xff
cmp eax, ecx
jge 0x41f493
mov edx, dword [esp + 0x10]
mov ecx, edi
shl eax, 4
lea esi, [esp + 0x34]
add eax, edx
mov edi, 0x10
mov dl, byte [eax]
xor dl, byte [ecx]
inc eax
inc ecx
mov byte [esi], dl
inc esi
dec edi
jne 0x41f487
mov al, byte [esp + 0x2c]
inc bl
cmp bl, al
mov byte [esp + 0x20], bl
jb 0x41f40a
cmp bl, 1
jne 0x41f4b2
mov dword [esp + 0x14], 1
mov al, byte [esp + 0x24]
mov edi, dword [esp + 0x28]
test al, al
je 0x41f534
push 0x10
lea eax, [esp + 0x38]
push 0
push eax
call fcn.0040d610
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
and esi, 0xff
push edi
shl esi, 4
lea eax, [esp + 0x44]
lea edx, [esi + ecx]
push edx
push eax
call fcn.0040d5f0
mov eax, dword [esp + 0x48]
add esp, 0x18
lea ecx, [esp + 0x44]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
push ebp
call fcn.004161d0
test eax, eax
je 0x41f521
push eax
call fcn.0041ce20
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
lea edx, [esp + 0x44]
push edi
lea eax, [esp + esi + 0x58]
push edx
push eax
call fcn.0040d5f0
add esp, 0xc
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x54]
push ecx
push edx
push eax
call fcn.0040d5f0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
pop edi
pop esi
pop ebp
mov eax, 0xe4
pop ebx
add esp, 0xb4
ret
mov eax, 0xcb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret