Function at 0x4109e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
cmp edi, 0x1000000
jb 0x410c8b
mov ebx, dword [ebp]
or eax, 0xffffffff
cmp ebx, eax
jne 0x410a12
cmp dword [ebp + 8], eax
jne 0x410a12
cmp dword [ebp + 0xc], eax
jne 0x410a12
cmp dword [ebp + 4], eax
je 0x410c8b
lea eax, [esp + 0x30]
mov ecx, esi
call fcn.0040f920
cmp eax, 3
je 0x410c8b
mov edx, dword [esp + 0x30]
cmp edx, ebx
jge 0x410a34
mov edx, ebx
mov dword [esp + 0x30], edx
mov eax, dword [ebp + 4]
cmp dword [esp + 0x34], eax
jge 0x410a41
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x38]
cmp ecx, eax
jle 0x410a52
mov ecx, eax
mov dword [esp + 0x38], ecx
mov eax, dword [ebp + 0xc]
mov ebx, dword [esp + 0x3c]
cmp ebx, eax
jle 0x410a63
mov ebx, eax
mov dword [esp + 0x3c], ebx
cmp edx, ecx
jge 0x410c8b
cmp dword [esp + 0x34], ebx
jge 0x410c8b
cmp dword [ebp], edx
mov eax, dword [esp + 0x34]
setge byte [esp + 0x2c]
cmp dword [ebp + 8], ecx
mov dword [esp + 0x18], edx
setle byte [esp + 0xf]
cmp byte [esp + 0x2c], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
je 0x410aa5
inc edx
mov dword [esp + 0x18], edx
cmp byte [esp + 0xf], 0
je 0x410ab0
dec dword [esp + 0x20]
mov dword [esp + 0x10], eax
cmp byte [esp + 0x2c], 0
je 0x410b19
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x10]
imul ecx, eax
add ecx, dword [ebp]
lea eax, [edx + ecx*4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, edi
shr ecx, 0x18
mov edx, pe_nt_image_headers32
sub edx, ecx
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov ebx, ecx
and ebx, 0xffff00ff
imul ebx, edx
and ecx, 0xff00ff
imul ecx, edx
mov edx, dword [esp + 0x14]
shr eax, 8
xor eax, ebx
and eax, 0xff00ff
xor eax, ecx
add eax, edi
mov dword [edx], eax
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
cmp byte [esp + 0xf], 0
je 0x410b7f
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x10]
imul ecx, eax
add ecx, dword [ebp + 8]
lea eax, [edx + ecx*4 - 4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, edi
shr ecx, 0x18
mov edx, pe_nt_image_headers32
sub edx, ecx
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov ebx, ecx
and ebx, 0xffff00ff
imul ebx, edx
and ecx, 0xff00ff
imul ecx, edx
mov edx, dword [esp + 0x14]
shr eax, 8
xor eax, ebx
and eax, 0xff00ff
xor eax, ecx
add eax, edi
mov dword [edx], eax
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
inc eax
cmp eax, ebx
mov dword [esp + 0x10], eax
jl 0x410ab4
cmp dword [ebp + 0xc], ebx
mov eax, dword [ebp + 4]
setle byte [esp + 0x2c]
cmp eax, dword [esp + 0x34]
jl 0x410c10
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
jge 0x410c10
mov ecx, edi
shr ecx, 0x18
mov edx, pe_nt_image_headers32
sub edx, ecx
mov ecx, dword [esi + 4]
imul ecx, dword [ebp + 4]
add ecx, eax
mov eax, dword [esi + 0x10]
lea eax, [eax + ecx*4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov ebx, ecx
and ebx, 0xffff00ff
imul ebx, edx
and ecx, 0xff00ff
imul ecx, edx
shr eax, 8
xor eax, ebx
and eax, 0xff00ff
xor eax, ecx
mov ecx, dword [esp + 0x14]
add eax, edi
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
jl 0x410bb7
cmp byte [esp + 0x2c], 0
je 0x410c8b
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
jge 0x410c8b
mov ecx, edi
shr ecx, 0x18
mov edx, pe_nt_image_headers32
sub edx, ecx
mov ecx, dword [ebp + 0xc]
dec ecx
imul ecx, dword [esi + 4]
add ecx, eax
mov eax, dword [esi + 0x10]
lea eax, [eax + ecx*4]
mov dword [esp + 0x14], eax
mov eax, dword [eax]
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov ebx, ecx
and ebx, 0xffff00ff
imul ebx, edx
and ecx, 0xff00ff
imul ecx, edx
shr eax, 8
xor eax, ebx
and eax, 0xff00ff
xor eax, ecx
mov ecx, dword [esp + 0x14]
add eax, edi
mov dword [ecx], eax
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
jl 0x410c31
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 0x14