Function at 0x41d80c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffbc0
mov esi, eax
mov al, byte [esi + 0x14]
dec al
je 0x41d828
sub al, 2
je 0x41d8a0
jmp 0x41dd0b
mov eax, dword [esi + 4]
mov eax, dword [eax]
call fcn.00652dd0
mov edi, eax
xor ebx, ebx
mov dword [esp + 0x438], ebx
fild dword [esp + 0x438]
fld xword [0x41dd18]
fmulp st(1)
add esp, 0xfffffff4
fstp xword [esp]
wait
mov dword [esp + 0x448], edi
fild dword [esp + 0x448]
fld xword [0x41dd24]
fmulp st(1)
fld xword [0x41dd30]
fmulp st(1)
fdivr dword [0x41dd3c]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.00652d04
fmul dword [0x41dd40]
call fcn.00402588
mov byte [esi + ebx + 0x20], al
inc ebx
cmp ebx, 0x100
jne 0x41d836
jmp 0x41dd0b
mov ecx, esi
mov dl, 1
mov eax, dword [0x404700]
call fcn.00408628
mov dword [esp + 0x1c], eax
xor edx, edx
mov eax, dword [esp + 0x1c]
call fcn.00650c30
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, esi
call fcn.0041e520
mov dword [esp + 8], eax
mov eax, esi
call fcn.0041e1dc
mov edi, eax
lea ebx, [edi + 1]
mov eax, ebx
call fcn.00401e58
mov dword [esp + 4], eax
mov eax, ebx
call fcn.00652e1c
mov dword [esp], eax
mov eax, dword [esi + 0x1c]
mov eax, dword [eax + 4]
call fcn.00652dd0
push eax
mov eax, dword [esi + 0x1c]
mov eax, dword [eax]
call fcn.00652dd0
mov edx, eax
mov eax, dword [esi + 0x18]
pop ecx
call fcn.0064bc20
mov eax, dword [esi + 0x1c]
mov dl, byte [eax + 9]
sub dl, 1
jb 0x41d92b
dec dl
je 0x41d986
dec edx
sub dl, 2
jb 0x41d92b
dec dl
je 0x41d986
jmp case.0x41d93a.0
movzx eax, byte [eax + 8]
cmp eax, 0x10
ja case.0x41d93a.0
mov al, byte [eax + 0x41d941]
jmp dword [eax*4 + 0x41d952]
mov dl, 1
mov eax, dword [esi + 0x18]
call fcn.0064bae8
jmp case.0x41d93a.0
mov dl, 2
mov eax, dword [esi + 0x18]
call fcn.0064bae8
jmp case.0x41d93a.0
mov dl, 3
mov eax, dword [esi + 0x18]
call fcn.0064bae8
jmp case.0x41d93a.0
mov al, byte [eax + 8]
sub al, 8
je 0x41d991
sub al, 8
jne case.0x41d93a.0
mov eax, dword [esi + 0x18]
call fcn.0064bc84
mov edx, dword [esi + 0x1c]
mov al, byte [edx + 9]
sub al, 1
jb 0x41d9b3
sub al, 2
je 0x41da83
dec al
jne 0x41daa7
mov word [esp + 0x34], 0x300
mov word [esp + 0x36], pe_nt_image_headers32
mov al, byte [edx + 8]
cmp al, 0x10
je 0x41d9d6
mov ecx, eax
mov ax, 1
shl ax, cl
mov word [esp + 0x36], ax
movzx eax, word [esp + 0x36]
dec eax
test eax, eax
jl 0x41da33
inc eax
mov dword [esp + 0x24], eax
xor ebx, ebx
lea eax, [esp + 0x38]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
mov ebp, eax
movzx eax, word [esp + 0x36]
dec eax
push eax
push 0xff
push ebx
call sub.kernel32.dll_MulDiv
mov byte [ebp], al
mov al, byte [ebp]
mov byte [ebp + 1], al
mov byte [ebp + 2], al
mov eax, dword [esp + 0x28]
mov edx, eax
mov eax, dword [0x66b4dc]
call fcn.0041e0a4
mov byte [ebp + 3], 4
inc ebx
add dword [esp + 0x28], 4
dec dword [esp + 0x24]
jne 0x41d9ef
mov eax, dword [esi + 0x1c]
cmp byte [eax + 8], 2
jne 0x41da6d
cmp word [esp + 0x36], 0x10
jae 0x41da6d
mov word [esp + 0x36], 0x10
mov ebx, 1
mov eax, ebx
shl eax, 2
lea edx, [esp + eax*4 + 0x38]
lea eax, [esp + 0x38]
mov ecx, 0x15
call fcn.004023c8
inc ebx
cmp ebx, 4
jne 0x41da50
lea eax, [esp + 0x34]
push eax
call sub.gdi32.dll_CreatePalette
mov edx, eax
mov eax, dword [esi + 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
jmp 0x41daa7
cmp dword [0x66b4e0], 0
jne 0x41da93
call fcn.0065612c
jmp 0x41daa7
mov eax, dword [0x66b4e0]
call fcn.0041e0cc
mov edx, eax
mov eax, dword [esi + 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [esi + 0x18]
call fcn.0064b030
mov dword [esp + 0x20], eax
mov bl, 1
mov eax, dword [esi + 0x1c]
cmp byte [eax + 0xc], 1
jne 0x41dc5f
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], 0x65d050
mov edi, 0x65d088
mov dword [esp + 0x30], 0x65d034
mov dword [esp + 0x28], 0x65d06c
mov eax, dword [esi + 0x18]
mov edx, dword [eax]
call dword [edx + 0x28]
mov edx, dword [esp + 0x2c]
sub eax, dword [edx]
add eax, dword [edi]
dec eax
cdq
idiv dword [edi]
mov edx, dword [esi + 0x1c]
xor ecx, ecx
mov cl, byte [edx + 9]
cmp ecx, 6
ja case.0x41db0a.1
jmp dword [ecx*4 + 0x41db11]
movzx edx, byte [edx + 8]
imul edx, eax
add edx, 8
dec edx
test edx, edx
jns 0x41db3f
add edx, 7
sar edx, 3
mov dword [esp + 0x18], edx
jmp case.0x41db0a.1
lea eax, [eax + eax*2]
movzx edx, byte [edx + 8]
imul edx
test eax, eax
jns 0x41db58
add eax, 7
sar eax, 3
mov dword [esp + 0x18], eax
jmp case.0x41db0a.1
shl eax, 2
movzx edx, byte [edx + 8]
imul edx
test eax, eax
jns 0x41db71
add eax, 7
sar eax, 3
mov dword [esp + 0x18], eax
jmp case.0x41db0a.1
add eax, eax
movzx edx, byte [edx + 8]
imul edx
test eax, eax
jns 0x41db89
add eax, 7
sar eax, 3
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov dword [esp + 0x14], eax
jmp 0x41dc27
mov ecx, dword [esp + 0x18]
inc ecx
xor eax, eax
mov al, bl
mov edx, dword [esp + eax*4]
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax]
call dword [ebp + 4]
mov eax, ebx
xor al, 1
and eax, 0x7f
mov eax, dword [esp + eax*4]
inc eax
push eax
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0x20]
push eax
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
lea ecx, [eax + 1]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
mov dl, byte [eax]
mov eax, esi
call fcn.0041e258
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
push eax
mov eax, dword [edi]
push eax
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 0x1c]
mov edx, dword [esp + 0x24]
mov edx, dword [eax + edx*4]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0x10]
lea ecx, [eax + 1]
mov eax, esi
call fcn.0041e728
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
add dword [esp + 0x14], eax
xor bl, 1
mov eax, dword [esi + 0x18]
mov edx, dword [eax]
call dword [edx + 0x1c]
cmp eax, dword [esp + 0x14]
jg 0x41db9f
inc dword [esp + 0x10]
add dword [esp + 0x28], 4
add dword [esp + 0x30], 4
add edi, 4
add dword [esp + 0x2c], 4
cmp dword [esp + 0x10], 7
jne 0x41dae5
jmp 0x41dce8
mov eax, dword [esi + 0x18]
mov edx, dword [eax]
call dword [edx + 0x1c]
dec eax
test eax, eax
jl 0x41dce8
inc eax
mov dword [esp + 0x24], eax
mov dword [esp + 0xc], 0
lea ecx, [edi + 1]
xor eax, eax
mov al, bl
mov edx, dword [esp + eax*4]
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax]
call dword [ebp + 4]
mov eax, ebx
xor al, 1
and eax, 0x7f
mov eax, dword [esp + eax*4]
inc eax
push eax
mov eax, dword [esp + 0xc]
push eax
push edi
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
lea ecx, [eax + 1]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 0xc]
mov dl, byte [eax]
mov eax, esi
call fcn.0041e258
push edi
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x1c]
mov edx, dword [esp + 0x10]
mov edx, dword [eax + edx*4]
xor eax, eax
mov al, bl
mov eax, dword [esp + eax*4 + 4]
lea ecx, [eax + 1]
mov eax, esi
call fcn.0041e580
xor bl, 1
inc dword [esp + 0xc]
dec dword [esp + 0x24]
jne 0x41dc79
mov eax, dword [esp + 0x20]
call fcn.0064e5c0
mov eax, dword [esp + 4]
call fcn.00401fac
mov eax, dword [esp]
call fcn.00401fac
mov eax, dword [esp + 0x1c]
call fcn.004028c0
add esp, 0x440
pop ebp
pop edi
pop esi
pop ebx
ret